akismet
As I mentioned earlier, I've been working on an implementation of the Akismet spam filter for ATutor. This is now ready for download. The spam filter utilises Wordpress' Akismet spam prevention, and as such requires an Akismet API key to work properly. (My original post has some discussion on how to aquire this, including some correspondence with Akismet regarding pricing.) This means that ATutor will need to check with the Akismet servers whenever a new post is made to ensure it is legit. Should the Akismet servers be down, or the API key be invalid, or the Akismet servers return any other error, the post will be marked as not spam and allowed through the filter.
To install the spam filter, both the module and the patch needs to be installed. The patch will make some alterations to the following files:
- /include/vitals.inc.php
- /forum/new_thread.php
- /forum/delete_thread.php
- /forum/move_thread.php
The spam filter is only implemented for the forum as of yet. However, implementing it for other input forms is a rather small job and patches for this could easily be assembled following the example in forum/new_thread.php.
All new forum posts are now stored in a log that can be accessed from the administrator panel. Spam posts will be marked as such, and the administrator will have the option to clear these posts, inserting them into the forum and telling Akismet that these posts are legit (ham). The administrator also has the option to mark clean posts as spam, should which will remove them from the forum and tell Akismet that these posts are spam.
Developers, please note that the code that handles insertions of posts that are caught in the filter and are later cleared of their spam status is somewhat tangled. This is due to the way the forums handle insertions (and updates), especially with respect to post counts. If the forums in the future are rewritten/improved this code will need to be revisited.

ATutor and canned meat products sold by the Hormel Foods Corporation since 1937
July 2, 2008 - 10:15 — gorzanSo, we've been worried about spam for a while now. Admittedly, ATutor is no phpBB, but it does have forum functionality as well as other user input areas. ATutor user account registration has no Captcha and no email confirmation, so when the spammers do decide to hit, they won't have to work very hard to ruin the system. Making restrictions on the registration process isn't really compatible with the way we wish to use ATutor either, so we figured the best thing to do is install a proper spam filter. Which is what I'm working on this week.
Having checked around a bit, we decided to use Akismet, which is the spam filter developed for WordPress. Vegard has been using it on his wordpress account for a while and says it seems to work very well, and having checked the stats and read the reviews I'm inclined to believe him. There are already Akismet implementations for a number of systems, so what I'm doing is just adapting the PHP 4 Akismet class for ATutor.
What the Akismet plugin does, really, is just provide a function which checks your comment against the Akismet servers and returns true or false (spam or not spam). Since all spam filters inevitably are wrong every now and then, however, I also have to store all comments in a backlog so that the administrator can override Akismet's decision and allow a comment that has been marked as spam (while also letting the Akismet servers know that this isn't spam, and by doing so improving the filter) or marking a spam comment that found its way through the filter as spam (again letting the Akismet servers know).
I'm implementing this as a ATutor Module, (although it'll also require a patch to be run, I'll post the installation instructions when I'm done) and using it will require an Akismet API Key, which is free if you use Akismet for your personal blog, but not for commercial use. The Akismet payment plan is based on Akismet being used as a spam filter in a blog and as such doesn't really apply very well to ATutor, so we're currently trying to work out a good solution with the Akismet people. As most ATutor users will most likely find themselves in a similar situation, I'll make sure to post the results of this dialogue here as well as the module.
I'll post everything here when it's done.