Peter Bargh

words pictures sounds
October 29th, 2007 by Peter Bargh

Spam in PunBB forums

Spam…it’s a pain in the neck. My email in-box is full of it daily. Long messages about Viagra (or v.i.a.g.r.a!), dick enlargers, porn films and special wonder drugs. So it really got my livid when I installed PunBB on my site as a forum. Within weeks I was getting dozens of the same spam messages, along with video clips of porn. Well okay I’m not against watching the odd film or two, but I’m not about to promote it on my site! So I went into my admin section daily and deleted the posts and put the urls on the banned list. After a week this becomes frustrating. So I searched for an alternative.

First thing I found was some PHP code to fix the proble. Simple just find the file post.php and add some provided code in the area suggested. I hadn’t a clue what the code was about to do. But several people had said it worked for them. So I did it. The eager to see if it worked I posted a test message on my forums. Error on line 170! Doh…good job I backed up my original file…which was quickly returned.

Back to research…after several false journeys I found Akismet on a PunBB resource page. Here was a script written for WordPress that has been modified for PunBB and once installed works well…so far!

To install click on the download here link below the forum poster’s PS post (or here) which takes you to the zipped folder akismet_punbb.zip. Download and unzip the folder and follow the read me instructions.

You need a WordPress account as you have to modify the supplied PHP code that you add to the post.php file by changing the word AKISMETAPIKEY to your WordPress Akismet api key.

Now when I log in there’s an Akismet plug in in the admin section of my forum. I simply click on that to see the spam that’s been blocked – six in one day! And then click delete or accept! Gone for good and the public don’t see a thing…not that I have any visitors to the forums so far. But when I do it will be perfect!

Comments

One Response to “Spam in PunBB forums”
  1. Just to update that this is still working really well. I get a porn post on a daily basis and can delete without the world seeing it. Nice one Akismet.

Leave a Reply

Your email address will not be published. Required fields are marked *