Připojení CSS pro Internet Explorer:
/**
* Generates IE CSS links for LTR and RTL languages.
*/
function phptemplate_get_ie_styles() {
global $language;
$iecss = "\n";
$iecss .= '<!--[if (lte IE 7)&(gte IE 5)]>'."\n ";
$iecss .= '<link type="text/css" rel="stylesheet" media="screen,
projection" href="'. base_path() . path_to_theme()
.'/styles/ie-7.css" />'."\n ";
if (defined('LANGUAGE_RTL') && $language->direction ==
LANGUAGE_RTL) {
$iecss .= '<link type="text/css" rel="stylesheet" media="screen,
projection" href="'. base_path() . path_to_theme()
.'/styles/ie-7-rtl.css" />'."\n ";
}
$iecss .= '<![if lt IE 7]>'."\n ";
$iecss .= '<link type="text/css" rel="stylesheet" media="screen,
projection" href="'. base_path() . path_to_theme()
.'/styles/ie-6.css" />'."\n ";
if (defined('LANGUAGE_RTL') && $language->direction ==
LANGUAGE_RTL) {
$iecss .= '<link type="text/css" rel="stylesheet" media="screen,
projection" href="'. base_path() . path_to_theme()
.'/styles/ie-6-rtl.css" />'."\n ";
}
$iecss .= '<![if lt IE 6]>'."\n ";
$iecss .= '<link type="text/css" rel="stylesheet" media="screen,
projection" href="'. base_path() . path_to_theme()
.'/styles/ie-5.5.css" />'."\n ";
if (defined('LANGUAGE_RTL') && $language->direction ==
LANGUAGE_RTL) {
$iecss .= '<link type="text/css" rel="stylesheet" media="screen,
projection" href="'. base_path() . path_to_theme()
.'/styles/ie-5.5-rtl.css" />'."\n ";
}
$iecss .= '<![if lt IE 5.5]>'."\n ";
$iecss .= '<link type="text/css" rel="stylesheet" media="screen,
projection" href="'. base_path() . path_to_theme()
.'/styles/ie-5.css" />'."\n ";
if (defined('LANGUAGE_RTL') && $language->direction ==
LANGUAGE_RTL) {
$iecss .= " ".'<link type="text/css" rel="stylesheet"
media="screen, projection" href="'. base_path() .
path_to_theme() .'/styles/ie-5-rtl.css" />'."\n ";
}
$iecss .= '<![endif]>'."\n ";
$iecss .= '<![endif]>'."\n ";
$iecss .= '<![endif]>'."\n";
$iecss .= '<![endif]-->'."\n";
return $iecss;
}