1
BCdudes
How to use a different theme for one of the modules ?
  • 2006/8/31 11:39

  • BCdudes

  • Just popping in

  • Posts: 27

  • Since: 2006/8/31


Hello, I have a custom module that i have made with files:

index.php
xoops_version.php
logo.gif

the contents of index.php are:
include("../../mainfile.php");
include(
XOOPS_ROOT_PATH."/header.php");
$xoopsOption['show_rblock'] = 1;
?>










include(XOOPS_ROOT_PATH."/footer.php");
?>


I mainly use this module to display custom blocks on it that will reflect its contents.

I want to use a different theme for this particular module.

I am not a php guy, more like a VB guy. so i was thinking, is it possible to use a variable, like the module's name in the theme file or in header.php so that:

If ModuleName = "mymodule" then theme=themename

if thats not possible, do you have any other method I could use ??

please advise.


regards
BCdudes

2
snow77
Re: How to use a different theme for one of the modules ?
  • 2006/8/31 11:52

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


Click here to go to Themes : Multiple-Themed XOOPS Site Guide news article

there is also this code:

<{php}>
$mod $GLOBALS['xoopsModule'];
$dirname = (isset($mod) ? $mod->getVar('dirname') :'system');
function 
toggleDisplay(obj,display1,display2){
if (
$dirname == 'newbb') {
   
$theme='ThemeB';
  } else {
   
$theme='ThemeA';
}
$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}>

3
yasir
Re: How to use a different theme for one of the modules ?
  • 2006/8/31 12:18

  • yasir

  • Not too shy to talk

  • Posts: 109

  • Since: 2005/5/16


hi dear
i'm not that good at PHP yet
but var should began by $
such as $var

4
Will_H
Re: How to use a different theme for one of the modules ?
  • 2006/8/31 18:14

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


not in this instance

$mod->getVar

5
carnuke
Re: How to use a different theme for one of the modules ?
  • 2006/8/31 19:29

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5


The easiste option is to use Themechanger You also get meta tags input per module thrown in!
hhttp://houseofstrauss.co.uk Resource for alternative health and holistic lifestyle
search xoops

6
BCdudes
Re: How to use a different theme for one of the modules ?
  • 2006/9/5 9:40

  • BCdudes

  • Just popping in

  • Posts: 27

  • Since: 2006/8/31


I used the code provided and now everything is perfect

in fact, i added another "if statement" after the code to allow the change to happen to other modules.

PERFECT.


better than stinky modules, I want mine to be smooth, and clean :p


cheers mates

Login

Who's Online

202 user(s) are online (87 user(s) are browsing Support Forums)


Members: 0


Guests: 202


more...

Donat-O-Meter

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

Latest GitHub Commits