Captcha in news blog and comments?

Powerfull XFileSharing version

Moderator: admin

Message
Author
jolemando
Posts: 10
Joined: Sep 30, 2008 9:27 pm

Captcha in news blog and comments?

#1 Postby jolemando » Nov 25, 2008 2:34 pm

Hello
How i can add a Captcha code for news blog and comments because i recive a tons of spams daily

User avatar
PilgrimX182
Posts: 2181
Joined: Mar 22, 2006 1:39 pm
Location: UFO Lab
Contact:

#2 Postby PilgrimX182 » Nov 26, 2008 8:34 am

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: Select all

<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: Select all

my $redirect = &CommentRedirect($f->{cmt_type},$f->{cmt_ext_id});

add

Code: Select all

   if($f->{name} || $f->{email} || $f->{text})
   {
      sleep 10;
      $ses->message("F*cking bot!");
   }


Return to “XFileSharing Pro”

Who is online

Users browsing this forum: No registered users and 0 guests