Spam Karma 2 Plugin for Automatic Deletion
in the early afternoon on Sunday, the 6th of July 2008 by Chad
Lots of folks running WordPress run the excellent Spam Karma 2 plugin from Dr Dave. I’ve been running it for years and it just works great.
The one issue I have is that for comments with a karma score below anything possibly not spam, I don’t even want saved in the first place. Most spam scores well below -50 and I don’t even want to see it.
So… I wrote a plugin!!!
Simply download here, saving as sk2_death_plugin.php. (not phps, watch that extension!)
Upload to your /wp-content/plugins/SK2/sk2_plugins/ folder on your WordPress website.
Open your WordPress admin panel, and go to Manage / Spam Karma 2 / General Settings. Scroll down to the Treatment Plugins Settings, and set the minimum value that you’d accept as even worth checking. It defaults to -25 which is pretty unlikely to ever get a false positive in my opinion.
![]()
Anyways, this is unsupported of course, use at own risk, etc. I don’t have logging quite working right yet but any improvements you have just let me know.
![[del.icio.us]](http://pirate-king.com/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://pirate-king.com/wp-content/plugins/bookmarkify/digg.png)
![[Facebook]](http://pirate-king.com/wp-content/plugins/bookmarkify/facebook.png)
![[MySpace]](http://pirate-king.com/wp-content/plugins/bookmarkify/myspace.png)
![[Sphere]](http://pirate-king.com/wp-content/plugins/bookmarkify/sphere.png)
![[StumbleUpon]](http://pirate-king.com/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Technorati]](http://pirate-king.com/wp-content/plugins/bookmarkify/technorati.png)
![[Windows Live]](http://pirate-king.com/wp-content/plugins/bookmarkify/windowslive.png)
![[Email]](http://pirate-king.com/wp-content/plugins/bookmarkify/email.png)

July 6th, 2008 at 2:55 pm
this is a test of the antispam system!
July 6th, 2008 at 4:00 pm
Ooooooh!
I’ve had the exact same gripe with SK2.
Consider me a Beta User.
July 6th, 2008 at 4:03 pm
Sweet…
In my limited testing today it seems to work just peachy.
I added the BB style URL:
[ u r l =
to my blacklist in Spam Karma, with a weight of 1000.
Used that in testing and it would throw responses with it right over the limit.
But yeah, even though I don’t even really ever see the spam, it kind of offends me that they show up at all!
July 6th, 2008 at 4:18 pm
What type of Blacklist do you put the [url = string under?
The only one that kind of makes sense is Regex Content Blacklist.
July 6th, 2008 at 4:20 pm
That’s the one. I used as the string:
/\[url\=/
That’s the “proper” regex to use I guess…
July 7th, 2008 at 1:57 pm
Any idea what would cause this error:
Warning: Cannot modify header information - headers already sent by (output started at /usr/home/jrgilby/public_html/wp-content/plugins/SK2/sk2_plugins/sk2_death_plugin.php:30) in /usr/home/jrgilby/public_html/wp-includes/pluggable.php on line 694
It appears to the user as a commnet is posted. The comment does post, but the user has no idea until they refresh the page.
July 7th, 2008 at 3:05 pm
looks like there’s extra spaces or line feeds outside the < ?php and ?> tags.
I hate that…
But if you go to the Spam Karma general settings, do you see the control panel for it? Or does it error there also?
July 7th, 2008 at 3:37 pm
Yes. That looks like it was it.
ONE SPACE after the close tag.
I hate that too.
July 16th, 2008 at 11:01 pm
FYI: I just got this error posting a comment here:
Regex ID: 17563 (*\\[url\\=*) appears to be an invalid regex string! Please fix it in the Blacklist control panel.
Warning: Cannot modify header information - headers already sent by (output started at /home/pking/public_html/wp-content/plugins/SK2/sk2_util_class.php:208) in /home/pking/public_html/wp-comments-post.php on line 75
Warning: Cannot modify header information - headers already sent by (output started at /home/pking/public_html/wp-content/plugins/SK2/sk2_util_class.php:208) in /home/pking/public_html/wp-comments-post.php on line 76
Warning: Cannot modify header information - headers already sent by (output started at /home/pking/public_html/wp-content/plugins/SK2/sk2_util_class.php:208) in /home/pking/public_html/wp-comments-post.php on line 77
Warning: Cannot modify header information - headers already sent by (output started at /home/pking/public_html/wp-content/plugins/SK2/sk2_util_class.php:208) in /home/pking/public_html/wp-includes/pluggable.php on line 770
July 17th, 2008 at 8:57 am
yeah, it was doing something weird with my [url=blah] detection code
July 18th, 2008 at 1:26 pm
OK, for all those interested, the Spam Karma 2 content blacklist regex to block the URL spammers:
/ \ [ u r l = /
Looks just like that only with no spaces. I give it a value of 1000 just to make sure it gets kicked.
BTW, new version is out that only runs when the comment is posted and is skipped during other runs.