1
Hi does anyone know how to set xoops to have a different theme for different module without using Defacer module in XOOPS 2.5.10 ?
I saw this old post from the defunct xoops-tip website but its not working...the theme file is loading but the theme directory name themename is not changing
Quote:
create a new theme.html file with the following
<{php}>
$mod = $GLOBALS['xoopsModule'];
$dirname = (isset($mod) ? $mod->getVar('dirname') :'system');
if ($dirname == 'newbb') {
$theme='dream_on';
} elseif ($dirname == 'news') {
$theme='sunshine';
}elseif ($dirname == 'mylinks') {
$theme='imago06';
} else {
$theme='7dana-rose';
}
$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"}>
Create a New Theme
We created a new theme call Multi (you can name it to whatever you wish) under the theme directory - use either a FTP client or mkdir shell command.
We uploaded the newly created theme.html file into Multi theme directory. Also we uploaded the style.css file from ThemeA to the Multi directory.
Please note that style.css is not required to make your multiple themes work. Without it, all the java popup windows will not look very nice, as they can’t find a suitable style.css file under Multi theme. Javascript popup windows will only look for the style.css file under the default theme (Multi), and not under individual themes.
Enable Multiple Themes
We then went to Preferences and General Settings: selected Yes for updating theme files and selected Multi as the default theme.
Viola, we have a multi-theme site. If you have followed the steps and have not made typos and other mistakes, now you should have a multi-themed Xoops Site.