1
mrphilong
Multi Theme
  • 2007/6/8 12:02

  • mrphilong

  • Quite a regular

  • Posts: 351

  • Since: 2006/7/14


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"}>
www.UcChau.Net
www.XoopsViet.Org

Login

Who's Online

285 user(s) are online (178 user(s) are browsing Support Forums)


Members: 0


Guests: 285


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits