Eaden McKee home blog

phpBB Akismet Plugin/Mod

7 January, 2007

Don’t you just hate spammers? They clog up everything with a white box and a submit button. First it was blogs but forums have been taking a beating recently too. phpBB is by far the most popular free forum script and the only Akismet plugin ( or Mod as they are known ) for phpBB was abandoned.

I run a couple of forums and on one of them I have the excellent Spam Words Mod. It really is great, but Akismet seems to have their service down and working well. The nice thing about the Spam Words Mod is it queues the posts and this works perfectly if you want to hack it to work with Akismet. I don’t have the time to go through the official phpBB mod process so this is more of a hack than a mod, also, I really think it should be an optional part of PHPBB Spam Words as the integration is so simple.

How to get Akismet working with PHPBB:

First, Install the PHPBB spam words Mod – This will take about 20 minutes but once this is done adding Akismet support will only take a minute.

Now to Add Akismet support, it’s easy; First you need an Akismet API key, these are free if you’re not a commercial user, but all the details are on the Akismet website.

Then download these 2 files, remove the .txt at the end so it ends in .php and upload them to the forum/includes directory.
spamwords.php.txt – this replaces the spamwords.php that came with the Spam Words Mod
functions_akismet.php.txtEDIT the top of this file to add your API key.

Once done, test it by making a post as someone OTHER than an Admin/Mod, try making some spam and see if akismet catches it. The spam will appear in your forum admin control panel under Flagged Posts and you can delete them from there.

Note: This is a semi-rough hack, and short term only, ideally in the future this will become part of the official Spam Words mod, with more features such as Spam/Ham reporting to Akismet.

Comments

blog comments powered by Disqus