예제 #1
0
/**
 * Returns the URL to a specified image
 * 
 * @param string $image image source
 * @param bool $notheme[optional] whether this is a themed image or a top level path
 * 
 * @return string
 */
function image_url($image, $notheme = false, $module = 'core', $relative = true)
{
    if ($notheme) {
        $params['src'] = $image;
    } else {
        if ($module != 'core' && !file_exists(THEBUGGENIE_PATH . 'iconsets/' . TBGSettings::getIconsetName() . "/{$module}/" . $image)) {
            $params['src'] = TBGContext::getTBGPath() . "iconsets/" . TBGSettings::getIconsetName() . "/modules/{$module}/" . $image;
        } elseif ($module != 'core') {
            $params['src'] = TBGContext::getTBGPath() . 'iconsets/' . TBGSettings::getIconsetName() . "/{$module}/" . $image;
        } else {
            $params['src'] = TBGContext::getTBGPath() . 'iconsets/' . TBGSettings::getIconsetName() . '/' . $image;
        }
    }
    if (!$relative) {
        $params['src'] = TBGContext::getUrlHost() . $params['src'];
    }
    return $params['src'];
}
예제 #2
0
echo mb_strtolower(str_replace('_', '-', TBGContext::getI18n()->getCurrentLanguage()));
?>
</language>
		<image>
		<?php 
if (TBGSettings::isUsingCustomHeaderIcon() == '2') {
    ?>
			<url><?php 
    echo TBGSettings::getHeaderIconURL();
    ?>
</url>
		<?php 
} elseif (TBGSettings::isUsingCustomHeaderIcon() == '1') {
    ?>
			<url><?php 
    echo TBGContext::getUrlHost() . TBGContext::getTBGPath() . 'header.png';
    ?>
</url>
		<?php 
} else {
    ?>
			<url><?php 
    echo image_url('logo_24.png', false, null, false);
    ?>
</url>
		<?php 
}
?>
			<title><?php 
echo TBGSettings::getTBGname() . ' ~ ' . $searchtitle;
?>