本文整理匯總了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>";