本文整理汇总了PHP中gcms::imageInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP gcms::imageInfo方法的具体用法?PHP gcms::imageInfo怎么用?PHP gcms::imageInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gcms
的用法示例。
在下文中一共展示了gcms::imageInfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$script = array();
// เมนูหลัก
foreach ($lng['MENU_PARENTS'] as $key => $value) {
$mainmenu[$key] = array();
}
// กรุณาอย่าเอาออก
$meta['generator'] = '<meta name=generator content="GCMS AJAX CMS design by http://gcms.in.th">';
$meta['rss'] = '<link rel=alternate type="application/rss+xml" title="' . sprintf($lng['LNG_RSS_MENU'], strip_tags($config['web_title'])) . '" href="' . WEB_URL . '/menu.rss">';
$image_logo = '';
$image_src = '';
if (!empty($config['logo']) && is_file(DATA_PATH . 'image/' . $config['logo'])) {
// logo swf ใส่ลงใน #logo เท่านั้น
$ext = explode('.', $config['logo']);
$ext = strtolower(end($ext));
if ($ext == 'swf') {
$info = gcms::imageInfo(DATA_PATH . "image/{$config['logo']}");
$script[] = '$G(window).Ready(function(){';
$script[] = 'if ($E("logo")) {';
$script[] = "new GMedia('logo_swf', '" . DATA_URL . "image/{$config['logo']}', {$info['width']}, {$info['height']}).write('logo');";
$script[] = '}';
$script[] = '});';
} else {
$image_src = DATA_URL . 'image/' . $config['logo'];
$image_logo = '<img src="' . $image_src . '" alt="{WEBTITLE}">';
}
}
// canonical
$canonical = WEB_URL . '/index.php';
// โมดูลที่เรียกมา
$module = '';
if (isset($_REQUEST['module'])) {
示例2: array
$error = !$error ? 'TITLE_EXISTS' : $error;
} else {
$ret['ret_write_topic'] = '';
}
}
if (!$error && $id == 0) {
// config ของโมดูล (default) บันทึกลง db
$cfg = array();
if (is_file(ROOT_PATH . "modules/{$owner}/default.config.php")) {
include ROOT_PATH . "modules/{$owner}/default.config.php";
}
if (isset($default[$owner])) {
foreach ($default[$owner] as $key => $value) {
$cfg[] = "{$key}={$value}";
if ($key == 'default_icon') {
$info = gcms::imageInfo(ROOT_PATH . $value);
$cfg[] = "icon_w={$info['width']}";
$cfg[] = "icon_h={$info['height']}";
}
}
if (sizeof($cfg) > 0) {
$module_save['config'] = implode("\n", $cfg);
}
}
// config หลัก (บันทึกลง config.php)
if (isset($newconfig[$owner])) {
// โหลด config ใหม่
$config = array();
if (is_file(CONFIG)) {
include CONFIG;
}