Be Good Not Bad : Web Design :: Brian Warren : Denver, Colorado

Anti Spam Plugin

by Brian Warren on 09 January, 20062 Comments

I wrote a little plugin for Textpattern that tries to block comment spam. It doens’t do much, but it seems to work well enough. It checks against a common set of (configurable) keywords, and also checks to see how many URLs are present in the comment. If anything looks mildly suspicious, it hides the comment and marks it as needing moderation before going live. If things look very suspicious, then it marks it as spam.

If you use Textpattern, and are using version 4.0.3 or later, try it out.

Download the plugin file below. Copy and paste from it in the Admin > Plugins section of Textpattern

mrw_spamkeywords_urlcount.txt

Comments

  1. I actually have had a bit of a problem with comment spam. But Vance was having a big problem with it, so I was doing it mostly for his sake.

    § By Brian Warren at 10:02pm on January 09 2006

  2. Brandon, I was writing it (and am using it) under version 4.0.3.

    § By Brian Warren at 10:02pm on January 09 2006

  3. Ah, no worries. We’ve all done it.

    Dont worry about updating to the latest textpattern. Just back up your files and the database. Then update. If disaster strikes, then just revert. It’s easy and safe. You should be fine.

    § By Brian Warren at 10:02pm on January 09 2006

Commenting is not available in this weblog entry.

Recent Work

They Might Be Giants
http://theymightbegiants.com

They Might Be Giants Screenshot

Flickr

slideshowrss

All articles, design, code, etc are All Rights Reserved.

Icons by iconbuffet and FAMFAMFAM. Thanks!

Snook Approved!