Akismet repaired, enabled once again
I spent about 15 minutes tweaking Akismet tonight so that it wouldn’t do those things that piss me off. In particular, I changed the management page to show all spam messages, not just one message per spammer IP address. I also changed the sort order of the spam messages. It was displaying the newest at the top. I wanted to scroll the list chronologically. Not for any particular reason, just because that’s the way I read dated things.
While looking through the PHP, I noticed a bunch of dead code. In particular, inside the loop where it displays the currently held spam messages, it goes to through the trouble of formatting a date from the database for output:
$comment_date = mysql2date(get_settings(”date_format”) . ” @ ” . get_settings(”time_format”), $comment->comment_date);
Then it never uses the variable. Instead it calls the comment_date() function, which only gives you the date (if it’s not clear from the code above, $comment_date has the date and time). I switched the template to use $comment_date instead so I could see what time the message was posted. Again, not because I care that much but mostly because I hated seeing the information go to waste.
Before I make it sound like Akismet is the worst piece of software ever, there are two things I want to point out:
- The button in the management interface that deletes all current spam is smart. By smart, I mean it will only delete the spam that was captured up to the time when the management page was displayed. This means that if, while you’re viewing the management page, more spam comes in, it won’t be removed from the system when you push the delete all button. That’s huge! Most systems I’ve seen with an “empty” button aren’t that smart and will delete everything in the system even if you haven’t seen it. Next time you’re using a web application and you empty the trash or spam folders, realize that while you were looking at the folder more email may have come in. You will (in most webapps) have deleted those messages without ever having a chance to look at them. Akismet goes out of its way to make sure it doesn’t do that to you.
- The spam filter has been REALLY good so far. It’s caught every piece of spam I’ve seen and I haven’t seen one false positive yet. This is the main reason I keep giving Akismet second (and third) chances. It gets the hard part of this comment spam business right. Even if it can’t handle the management UI to save it’s life, that’s easy to fix. Fixing a broken spam detection algorithm is much harder.
So rejoice, Akismet is back on the job. Hopefully for good this time.
December 11th, 2005 at 1:34 am
May i ask u a question?Is this akismet a individual project or something relative to your Yahoo!mail beta?Thank you.
December 11th, 2005 at 1:43 am
Akismet is a spam blocker plugin for WordPress, the blogging software that runs this site. I use Akismet to keep people from putting spam in my comments.
December 11th, 2005 at 3:45 am
Thank you very much!;-)