In her comment, Jen asked about the anti-spam check box feature I use.
The hack was originally written by Otsukare (who is in charge of WordPress Japan site) and fully explained in Japanese here:
WordPress Japan Wiki: Anti Spam
Well, I translated it so here you go!
In wp-comments.php on line 78, add the following check box (right before the “submit” button).
<input type="checkbox" name="spam_guard_check" value="1" /> Please Check
In wp-comments-post.php on line 41, find this :
if ( '' == $comment )
die(_LANG_WPCP_ERR_TYPE);
And add this right after it:
$spam_guard_check = $_POST["spam_guard_check"];
if(!$spam_guard_check){
die("Please check here before posting your comment.");
}
(You can modify the messages if you want)
It’s been working wonderfully and I haven’t got any spam comment for a couple of weeks (as of 2/11/05, I’ve got only one spam comment so far. 1 in 10 days- not bad, right?).
It’ll only take 3 minutes to set it up. Well worth a try!
update: 🙁 I am starting to get some spams even with this hack. I still believe it’s better to have than not to, though..
Another Update: I upgraded this blog to WP1.5, and got rid of this check box hack. Instead, I am trying out Bad Behavior plugin… Thanks for your comment, Niklas!!
Comments
11 responses to “Anti-Spam Comment Check Box”
hi nao! thanks for taking the time to e-mail me. i really appreciate it!
so after much frustration i found out that it was a bug from the previous version of wp that was giving the weird /smilies directory link. i changed my site-url through phpmyadmin and it worked!
the comment filter checkbox is such a great idea. very easy to install! i’m just so sick of spam comments, lol.
thanks again!!
~jen
hi! this is a great idea! I’ve implemented it, but when i checked my blog the next day, there’s still comment spam. Any idea why? Thanks in advance!!
Still getting spams? Hmm…
I still haven’t got any yet,(2/8/05 update: I got the first one since this implementation! 🙁 ) and the only reason I can think of why it’s not working for you is maybe the spammer is posting comments mannualy?Sorry I can’t help you much…
p.s. if you are getting trackback spams, try this:
Trackback And Pingback Moderation
I’m trying to manage Japanese and English posts on WordPress for my official blog. What I did was to create two seperate folders called “en” and “ja” and installed WordPress Official to “en” folder, and planning to install Multilingual Edition to “ja” folder on my site.
Would you mind if you share a bit of your experience with WordPress? It would be great, if you could tell me the structure of your site, to understand the best way to manage both languages.
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)
Hi Takuya,
What I did here is the same as you explained. I installed two separate WordPress, one under http://detlog.org/ and the other under the subdomain http://blog.detlog.org/. (I used Multilingual version for both of them)
You’ll also need separate sets of SQL tables for each blog.
That’s the only solution I could think of when I started, but I just found this WordPress “multiblog” project:
http://mu.wordpress.org/
http://wordpress.org/support/topic.php?id17728
This could be an alternative to what we’ve been doing.
Here’s an URL to a fairly new anti-spam plug-in for WordPress.: http://www.ioerror.us/software/bad-behavior
Check it out. It seems very thought-through, and the developer is good at listening to people who have good ideas.
Thanks Niklas!
I am giving it a try…
I hope this is the ONE!
I appreciate that you keep this blog going and allow comments. To me feedback is an interesting part of a blog.
Feedback and no spam.. Blog on!
[…] de mettre des cases à cocher avec des noms à la con. Le code est supra-simple (merci à deux trois gens qui utilisent la même grosso-modo la même […]