Time-sensitive content (widgets, page content) via cron or otherwise?
-
Here’s the dilemma: I have a weekly web radio show hosted on one of my sites. It only broadcasts for 3 hours each week. Currently while it’s on the air, I activate a sidebar widget which streams the show via Shoutcast. Also, the page for the show has an IRC client, so listeners can make requests, talk to each other etc. Each week after the broadcast is done I deactivate the widget and comment out the iframe.
I only want this content up for those 3 hours. Coincidentally, both the widget and chat script are loaded via iframe so I suppose I could just set up two cron jobs to change file names. For example, when the show is off, radio.php is blank. When it’s on the air, radio.php is renamed to radio_off.php and radio_on.php is renamed to radio.php. Then another cron when the show ends reverses the process.
Was just checking to see if anyone knew of a plugin that could do such things, or any php code to accomplish this instead of relying on renames via cronjobs. Thanks!
- The topic ‘Time-sensitive content (widgets, page content) via cron or otherwise?’ is closed to new replies.