Syntax Highlighting Plugins

I'm getting sick of the iG:Syntax Hiliter bug that causes it to lose its configuration every time I do anything in the Plugins section. I also hate its proprietary syntax tags ([php] or [html]) because if someday the plugin author stops maintaining it and a newer version of WordPress breaks the plugin, I'm screwed (unless I wade through the code to fix it myself).

Here is what my code looks like whenever the plugin options are reset:

And here is what I want it to look like:

It makes so much more sense to use a plugin like Snippet Highlight which uses <pre> tags with CSS classes. The code for the plugin is dead simple, so maintaining it should be easy. Speaking of maintaining it, there's a bug that causes Snippet Highlight to allow WordPress to parse HTML. I already notified the author, but if I have some free time this week I'm going to see if I can fix it.

Comment History with Get Recent Comments Plugin

My Dad and I have been going back and forth quite a bit in the comments on a recent post I wrote about Consumption. This filled up the Recent Comments list on the sidebar rather quickly and I wasn't able to see other recent comments. I realized a comment history or archive page, similar to my post archive page, would be very useful.

After looking around a bit, I found a really nice plugin by Krischan Jodies called Get Recent Comments. It has a ton of features and lots of configuration options. It has been updated as recently as last month and even supports the new widgets feature of WordPress 2.3 (it also works with older versions of WordPress as far back as 1.5).

By default, the instructions included with the plugin explain how to add recent comments to your sidebar. They don't, however, mention anything about creating a comment history page. In the instructions there is a snippet of PHP code which you are supposed to use in the sidebar.php file of your WordPress template. I thought great, I simply need to create a new page in WordPress and add that snippet of code to the page using the runPHP plugin to execute the PHP on that page. This worked, partially. At the top of my comment history was this error:

Parse error: syntax error, unexpected $end in /home/raamdev/public_html/blog/wp-content/plugins/runPHP/runPHP.php(410) : eval()’d code on line 1

I thought perhaps it was because my runPHP plugin was outdated, so I upgraded it to the latest version (currently v3.2.1). I still received the error, so I decided to play around with the snippet of PHP code provided by the Get Recent Comments plugin. I was able to modify it slightly to get rid of the error as well as output some additional text. Here is the snippet of code I use to create my new Comment History page:

<?php
if (function_exists('get_recent_comments')) {
   echo "(Showing 500 most recent comments.)";
   echo "<li><ul>".  get_recent_comments() ."</ul></li>";
}
?>

In the plugin options, I configured the plugin to group recent comments by post. This created a very readable Comment History page. After adding the ID of the new page to the exclude list in my header.php file to prevent the page from showing in the header (wp_list_pages('exclude=704&title_li=' )), I added a 'View comment history' link to the bottom of the Recent Comments list on the sidebar.

The Get Recent Comments plugin is really powerful and I'm a bit surprised that the plugin doesn't include basic instructions about how to create a comment history page. If you receive a decent amount of feedback from your visitors (in the form of comments), this is a great way to see all that feedback on a single page. If you have Trackback's and Pings enabled, this plugin can even show those.

Installed reCAPTCHA Plugin

SecureImage is nice, but the problem is that SecureImage doesn't work well with wp-cache, the cache plugin I use to insure a speedy experience for my visitors. So only a few minutes after installing SecureImage, I found another solution: reCAPTCHA.

The idea behind reCAPTCHA is very cool. It works by asking you to read two words, one which the computer generated and one that is part of a scanned page from a book, a word that the computer was not able to decipher. If you can understand the computer generated word, chances are that you'll also be able to decipher the scanned word. This helps digitize books! If you want to learn more about reCAPTCHA, I suggest you visit their site and read the "What is reCAPTCHA?" page.

I had to do a little tweaking to get it positioned properly with my custom WordPress theme, but that wasn't too bad. I'm really liking reCAPTCHA. Not only does it work with wp-cache, but it also fixes the annoying problem where your comment data would be lost if you enter the wrong information in the captcha. Of course, the captcha will be used by you, my visitors, more than anyone else, so please leave me your comments!

Installed SecureImage Plugin

A few months ago I installed the Challenge plugin, which presents a math question for anyone wanting to post a comment. It's been working great and I have not received a single spam comment... until this morning. I woke up and checked my Blackberry for new email: 49 new email messages. They were all comment notifications. Apparently a spam bot managed to get around the Challenge plugin and posted 49 spam comments throughout my blog!

After deleting the spam, I decided to install the same plugin I've installed on a couple of other WordPress blogs, SecureImage (the developers site is down and that is the best URL I can find for SecureImage). It's a simple captcha plugin that generates an image containing a string of letters. Other captcha plugins required GDLib, which I couldn't seem to find on my web server (or at least didn't bother spending much time looking for it). SecureImage requires ImageMagick, which is readily available (read: default /usr/bin/convert path worked fine). After installing a TrueTypeFont (FreeSansBold.ttf) I was up and running.