本文整理汇总了PHP中OOMedia::_isImage方法的典型用法代码示例。如果您正苦于以下问题:PHP OOMedia::_isImage方法的具体用法?PHP OOMedia::_isImage怎么用?PHP OOMedia::_isImage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OOMedia
的用法示例。
在下文中一共展示了OOMedia::_isImage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get
function get()
{
$section =& $this->getSection();
$form = $section->getForm();
// Buttons erst hier einfügen, da vorher die ID noch nicht vorhanden ist
$this->addButton('Medienpool öffnen', 'javascript:openMediaPool(\'&opener_form=' . $form->getName() . '&opener_input_field=' . $this->getId() . '\');');
$this->addButton('Medium entfernen', 'javascript:setValue(\'' . $this->getId() . '\',\'\');', 'file_del.gif');
$this->addButton('Medium hinzufügen', 'javascript:openMediaPool(\'&action=media_upload&subpage=add_file&opener_form=' . $form->getName() . '&opener_input_field=' . $this->getId() . '\');', 'file_add.gif');
$preview = '';
if ($this->isPreviewEnabled() && $this->getValue() != '' && OOMedia::_isImage($this->getValue())) {
$preview = '<img class="preview" src="' . $this->previewUrl($this->getValue()) . '" />';
}
return $preview . parent::get();
}
示例2: rex_mediapool_saveMedia
$rex_file_category = 0;
}
// function in function.rex_mediapool.inc.php
$return = rex_mediapool_saveMedia($_FILES['file_new'], $rex_file_category, $FILEINFOS, $REX['USER']->getValue("login"));
$info = $return['msg'];
$subpage = "";
// ----- EXTENSION POINT
if ($return['ok'] == 1) {
rex_register_extension_point('MEDIA_ADDED', '', $return);
}
if (rex_post('saveandexit', 'boolean') && $return['ok'] == 1) {
$file_name = $return['filename'];
$ffiletype = $return['type'];
$title = $return['title'];
if ($opener_input_field == 'TINYIMG') {
if (OOMedia::_isImage($file_name)) {
$js = "insertImage('{$file_name}','{$title}');";
}
} elseif ($opener_input_field == 'TINY') {
$js = "insertLink('" . $file_name . "');";
} elseif ($opener_input_field != '') {
if (substr($opener_input_field, 0, 14) == "REX_MEDIALIST_") {
$js = "selectMedialist('" . $file_name . "');";
} else {
$js = "selectMedia('" . $file_name . "');";
}
}
echo "<script language=javascript>\n";
echo $js;
// echo "\nself.close();\n";
echo "</script>";