1
hrac
theme name in custom block
  • 2011/8/8 11:38

  • hrac

  • Quite a regular

  • Posts: 305

  • Since: 2002/7/15


Hello,
Is there any way to use theme name or theme directory inside xoops custom block like {X_SITEURL} ?
Thanks

2
iHackCode
Re: theme name in custom block

in a xoops custom php block try to do a


echo $xoopsConfig['theme_set'];

or

echo $GLOBALS['xoopsConfig']['theme_set'];

i think one of those should work.
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

3
mboyden
Re: theme name in custom block
  • 2011/8/11 0:31

  • mboyden

  • Moderator

  • Posts: 484

  • Since: 2005/3/9 1


It's even easier than that:

<{$xoTheme->folderName}>

There are also path generators:

<{xoAppUrl path/to/filename.ext}> will create:
XOOPS_URL/path/to/filename.ext

<{xoImgUrl path/to/filename.ext}> will create:
XOOPS_URL/themes/themedir/path/to/filename.ext

This second one will also try (should filename.ext not exist):
XOOPS_URL/images/path/to/filename.ext

And of course, $xoTheme has many other variables available as well.
Pessimists see difficulty in opportunity; Optimists see opportunity in difficulty. --W Churchill

XOOPS: Latest | Debug | Hosting and Web Development

4
iHackCode
Re: theme name in custom block

are smarty variables supported in those blocks?
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

5
mboyden
Re: theme name in custom block
  • 2011/8/11 1:43

  • mboyden

  • Moderator

  • Posts: 484

  • Since: 2005/3/9 1


Well, before I did that post, I tried it in a couple of blocks on a couple of modules in a XOOPS 2.4.5 installation. YMMV, of course and other standard disclaimers.
Pessimists see difficulty in opportunity; Optimists see opportunity in difficulty. --W Churchill

XOOPS: Latest | Debug | Hosting and Web Development

6
iHackCode
Re: theme name in custom block

i will have to try that one day
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

Login

Who's Online

216 user(s) are online (174 user(s) are browsing Support Forums)


Members: 0


Guests: 216


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