SpamBam!
Monday, 12 February 2007
Comment spam plugin
I’ve wrote a wordpress plugin that hopefully eliminates comment spam on our site as well as slows down the stupid comment spammers. The plugin is called SpamBam and it is released as freeware under the GPL license. The only drawback is that javascript is required to post a comment.
Update
The new version of SpamBam is out 1.2, it now allows WordPress comment spam protection to work alongside SpamBam.
Installation
To install the plugin simply create a folder called “spambam” in the “wp-content/plugins/” directory and place the spambam.php file in that folder. So your full path to the plugin should be “wp-content/plugins/spambam/spambam.php”. Once you have copied spambam to the folder, you need to enable it in the plugins section of the wordpress admin.
- Download the current release
- Unzip and copy the whole spambam folder to your
plugins
directory. - Enable SpamBam in the WP Admin >> Plugins section.
- Done!
Optional configuration
SpamBam requires no configuration but if you wish to alter the delay option, by default SpamBam has a 30 second delay if it detects a comment spammer, you can change this in the spambam.php file to any value desired. The constant variable SPAMBAM_SPAMMER_DELAY is used to define the seconds delay. Change the following line (if required).
define('SPAMBAM_SPAMMER_DELAY', 30);
No. 1 — February 12th, 2007 at 7:41 pm
[…] SpamBam prevents comment spam and fights against comment spammers by delaying their attempts. […]
No. 2 — February 14th, 2007 at 3:37 pm
[…] SpamBan previene el spam y ataques a los comentarios, poniendo un delay a cada comentario. […]
No. 3 — March 29th, 2007 at 4:32 pm
Hi!
Great plug in.
However, there is one small problem.
For some reason, this is overriding my comment moderation settings.
For example, I have a setting that says if a comment has two more http links, to hold it in moderation.
However, that is no longer working.
Can you please let me know what you might think is occurring?
My blog is http://www.writingwhitepapers.com/blog/
Mike
No. 4 — March 29th, 2007 at 4:38 pm
Hi Mike,
Glad you like the plugin 🙂
I shall have a look into that, my code might be overwriting the link moderation. I’ll let you know when there is an update.
Cheers
Gareth
No. 5 — March 29th, 2007 at 4:41 pm
Thanks Gareth
I must tell you, this is the only thing that seems to work with the new version of WordPress.
Everything else does not.
Hope you get that fixed.
Mike
No. 6 — May 6th, 2007 at 11:40 am
Hi,
I have installed the plugin on a large WordPress-mu site and we have some problems in a few cases. Can I contact you in via email?
Thanks,
Elad
No. 7 — May 8th, 2007 at 8:15 am
Hi Elad
Yes no problem, please email any details of problems with Spambam.
Thanks
Gareth
No. 8 — August 16th, 2007 at 4:11 pm
When I enter a comment to test it, it treats it as spam. Is that what it supposed to do? I thought it would detect bots only. Thanks.
No. 9 — August 16th, 2007 at 4:43 pm
Hi Mario javascript and cookies are required to use the script, it does work because Spambam is installed on this site and you managed to enter a comment on here.
No. 10 — September 15th, 2007 at 9:46 am
I have a problem on my website, there seems to be a conflict with another plugin ‘fgallery’. See the link for the error:
http://www.popkoorenjoy.nl/wp-content/plugins/fgallery/fim_photos.php?album=kermis-2007
What can i do?
No. 11 — September 15th, 2007 at 10:28 am
Hi Martijn
Please try and upgrade to the latest version of Spambam.
No. 12 — September 17th, 2007 at 5:25 am
I’ve come up with a similar, JavaScript-dependent method of defeating spam bots.
Basically, you start by renaming wp-comments-post.php, the script that processes the comment form. Then you hide the URL of the renamed script in an external JavaScript file. When a human user performs a specific task (such as filling out the answer to a challenge question), the URL is written back into the page and the form can be submitted.
If you don’t like challenge questions, delaying the re-writing of the URL by a few seconds should work just as well.
The post detailing this method is at
http://www.ardamis.com/2007/09/12/defeating-wordpress-comment-spam/
Good luck,
-ardamis
No. 13 — September 17th, 2007 at 8:15 am
@ardamis
That method is very flawed because as soon as the external js file is spidered your protection fails.
No. 14 — September 21st, 2007 at 4:41 am
Nice plugin for WP
this is what i am looking for
No. 15 — October 2nd, 2007 at 5:23 pm
I am testing this spambam plugin now by commenting.. i still don’t understand how this plugin works. clicking post now.
No. 16 — October 4th, 2007 at 6:48 am
I am going to check your plugin !
No. 17 — October 9th, 2007 at 8:41 am
Hi, was the problem reported in the first comment resolved?
No. 18 — October 9th, 2007 at 8:42 am
Hi selad
Yes this problem has now been resolved
No. 19 — November 1st, 2007 at 7:38 am
Nice plugin! Tanks
No. 20 — December 31st, 2007 at 12:04 am
Thx for this nice Plugin…
No. 21 — January 7th, 2008 at 11:01 pm
can you give me sql queries
No. 22 — January 9th, 2008 at 5:00 pm
Thx for this nice Plugin…
No. 23 — February 4th, 2008 at 6:54 am
hi Gareth
thanx for your plugin
but i have a small issue though
actually, it is the same problem, reported on the comment #6?, but i have both JS and cookies turned on. thats 100%, because i’ve been comenting on my blog before, and now, after a few hours it turns that i can’t do it. i’ve tried to refresh the page, but still nothing. what should i do now?
thanx
No. 24 — February 4th, 2008 at 9:15 am
@luk
A new version is in the works, it should be released soon and it will fix your problems.
Thanks
No. 25 — February 5th, 2008 at 1:27 am
thanx Gareth
also i have a small question
on my blog i have only registered users comemnting turned on. But somehow bots are sending comments also. So, i had to turn premoderation on. But i have so many premoderated messages everyday.
There is one small difference between a bot and a real person – bots does not have email field filled.
Is there any way to make a plugin, that rejects any comment without email field?
thanx
No. 26 — February 5th, 2008 at 9:29 am
@luk
You should be able to do that in your WordPress settings admin menu. The new version of spambam should hopefully eliminate your spam problem.
Thanks
No. 27 — February 15th, 2008 at 9:51 pm
Thx alot
No. 28 — March 24th, 2008 at 4:22 pm
I used Akismet and this one! Like them both! Thanx for the site!
No. 29 — October 26th, 2008 at 8:10 am
WordPress оченьхорошо защищает от Ñпама, за что ему огромное ÑпаÑибо
No. 30 — March 16th, 2009 at 2:10 pm
here was so much potential for good work there, if you could get through to the thick-skulled business types.
No. 31 — February 19th, 2010 at 11:24 pm
WordPress оченьхорошо защищает от Ñпама, за что ему огромное ÑпаÑибо