Download my World Clock Plugin
-
Not sure if anyone has done this before, but I’m pretty new to PHP and WordPress so figured I’d create my first plugin as a little excersise for my girlfriend’s WordPress blog.
You can see an example of it here : http://www.jenniferlondin.com/blog
Basically it adds a clock to your site, which you can adjust the timezone for depending on where you live.
It adds an additional administration panel under options in which you can set your time zone, and a location ( if you wish ) of where you are, and this then stores those as values into a pre-created(*) table in your wp_database, then simply renders it out to screen passing those variables back for use anywhere in your blog templates.
It’s very bespoke for my girlfriend but wouldn’t take much to hack it for your own needs .
(*) NOTE : The table needs to be created first in order for this to work. I wasn’t sure how to script that so I manually created it with MySQL administration. I’ve added the necessary MySQL script in the comments on this plugin.
The clock graphic is provided by http://www.worldtimeserver.com/
See what you think, not sure if it’s of use, but that I’d offer it out there incase 😀
Download it here :
http://www.tonycollings.com/downloads/whereami.php
Upload to your plugins directory & activate. ( Make sure you created the database first ! or you’ll get lots of nice INSERT and UPDATE errors 😀 )
The topic ‘Download my World Clock Plugin’ is closed to new replies.