I just whipped this up:

http://www.herod.net/dypm/

I’ve been struck by comment spam in the last few days with several spam comments awaiting moderation before I turned on akismet to block them.

This morning however, after 54 blocked comments, one got through akismet and I decided to try my hand at a WP plugin.

It turned out to be surprisingly easy, perhaps only 20 minutes work, including the learning of how wp plugins work for comments.

Credits to jroller for the inspiration. I guess we’ll find out if a spammer is interested in beating it - I’ve several ideas for improvements, but I’d rather keep them in reserve for when it gets beaten (which could be an hour from now, or a year :) )

Commentary

  1. Steven wrote on 11. Feb 2006

    And this is a test comment to make sure I didn’t muck up the latest release :)

  2. Nicholas wrote on 08. Apr 2006

    Is this plugin compatible to wp ver. 2.02? thx!! After installed nothing has changed!

  3. David Coppit wrote on 06. Feb 2007

    Hi Steven,

    FYI, the plugin works great with WP 2.1. Also, I added another global option to query even logged in users. (I’ve had trouble with people registering junk users and then spamming.) Here are the relevant details:

        var $_query_logged_in_user_too = true; // If you want to force logged in
    

    users to answer the math question as well

        // If the user is logged in, dont prompt for code
        if (!$_query_logged_in_user_too && isset($user_ID)) {
    
        // If the user is not logged in check the security code
        if ($_query_logged_in_user_too || !$user_ID  && ($comment_type === ''))
    

    {

    Email me at david@coppit.org and I’ll email you the .php file if that’s easier.

    Regards,
    David

  4. David Coppit wrote on 06. Feb 2007

    Oops.

    $queryloggedinuser_too

    should have been

    $this->queryloggedinuser_too

    everywhere.

Leave a reply