Spam Karma Hack: Spam Leftovers
Read the update, this has been put in the latest version of Spam Karma!
One of the changes in WordPress 1.5 is that comment spam isn’t actually deleted when encountered by the built-in anti-spam measures, it is silently stored in your database and marked as spam. It won’t ever show up on your blog or in the interface, but it is there if you need it.
Spam Karma is the best 3rd party anti-spam tool for WordPress. When Spam Karma encounters obvious spam, it deletes it. Why not keep that spam in the database, marked as spam, as WordPress 1.5’s built-in anti-spam measures do? The benefits of this are twofold. First, if a legitimate comment gets caught by Spam Karma, you can easily restore it, as it is still in the database. Second, future versions of Spam Karma or WordPress may make spam decisions based on the known spam you have stored in your database, so eventually this could increase your blog’s ability to recognize spam.
The first change you need to do is in Spam Karma. In the Spam Karma plugin file (/wp-content/plugins/spam-karma.php) delete this line (it is line 2173 in SK 1.19 alpha 1):
$wpdb->query("DELETE FROM {$wpdb->comments} WHERE comment_ID = {$comment_ID} LIMIT 1;"); // kill the nasty bugger...
In its place put this:
$wpdb->query("UPDATE {$wpdb->comments} SET comment_approved = 'spam' WHERE comment_ID = {$comment_ID} LIMIT 1;"); // save as spam
Save the file and upload it to your server.
Now, for restoration of false positives, you need a way to access comments marked as “spam” from within the WordPress interface. This capability comes via an excellent plugin from ColdForged called the Paged Comment Editing Plugin. Drop this little beauty into your plugins folder and activate it. Now, by going to Manage -> Comments in the WordPress interface, you will be able to display comments marked as spam by clicking “Only Spam.” To restore a legitimate comment that was erroneously marked as spam, click “Edit Comment” and change its status to “Approved.”
Mmm… spam leftovers.
Update: I put this hack, as well as several fixes for full WordPress 1.5 compatibility into a new version of Spam Karma, and it is now available. Go get it! Note that the Cold Forged plugin is still of use for “undeleting” comments.
scripting for 6.0 browsers Weblog Tools Collection – Some Ajax Links Asymptomatic – Owen’s WordPress Hacks Spam Karma Hack: Spam Leftovers [ Tempus Fugit | T… W3Schools Online Web Tutorials Quick Online Tips: Absolutely Del.icio.us – Complete Tool Collection syndicate my del.icio.us
has released version 8 beta and all I can say is Wow!If you run Spam Karma for Wordpress, then you may want to check out the SK hack by Mark Jaquith which will allow you to restore false positives.It appears that Atheism is in a worldwide decline. Posted by admin as What Can I Say? at
[...] 2005 Spam Karma Hack: Spam Leftovers If you’re using Spam Karma here is a hack to have your spam saved in the database rather then deleted. Why? The benefits o [...]
Hey, that rocks. And I was even able to do it myself. Pulling accidentally deleted comments out of the spam karma digests was a pain. Now its easy.
I really like the paged comments plug-in. My site can sometimes get 100+ comments over night. Going back to find one that needs to be edited was a pain.
One question though, Mark. In my installation I have a plugin called “Staticize Reloaded” that is deactivated. Should that be activated?
Nah, Staticize Reloaded won’t work properly with your install without a lot of tweaks, and I don’t think the benefit is worth the trouble in your case.
Ok, I was just curious.
[...] mal daneben haut, dann kann ich irrt mlich als Spam erkannte Kommentare wiederherstellen. txfx.net Ausprobiert habe ich es noch nicht. This entry was [...]
[...] ssibilità di recupero. Purtroppo è successo anche a me, quindi credo che domani proverò questo hack. Se dovesse funzionare, farò in modo che entri a far parte della dotazion [...]
[...] CATS() Tempus Fugit | TxFx.net | Spam Karma Hack: Spam Leftovers Tempus Fugit | TxFx.net | Spam Karma Hack: Spam Leftovers Thi [...]
[...] might accidently moderate a comment into oblivion (sort of). I applied a patch outlined Mark over on Tempus Fugit which simply marks spam as spam, allowing for restoration us [...]
Mark you left a comment a couple of days ago on my site that I responded to but haven’t heard back from you. So I’ll come to this side of the pond and bug you
. You said:
To which I responded:
Help a brother out?
Hm… it seems that it is, in fact, related to the bug in 1.5. So you should probably wait until 1.5.1 before you change anything. I love a lot of the features of 1.5, but it seems like it was rather rushed, with code added the night before and all. Eh, 1.5.1 is looking good.
True dat. Which plugin was it, by the way, just so I know?
[...] s – SpamKarma Tip
SpamKarma is a WordPress plugin for comment spam control. This article offers a hack to change SpamKarma so that it marks messages it filters ou [...]
Spam Karma Now More 1.5-Like
Mark Jaquith has made Spam Karma much more WP 1.5-like, changing the handling of spam from deleting it to setting the spam flag created in 1.5. This will keep you from deleting false positives; if you catch them in your digest, you can go back and re…
Sweet work, Mark. Thanks for the assist.
This is awsome. Details about 1.5 plugins. These are difficult to find. Thanks!
[...] « A todos… Falsos positivos Hoje fiz umas alterações ao Spam Karma que aconselho vivamente e que em conjunto c [...]
[...] ma v2 Pre Alpha (Current release: 2.0 pre-alpha 9) WordPress 1.5 Options Page Plugin Bug Spam Karma Hack: Spam Leftovers Spam Karma 2 Stats v1.1 Referrer Karma v1.7 WordPr [...]
[...] ma v2 Pre Alpha (Current release: 2.0 pre-alpha 9) WordPress 1.5 Options Page Plugin Bug Spam Karma Hack: Spam Leftovers Spam Karma 2 Stats v1.1 Referrer Karma v1.7 WordPr [...]
[...] fault CSS style to have the code format in a readable way. However, I noticed that over on this blog, they had figured out a way to do it [...]
[...] que dicho plug-in realizaba. TenÃÂa pensado buscar otro pero he encontrado que realizando un pequeño hack la cosa se puede arreglar y por lo pronto he podido recuperar los pos [...]
[...] ma v2 Pre Alpha (Current release: 2.0 pre-alpha 9) WordPress 1.5 Options Page Plugin Bug Spam Karma Hack: Spam Leftovers Spam Karma 2 Stats v1.1 Referrer Karma v1.7 WordPre [...]
[...] Spam leftovers by Mark Jaquith [...]
[...] Mark Jaquith wrote all the changes that were added to 1.20. Check his post for more details. These issues have been fixed recently (v. 1.19), upgrade if you experience these issues: [...]
[...] Tempus Fugit | TxFx.net Says: March 4th, 2005 at 12:20 am [...]
[...] Spam Karma Hack: Spam Leftovers [ Tempus Fugit | TxFx.net ]Spam Karma Hack: Spam Leftovers. Read the update, this has been put in the latest version of Spam Karma! One of the changes in WordPress 1.5 is that comment spam isn t actually deleted when encountered [...]
http://shivery.bravehost.com/treasure-valley-community-college.html treasure valley community college [link=http://shivery.bravehost.com/treasure-valley-community-college.html]treasure valley community college[/link]
car news nissan
[...] Karma Hack: Spam LeftoversArchives » 2005 » March » Spam Karma Hack: Spam Leftovers Silenced Public Textual [...]