1
Bassman
Random theme with each page refresh
  • 2006/9/21 22:44

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


Would be cool if the XT-Temas module could be modified to have the option of displaying a random theme with every page view. Maybe have a choice of which themes to display randomly out of installed themes?

2
davidl2
Re: Random theme with each page refresh
  • 2006/9/21 22:57

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


Is it possible to create a random number in Smarty - and perhaps use this to ammend elements of a theme randomly?

3
hyperpod
Re: Random theme with each page refresh
  • 2006/9/22 1:35

  • hyperpod

  • Quite a regular

  • Posts: 359

  • Since: 2004/10/4


Yep you can do that with Smarty.

In fact, you can randomize a list of words and Smarty will pick one randomly.

I use this technique in hyperTheme V2

You can see it in action on www.hyperpod.net (just refresh a few times and you will see the colors change.


Here is an example:

<table cellspacing="0" cellpadding="0" bgcolor="#ffffff" style="margin-bottom:8px;">
    <
tr background="<{$xoops_imageurl}>images/hyperTheme_08.jpg"><td class="blockTitle"><img src="<{$xoops_imageurl}>images/<{randomize values="red,blue,green,orange,purple"}>_pill.jpg" alt="" /><{$block.title}></td></tr>
    <
tr><td style="padding:8px;"><{$block.content}></td></tr>
</
table>


You would have to add the smarty plugin for randomizer into the smarty plugins directory and distribute that with your theme, which is easy to do.

Best regards,
Daniel Hall / XOOPS Module Development & Theme Design
Free XOOPS Support > My Wish List

4
iHackCode
Re: Random theme with each page refresh

wow.. i never noticed the changing colors
CBB / LatestNews / Publisher / XM-Spotlight

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

5
Will_H
Re: Random theme with each page refresh
  • 2006/9/22 1:48

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


you could do it with css and a rotator script.

6
Bassman
Re: Random theme with each page refresh
  • 2006/9/22 2:32

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


Quote:

Biteronboard wrote:
you could do it with css and a rotator script.


I've done that before inside a theme. But I meant selecting a theme out of a list of installed themes.

7
Will_H
Re: Random theme with each page refresh
  • 2006/9/22 3:00

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


I hear what you are saying, kinda like the random image block? Except each refresh would serve not only as a preview, but as a method of changing your themes.

8
Bassman
Re: Random theme with each page refresh
  • 2006/9/22 3:14

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


That's it :)

Login

Username:
Password:

Lost Password? Register now!

Who's Online

66 user(s) are online (34 user(s) are browsing Support Forums)


Members: 0


Guests: 66


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