1
fatman
finding out the current theme inside a function
  • 2004/2/11 6:23

  • fatman

  • Friend of XOOPS

  • Posts: 176

  • Since: 2003/12/13


I know the answer here must be simple, but I haven't been able to figure out how to find the information im looking for.

I need to find out the name of the current theme and css file inside a function used by a module.

example
le="color: #000000"><?php function buildHtmlEditor ( $options ) { $block['theme'] = // $xoops_theme ? $block['css'] = // $xoops_themecss ? /* snip */ return $block; }


I've been looking for where $xoops_theme and $xoops_themecss get assigned but I can't locate the spot.

2
blueangel
Re: finding out the current theme inside a function
  • 2004/2/11 6:39

  • blueangel

  • Module Developer

  • Posts: 132

  • Since: 2002/2/20


try to define in the function

le="color: #000000"><?php include XOOPS_ROOT_PATH."/include/functions.php"; global $xoopsConfig; $theme_name = $xoopsConfig['theme_set']; $theme_css = getcss($xoopsConfig['theme_set']);

3
fatman
Re: finding out the current theme inside a function *example
  • 2004/2/11 7:18

  • fatman

  • Friend of XOOPS

  • Posts: 176

  • Since: 2003/12/13


thank you that is exactly the answer i needed. I knew it was somewhere in some class. but my search for 'current theme' wasn't finding it.

Cheers.

4
blueangel
Re: finding out the current theme inside a function *example
  • 2004/2/11 8:02

  • blueangel

  • Module Developer

  • Posts: 132

  • Since: 2002/2/20


many times the most difficult thing is not implement the code, but found the right functions in the code