« Critical Chain Project Management | Main | XM Radio »

March 04, 2004

Moveable Type Blog Spamming

I HATE blog spamming! But I love moveabletype. They are about to release a new version that might stop some blog spammers. However, anything that they do is going to be only partly successful. The reason is that because they are a popular software, the blog spammers will figure out a way around their techniques to stop them.

I have a temporary solution that I am trying. I've simply added a checkbox to all of my comment forms that the user must check in order to get their comment posted. This is very simple and could be defeated if spammers were onto it on a large scale. However, my site is not that important for them to figure out what I'm doing. And, you could easily take this a little farther and have them type a word or something into an input box. So, I've included my code changes and I'll update you on my success with this technique.

Add the following code (or something like it) to your Comments.pm file (under lib/MT/App. Please make sure you backup the original first.

Before the section of code that checks to make sure there is text in the comment box, which looks like this:

    if (!$q->param('text')) {
        return $app->handle_error($app->translate("Comment text is required."));
    }

put this code:

    if (!$q->param('box')) {
        return $app->handle_error($app->translate("In order to post comments on this website, you must indicate that you are not a spam-bot or other automated process."));
    }

Then, add the following to all of your comment containing templates (includes Individual Entry Archive, Comment Listing Template, Comment Preview Template and Comment Error Template) :

After this html:

<label for="text">Comments:</label><br />
<textarea tabindex="4" id="text" name="text" rows="10" cols="50"></textarea><br /><br />

Place this code:

<input type="checkbox" id="box" name="box"></input><label for="box">I am not a spam-bot or other automated process, please post my comment!</label><br /><br />


That should do it...Someone now has to check that box in order to post a comment. It should work for a little while, then I'll make it a little harder when I start to get spam comments again. Why don't you try to post a comment and see?

Posted by Chris at March 4, 2004 08:07 AM

Subscribe to this entry:   Email address:   

Trackback Pings

TrackBack URL for this entry:
http://www.christulino.com/cgi-bin/mt/mt-tb.cgi/100

Comments

I'm not a spam-bot, I just wanted to tell you what a great time I had in New Orleans after beating you in fantasy football this year!

PS How are the Wife and little one?

Posted by: Jim at March 17, 2004 04:54 PM

Simple and elegant. I like it!
Perhaps if this stops working I'll implement a Captcha based anti-spam system. . .

See:
http://cpan.uwinnipeg.ca/htdocs/Authen-Captcha/Authen/Captcha.html

Until then, simpler is better.

Posted by: Dan Collis Puro at May 21, 2004 03:19 PM