Archive for the tag 'Plugin'

No Browse Happy Plugin

There was a thread in the WordPress hackers mailing (wp-hackers) list today discussing about the browse happy logo which is displayed in the footer of WordPress admin screens, when a user views the admin pages using Internet Explorer.

There were lot of arguments for and against the removal of this logo, at least for IE7. I found that there was even a ticket created in trac (WordPress public bug reporting database) for removing it, which was closed by Matt as wontfix. I personally felt it was a very minor thing to argue about and I neither agree nor disagree in removing it.

Someone in the thread suggested that we can create a Plugin which could output some CSS to hide the logo, which let me to create a very small (probably useless) Plugin called No Browse Happy Plugin. This is similar to the No Howdy Plugin by Ozh, very useless in my point of view but might matter a lot for someone.

If you look at the source code you could find that it is nothing fancy but just an echo statement which prints the following CSS code in the header.

#bh {
display: none;
}

In short, I just wasted two minutes to stop someone from wasting hours in arguing about something which is useless (at least in my point of view). :-)

Reverse the order of comments without editing theme

I was looking for a way to reverse the order in which comments are displayed in a WordPress blog for one of my projects. After a bit of Googling I found a Plugin called Reverse Order Comments. A quick look into the source code revealed that it was rewriting the comment template and you need to edit the theme to make it work. My instinct told me that it would be easy to accomplish it using the array_reverse comment in PHP.

I followed my instinct and tried to see whether it is possible to do it in a simple way. In the end I accomplished it with less than 10 lines of code and more importantly without the need to edit the theme files. Another instance of the KISS principle in action ;-)

I packed it as a Plugin so that you can just drop it into your plugins directory, activate it and then forget about it. It is called Simple Reverse Comments and you can download it from my Plugins page.

WordPress 2.1 and custom field plugin Gotcha

I found a strange behavior in my blog after my recent upgrade to WordPress 2.1. Every time some one posts a comment the technorati tags for that particular posts were disappearing. After some debugging I found that it was caused by a plugin which I was using and not by WordPress itself.

And a little bit of searching let me to a thread in WordPress support forum, where some other people also were facing the same problem. With a little more digging I found an excellent explanation by Mark, where he describes the exact problem and also the solution. I am not going to explain the problem here because, Mark has already explained it in a very simple and precise manner and I don’t think I can do anything better.

The plugin which I was using to store my technorati tags was Bunny’s Technorati tags (to which I migrated some time back from Simple tags). I incorporated Mark’s fix and re-deployed the plugin and everything is working fine now.

I am going to update the plugin’s page at wp-plugin.org and meanwhile you can also bunny-tags.zip. Please note that this plugin was developed by Stephanie Booth and the full credit goes to her and I have just updated it to work with WordPress 2.1.

Let me know if you still face any issue with it. Happy upgrading ;-)

Migrated from Simple Tags to Bunny Technorati Tags

Both Simple Tags and Bunny Technorati Tags are nothing but WordPress Plugins, in case if you are wondering what the hell I am taking about. ;)

Both the above plug-ins lets you to insert Technorati tags in your blog posts. I have been using Simple Tags for quite some time but was not happy with its working. It stores the technorati tags with the blog post itself inside [tags][/tags] tags and they can be displayed only at the end of the posts. I found this very limiting because it was not suiting my recent design change. I wanted to display these technorati tags on a separate box on top of every post, but with Simple Tags this will not be possible.

So I searched for other plug-ins and found that Bunny Technorati Tags suits my needs. But then I have to remove the [tags][/tags] from every posts and include them inside a custom field.

Instead of doing it manually I wrote a PHP script to make the necessary changes to the table. If any one of you is also planning to do the same migration then you can grab the script and save some hours of copy pasting.

Now, after the migration I am able to place the technorati tags in the correct place where I wanted it to be displayed.