1
quaker_31
RANDOM THEME
  • 2006/4/17 21:16

  • quaker_31

  • Just popping in

  • Posts: 7

  • Since: 2005/7/19


Hello, I have 3 identical themes, however they all have different backgrounds for the top part of their theme. I was wondering if there is a way for a random theme to be played everyvisit to the site, or on a reload, please look at this site to understand www.ucl.ac.uk. Basically for it to choose 1 theme out of 3 on random, would be great, any ideas?
I dont want them choosing their themes, it should be given to them.

Thank you in advance for any help

2
Bassman
Re: RANDOM THEME
  • 2006/4/17 21:59

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


You don't need a random theme, just a random image appearing in the header. Easy enough to do.

3
quaker_31
Re: RANDOM THEME
  • 2006/4/20 4:28

  • quaker_31

  • Just popping in

  • Posts: 7

  • Since: 2005/7/19


Thank you so much for your help! Yes your random image suggestion is feasible, however I cannot find or code a script that will give me a 2 random images which are interlinked. For example, i have 3 images i want displayed randomly, however each image is split in 2, so in fact i have 6 images. However they need to be partnered with its pair, I dont want it to have the top half of one image and the bottom of the other. I hope what I say makes sense, every help is much appreicated!

4
Bassman
Re: RANDOM THEME
  • 2006/4/20 4:38

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


I understand what you mean, but I don't know of any way of doing it sorry :(

5
quaker_31
Re: RANDOM THEME
  • 2006/4/20 14:46

  • quaker_31

  • Just popping in

  • Posts: 7

  • Since: 2005/7/19


Thanks anyone else have an idea?

6
blueteen
Re: RANDOM THEME
  • 2006/4/20 15:34

  • blueteen

  • Quite a regular

  • Posts: 379

  • Since: 2004/7/16


hello,
do you speak french ?
same question (and solution) was posted one month ago.

in french forums

else, i can translate it for you (on friday, morning).

7
quaker_31
Re: RANDOM THEME
  • 2006/4/25 2:26

  • quaker_31

  • Just popping in

  • Posts: 7

  • Since: 2005/7/19


I did not want to trouble you so i tried translating it, but it didnt want to work, So is it possible that you could give me an idiots guide to it in english. I would very much appreciate it, THANK YOU SO MUCH!

8
Will_H
Re: RANDOM THEME
  • 2006/4/25 3:15

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


I'd be happy to share an image rotator script with you, please pm me your email address and i will mail it.

9
blueteen
Re: RANDOM THEME
  • 2006/4/25 6:46

  • blueteen

  • Quite a regular

  • Posts: 379

  • Since: 2004/7/16


Quote:

quaker_31 wrote:
I did not want to trouble you so i tried translating it, but it didnt want to work, So is it possible that you could give me an idiots guide to it in english. I would very much appreciate it, THANK YOU SO MUCH!


no problems !
edit your mainfile.php

juste before ?>

add :

if( substrXOOPS_VERSION ) > 2.0 ) {
    
$module_handler = &xoops_gethandler('module');
    
$ModuleSystem $module_handler->getByDirname('system');
    
$module_id $ModuleSystem->getVar('mid');
} else {
    
$module_id 0;
}

$config_handler = &xoops_gethandler('config');
$ConfigSystem = & $config_handler->getConfigsByCat(0$module_id);
$theme_list $ConfigSystem['theme_set_allowed'];
$the_theme intvalrand(0count($theme_list)-) );
$xoopsConfig['theme_set'] = $theme_list[$the_theme];


that's all
http://xoops.valentinois.net/modules/contact/
try to reload the webpage.

if you use XOOPS 2.2.x

change :

by :

$xoopsConfig['theme_set'] = $theme_list[$the_theme];


if ( basename$_SERVER['SCRIPT_NAME']) != 'admin.php') {
    
$xoopsConfig['theme_set'] = $theme_list[$the_theme];
}

Login

Who's Online

178 user(s) are online (109 user(s) are browsing Support Forums)


Members: 0


Guests: 178


more...

Donat-O-Meter

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

Latest GitHub Commits