Winning Against Comment Spam

Also today I installed Steve Smith of OrderedList.com’s FeedBurner plugin to redirect all my feeds to FeedBurner. It was a simple setup and it’s effective, and lots easier than going and manually setting everything up. Thanks, Steve, for another great plugin to go along with your amazing Wordpress Tiger Admin theme!

Incidentally, has anyone upgraded to Wordpress 2.0 yet? I’m using a very recent version, but I haven’t upgraded to the big “2.0″ yet. I’m thinking I need to wait just a little bit longer for all the plugins to get updated and be compatible with version 2.0, huh? I should really check, because I don’t even know how they revamped the plugin system in 2.0 (or if they have revamped it).

Well, that’s all for now, folks. Toodles!

Update (Thurs. Feb 9th) — As of today, Akismet has caught 205 spam comments!

January 9th, 2006 | 3 Remarks

Blogliner 0.3

The changes probably won’t affect most users, but for those of you who’ve subscribed to blogs which have ampersands in their URL, you may have discovered that your HTML page is invalid. This is something I hadn’t thought of previously, due to the fact that I’ve never subscribed to a blog whose default location contained an ampersand (usually the default location is the domain name, for example blah.com).

Dave brought it to my attention, and thanks to him, I’ve issued this fix.

You can still download and install the plugin at the same location, so if your plugin is producing invalid HTML, it’s time to upgrade!

November 28th, 2005 | Remark

Battling Comment Spam

The preemptive measures I took were things like a simple blacklist of keywords that were almost definitely spam and moderating comments that contain three or more links. Evidently that was failing as well, so I began searching for a plugin.

Recently I found that Michael Heilemann uses Akismet as his comment spam plugin. According to him, it is his first-ever comment spam plugin and works like a charm. That’s a good enough testimony for me. I proceeded to download it, only to discover that I needed a Wordpress “API key.” What the?

It turns out, in order to use Akismet, you have to register for a blog at Wordpress.com. How do you do that? There’s no “register here” place or anything. I typed my email in the invite box and received an invitation a few hours later. That gave me the ability to register. Man, all that just to register. Good grief!

Anyway, so if you’re wondering how to get an API key, you have to get invited to Wordpress.com and sign up there, then go to your profile and copy the API key. The Akismet plugin works absolutely beautifully and has thus far caught 8 spam comments (all of which were indeed spam, by the way). I only installed it yesterday. Thanks, Akismet!

November 17th, 2005 | 9 Remarks

Blogliner 0.2

You can grab the ZIP and overwrite your older version via cut/paste.

The only thing new in this version is that you have an option to display folder titles as list item headers when you show all folders. Enjoy!

September 22nd, 2005 | Remark

He’s Speedy!

Basically this is a bug-fix update. People have had problems with using this plugin with the default Wordpress theme, so I modified the plugin so it’s compatible. It’s not pretty, but it’s compatible — you can use the thing now.

So, grab the script or the zip. Enjoy!

August 25th, 2005 | 5 Remarks

Category Spacing

You see, under normal circumstances you would need the space to be appended automatically, saving you the trouble of adding this in your theme, each time you call a category listing function. However, there are cases (such as mine) where a space is unnecessary and, if you’re as nit-picky as I am, an eye-sore. There’s a way to fix it, though, so let’s get to it.

The function I use to list my categories is called the_category(). I use it in such a way that quotes (and commas) are wrapped around each category’s name. When there’s only one category, this isn’t a problem, but with multiple categories an extra, unneeded space is inserted. Here’s what my code looks like:


&#8220;<?php the_category('&#8221;, &#8220;') ?>&#8221;

As you can see, there are no extra spaces in my code, so the problem is coming from Wordpress itself. The file is located in your wp-includes/template_categories.php file. On line 78, you should find if (0 < $i) $thelist .= $separator . ' ';. Yep, that right there is the problem. Snip it out (so it looks like if (0 < $i) $thelist .= $separator;), and you're all set.

Hopefully this'll be useful for someone. It took me awhile to decide to do it, since I figured it'd be a hassle to get into the code, but it wasn't really that difficult to locate and destroy fix the problem.

July 15th, 2005 | Remark

Wordpress Upgrade

If you’re a newsreader like myself, you know that there were some recent news about the XML-RPC vulnerability. I’m slightly confused by all that’s going on, since Matt didn’t seem too worried about it, but I figured the safest thing to do was to upgrade. Hey, and what do you know? A little weird design bug in my Tiger administration is fixed now! So, I’m happily using Wordpress 1.5.1.3 now. Please, let me know if you run into any problems on the site!

July 5th, 2005 | Remark

Show Plugins in Your Sidebar

Now, to make this thing show up in my sidebar instead of in the footer, we don’t need a great deal of modification. Step one is to go to modify the plugin in your Plugins → Plugin Editor panel. When you select the Show Plugins plugin, the source will come up in a textarea and you can make changes to the plugin’s code. Simple enough, so what’ve we got? At the very bottom, you’ll notice this:


// Use object to avoid namespace collisions
$show_plugins = new Show_Plugins();
// We want to modify the meta section
add_action('wp_footer', array(&$show_plugins, 'wp_footer'));
// There is no action hook for "start of processing",
// so we use this implicitly.
$show_plugins->start();

The problem, obviously, is that it’s running this plugin in the footer. We don’t need any of the above code, so delete it. The start() function is empty, as you may have noticed, so we won’t be needing that, either. Delete it, too. Now we’re left with two functions, wp_footer() and get_plugin_data(). Rename wp_footer() to start() to avoid any possible compatibility issues (though I doubt it would be a problem, since this function is run within a class and is therefore a private function as opposed to a public one).

Now let’s make some changes to the start() function (which we renamed from wp_footer()). The end of the function is where an echo statement is, indicating HTML output. However, we want an unordered list… Right? (If not, skip this part.) Take a look at the following code.


echo("<div class=\"show-plugins\">" .
__("Plugins: ") .
join(', ', $plugins) . "</div>");

Change the above to something more elegant, like what I’ve done below. (Note that I’m referring to the output rather than the actual PHP code when I suggest that the solution is more elegant.)


echo(' <ul class="show-plugins">'."\n".' <li>'.
join('</li>'."\n".' <li>', $plugins).
' </ul>'."\n");

You’re done modifying the plugin! Save that bugger, and go to the Presentation → Theme Editor panel. Make sure you’re modifying the correct theme (the one your site’s using, or more than one if you have a theme-switcher) and locate the file you use for your sidebar to edit it (in the default theme, Kubrick, I believe the file is named “sidebar.php”). Decide where you want this list to appear, and place the following code in that place.


<?php
$show_plugins = new Show_Plugins();
$show_plugins->start();
?>

All the above does is creates a new Show_Plugins class and calls the start() function to output the HTML we want. You can use any kind of list in any kind of format. I did exactly what I showed in this blog entry (in the sidebar, I added an H3 that says “Wordpress Plugins”), so it should work for any Wordpress blog running WP 1.5 or greater. Hope this helps some of you folks out there!

June 18th, 2005 | Remark

Where Is It?

There’s something wrong with this picture, because I know awhile ago that I saw it. I didn’t have time to install it then, but I’m really interested in getting that Wordpress plugin that automatically lists the installed/active Wordpress plugins currently being used on the site… Can someone tell me where it is? There’s no reason to reinvent the wheel.

June 17th, 2005 | Remark