Multitheme XOOPS without defacer module ?
  • 2020/10/15 12:15

  • liomj

  • Just popping in

  • Posts: 67

  • Since: 2012/4/10

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

create a new theme.html file with the following
$mod $GLOBALS['xoopsModule'];
$dirname = (isset($mod) ? $mod->getVar('dirname') :'system');
if (
$dirname == 'newbb') {
  } elseif (
$dirname == 'news') {
  }elseif (
$dirname == 'mylinks') {
  } else {


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.

Re: Multitheme XOOPS without defacer module ?
  • 2020/10/15 12:58

  • liomj

  • Just popping in

  • Posts: 67

  • Since: 2012/4/10

i think i got this.. i changed all xoImgUrl to $xoops_imageurl in my themes and now its working

Re: Multitheme XOOPS without defacer module ?
  • 2020/10/15 15:15

  • Mamba

  • Moderator

  • Posts: 11256

  • Since: 2004/4/23

Please note that using <{php}> tags in Smarty is not recommended, and in Smarty 3 it is disabled by default.

Defacer seems to be the best and safest way.

More info about {php} tag in Smarty: https://www.smarty.net/best_practices
Use 2.5.10 | Docs | Modules | Bugs


Who's Online

55 user(s) are online (33 user(s) are browsing Support Forums)

Members: 0

Guests: 55



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

Latest GitHub Commits