1
GPboarder
Theme scheduling for holidays and pre-planned events
  • 2008/12/18 0:37

  • GPboarder

  • Friend of XOOPS

  • Posts: 248

  • Since: 2006/10/6


I would like to be able to set up a few themes to either rotate or be applied on a schedule such as different themes for different holidays.

I could set up the different looks in advance and on the dates specified, they would change.
Optimism is the mother of disappointment.

2
anderssk
Re: Theme scheduling for holidays and pre-planned events
  • 2008/12/18 14:50

  • anderssk

  • Quite a regular

  • Posts: 335

  • Since: 2006/3/21


Hmmm. Do You have access to You serveres cronjob?

I really don't know, but I thing that a cronjob can make the change in the database.

3
ghia
Re: Theme scheduling for holidays and pre-planned events
  • 2008/12/18 15:21

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


I think it is not always so easy to program the job for cron. PHP is not always an option, supposed cron itself already is.

I think less efficient, but effective is to add php code within a custom block at the top or most used page that queries for the current theme in the database and then verifies with some time periods and adjust the theme if it does not match.

You can add this to some existant block or add an image to the new block for hiding its real purpose.

4
Burning
Re: Theme scheduling for holidays and pre-planned events
  • 2008/12/18 15:25

  • Burning

  • Theme Designer

  • Posts: 1163

  • Since: 2006/8/22


hi,

I've found this code to copy in mainfile.php
$hour date('H');

if (
$hour >= && $hour <= 22) {

$xoopsConfig['theme_set'] = 'DS_blue';
}

else {
$xoopsConfig['theme_set'] = 'DS_red';
}
?>

May be a good start ?
Still learning CSS and... english

5
GPboarder
Re: Theme scheduling for holidays and pre-planned events
  • 2008/12/18 18:45

  • GPboarder

  • Friend of XOOPS

  • Posts: 248

  • Since: 2006/10/6


Seems that my idea isn't out of line, so I'll sit and wait. A cron job is beyond my skills even if I have access. I just thought it might be a useful feature.
Optimism is the mother of disappointment.

6
fakeuoutb
Re: Theme scheduling for holidays and pre-planned events
  • 2008/12/22 13:10

  • fakeuoutb

  • Just popping in

  • Posts: 4

  • Since: 2008/12/13


I saw a theme here that changed its style based on the time.

The theme is called "zephyr" - sorry, have not figured out how to select the theme with the url yet.

From what I gather the theme works on both systems - maybe you can look there?

-Aaron

Login

Who's Online

210 user(s) are online (147 user(s) are browsing Support Forums)


Members: 1


Guests: 209


AventurineLe,

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