Thursday, June 4, 2009

CurrentStatus Wordpress Plugin

As you may have noticed a little box on the left sidebar of my blog home page(currently not available), which displays my current status and mood. While creating this blog, I came to know that it is good to have your current status on blog, so if you not going to post any new stuff, you can tell to your reader that to you are going to have a break now. ;)

So, I searched for related plugin, but didn't quite get the exact thing I want. Then decide to make one new on my own. This is my first try on wordpress plugin, so I want to share it here, hope folks found it usefull.

Firstly, Download the CurrentStatus plugin. Unpack it and upload the directory currentstatus to your wordpress plugin directory (wp-contents/plugin/).
Activate the plugin from admin panel of your blog. Now you can see another option added on your settings options i.e. CurrentStatus

Now you have to add a little code somewhere in your wordpress theme, where you would like to display your status. As I display on my sidebar, open sidebar.php for editing. Add the following code, where you want to display your status.

<?php echo CurrentStatus_GetCurrentStatus(); ?>

That's all, We're done now. To change the Status and Mood, click on the CurrentStatus under Settings in your admin panel. You will see admin panel of the CurrentStatus Plugin.

Enter your status in text field and choose any mood from the list of 155 different moods. You can also edit the structure of how your status will be inserted. Noted that %STATUS% is replaced by status and %MOOD% is replaced by mood selected, remaining code as it is inserted, where we add our code in sidebar.php. At the end, don't forget to hit "Update" button to apply changes. :)