WordPress Comment Spam 2
I thought I’d cured my comment spam problem for good by installing a comment preview plugin.
But now I have trackback spam.
No plugins to help here so what to do? I don’t want to disable trackbacks/pingbacks. That way the spammers win. Besides, they are cool. I don’t want to ban any keywords either. This method is far from effective for many reasons. And I don’t want to turn on comment moderation as it discourages genuine comments.
I’d like to be able to moderate only trackbacks and pingbacks but the WordPress interface won’t let me.So I put my hacking hat on again and made this small change to the WordPress file wp-trackback.php
:
if(check_comment($author, $email, $url, $comment, $user_ip)) { $approved = 1; } else { $approved = 0; } // begin: anti-spam hack $approved = 0; // end: anti-spam hack
That should work until the next spam attack…
Comments (6)
Leave a comment
Comment: #1
I am currently beta testing some PHP code that (so far) has eradicated my trackback spam. I’ll be publishing my findings over the weekend.
Comment: #2
People always over-structuralize code. That’s way too much for just a:
$approved = (check_comment($author, $email, $url, $comment, $user_ip))? 1:0;
Anyways, you can tell I’ve been keeping in touch with all your latest. Keep it up.
Comment: #3
Three rules for the spam game:
1) you can not win. 2) you can not draw. 3) you can not leave the play.
Greetings,
Antonio, from Malaga (Spain)
Comment: #4
I am currently beta testing some PHP code that (so far) has eradicated my trackback spam, is possible stop this practice with this elemnts.
Comment: #5
Note that a couple of researchers at Rice University have released a Trackback spam blocker plugin for WordPress: their Trackback Validator Plugin checks to make sure that the sites which send you Trackback pings really do link to you, a test that most Trackback spammers fail.
Comment: #6
@Antonio: i think one has to do something about the spam. Saying we can’t win doesn’t mean we shouldn’t try.
Comments are closed.