Diary of a Network Geek

The trials and tribulations of a Certified Novell Engineer who's been stranded in Houston, Texas.

5/26/2006

MoonPhase Plugin for WordPress

Filed under: — Posted by the Network Geek during the Hour of the Sheep which is in the early afternoon or 2:10 pm for you boring, normal people.
The moon is a New Moon

MoonPhase Plugin

Dead simple plugin for WordPress. Just copy the plugin to your plugin directory, copy the “moonimg” directory and all images therein to your “wp-includes/images/”directory, go to the Plugin Management page, turn the plugin on and add the tags to your templates.
To add the moonphase to all your posts, add < ?php moonphase($post->ID) ?> to the Main template somewhere under the “post” section. To add the current moonphase to the sidebar, add < ?php get_moonphase(); ?> to the appropriate section of your sidebar template. Yes, it really is that easy.

The plugin was tested with both WordPress versions through 3.0, but I make no promises. Hey, it’s free, so what do you want from me? If, you find a bug, however, and can identify it, like Howard Edin from howardedin.com did, let me know and I’ll do my best to correct it.
Enjoy it and good luck!

UPDATE:  So, after letting this languish for an embarrassingly long time, I updated some code.  There have been pretty significant changes to some of the calls to WordPress that I’d used to make this all run and I’d made at least one logic error that kicked out all kinds of errors and made at least one part of the plugin not work quite the way it was intended.  I’m afraid that at least one person complained, in an indirect and passive-agressive way, about that and, I believe, incorrectly thought it was a time zone error.  In any case, that’s been corrected, too.
I apologize for taking so long to get to this, but, well, I’ve been busy.  You know, out in the “server room with the big, blue ceiling”?  Also, with dating.  I may be a hardcore network geek, but dating and nookie always take precedence over correcting personal code that generates no money.
In any case, it’s been updated.  I’m going to enable comments again on this page so you can let me know if you find any errors, but this should now work with WordPress all the way through version 3.5, under which is has been tested.  (Well, at least it was tested against the 3.5 beta code, but it should be close enough.)
Enjoy!

Download the Moon Phase Plugin.

If you liked this plugin and would like to contribute to the author’s financial and mental state, feel free to make a donation!


Powered by WordPress
Any links to sites selling any reviewed item, including but not limited to Amazon, may be affiliate links which will pay me some tiny bit of money if used to purchase the item, but this site does no paid reviews and all opinions are my own.