1
Hi all,
I got this following code from
xoops-tips.com to switch theme, however, I am using a theme that have two style sheets one for IE(style.css) and another for FF(styleNN.css). Is there a way to change the below code so it's automatically detects the browser and choose the correct style sheet?
<{php}>
$mod = $GLOBALS['xoopsModule'];
$dirname = (isset($mod) ? $mod->getVar('dirname') :'system');
if ($dirname == 'directory') {
$theme='css_variable';
} elseif ($dirname == '') {
$theme='css_variable';
}elseif ($dirname == '') {
$theme='css_variable';
} else {
$theme='css_fixed';
}
$this->assign('themename', $theme.'/theme.html');
$this->assign('xoops_theme', $theme);
$this->assign('xoops_themecss', XOOPS_URL.'/themes/'.$theme.'/style.css');
$this->assign('xoops_imageurl', XOOPS_URL.'/themes/'.$theme.'/');
<{/php}>
<{include file="$themename"}>