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
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

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

Login

Who's Online

157 user(s) are online (108 user(s) are browsing Support Forums)


Members: 0


Guests: 157


more...

Donat-O-Meter

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

Latest GitHub Commits