| View previous topic :: View next topic |
| Author |
Message |
jolemando
Joined: 30 Sep 2008 Posts: 10
|
Posted: Nov 25, 2008 2:34 pm Post subject: Captcha in news blog and comments? |
|
|
Hello
How i can add a Captcha code for news blog and comments because i recive a tons of spams daily |
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 2109 Location: UFO Lab
|
Posted: Nov 26, 2008 8:34 am Post subject: |
|
|
It's complicated to implement it as a quick hack but u can try another unobtrusive technique called 'honey pots':
in news_details.html after <TMPL_UNLESS my_login> add:
| Code: | <input type="text" name="name" value="" style="display:none">
<input type="text" name="email" value="" style="display:none">
<Textarea name="text" style="width:100%;display:none;" rows=3></Textarea> |
Then in index.cgi after
| Code: | | my $redirect = &CommentRedirect($f->{cmt_type},$f->{cmt_ext_id}); |
add
| Code: | if($f->{name} || $f->{email} || $f->{text})
{
sleep 10;
$ses->message("F*cking bot!");
} |
|
|
| Back to top |
|
 |
|