1
pegasus00321
Theme Select via GET

This hack has probably been posted before but I think that its quite a useful one.

if (!empty($_GET['theme_select']) && in_array($_GET['theme_select'], $xoopsConfig['theme_set_allowed'])) {
    
$xoopsConfig['theme_set'] = $_GET['theme_select'];
    
$_SESSION['xoopsUserTheme'] = $_GET['theme_select'];
} elseif (!empty(
$_SESSION['xoopsUserTheme']) && in_array($_SESSION['xoopsUserTheme'], $xoopsConfig['theme_set_allowed'])) {
    
$xoopsConfig['theme_set'] = $_SESSION['xoopsUserTheme'];
}


Its found in common.php in the include folder.
I changed it from POST to GET so that it would allow more creative ways of switching themes.
Like you could simply use a and anything can go here, an image, w/e

2
draxan
Re: Theme Select via GET
  • 2005/6/21 14:54

  • draxan

  • Just popping in

  • Posts: 20

  • Since: 2005/3/9 1


pegasus00321 maby you know how use this to switch theme automatically to theme defined by administrator after user login?
and where put this changes ???

3
pegasus00321
Re: Theme Select via GET

Sorry I didnt see your reply soon enough.
If you still need to know, its in include/common.php
Search for theme_select and you'll see something similar
Just replace it with that
Pegasus00321


I would appricate it if you click this link
TuFat.com PHP Scripts and etc

Login

Who's Online

352 user(s) are online (257 user(s) are browsing Support Forums)


Members: 0


Guests: 352


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