PHP Function: Time Based Background
Just like the time changing backgrounds that appear when using themes on iGoogle this simple function dynamically inserts css into the head of any web page to change the background and/or background image of an html tag, class or id based on the time of the day. One function call gets the job done with configuration variables to control server time offset (so the time is set to your local time) and the name of the tag, class or id you wish to add the background to.There are currently 6 times phases supported: midnight, dawn, morning, afternoon, dusk and evening. The zip file contains a working demo with images. The demo can also be accessed here.
Technorati, Stumble it!, Digg, de.licio.us, Google, Twitter, Yahoo, reddit.
» Comments
November 11, 2007
WOOOW
December 7, 2007
Thanks for the code. You do need a closing in your index.php file, though.
December 7, 2007
no worries. the index included in the zip is just a quick example.
March 19, 2009
i cant figure out your php plz help me ,….
plz make it more detailed…
April 27, 2009
hello, nice script but I’d like to know if it is usable for Joomla Templates. I tried to apply to my joomla site but it didn’t respond.
Thx.