The uber geeks

Plugin: Optional Comment Moderation

Written by Colin Devroe on Tuesday, June 1st, 2004 at 2:24 am. Colin is the Technology Evangelist for Viddler.com and lives with his wife and two cats in Childs, Pennsylvania.

Updated: Version 0.3 now available.

Most comment spam, at least in my experience, is posted to posts that are older than 7 days. A while back I spoke with Dunstan about this, and he helped me find a suitable solution to this problem. Back in the WP 1.0 days, I just hacked the PHP, and moved on. Nowadays, proper syntax is rampant, jeepers! :) However, I wanted to take what I had done with the hack, and put it into a 1.2 compatible WordPress Plugin architecture.

What does it do?

After a little reading, some IRCing in #wordpress, I present to you a WordPress Plugin which allows you to automatically turn comment moderation on for posts that are older than 7 days. This “duration” can be changed simply by calculating the amount of seconds in your desired length of time. This means that if someone, or something, comments on a post that is older than your desired length of time, then you will have to manually approve the comment. If the post is younger than your desired length of time, the post is approved immediately.

From what I can tell in the WordPress Wiki Docs, this plugin will not be WordPress 1.3 compatible because some of the Global Variables will be changing. Since I don’t want to do it now, and you never know what might change between now and the release of 1.3, I will not be giving a 1.3 compatible version out until 1.3 is released to the public. Sorry.

Download: Plugin: Optional Comment Moderation 0.1

If you have any trouble, just shout.

Update: Request: Alot of people are using this now. Since just last night alot of people have emailed me, IMed me, and talked to me in #wordpress and say that they love this plugin. If you are using it, or plan on doing so, be a pal and leave a comment with your URI to let me know your using it.

Previous and next posts

« Nieces and Nephews

No readable blog this week »

Related sites

Recent features

Song of the week

Sara Bareilles - Between the Lines
Sara Bareilles' "Between the Lines" is the Song of the Week for April 20 to 26.

The Deal Log