Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Spam protection with image confirmation code (captcha)
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
 
Reply to topic    Forum Index » Additional Downloads View previous topic
View next topic
Spam protection with image confirmation code (captcha)
Author Message
scottdallas



Joined: 04 May 2006
Posts: 1802
Location: US

Post Reply with quote
I had to change my path in captcha.php to:



@include 'cutenews/plugins/captcha/php-captcha.inc.php';



The / before the rest of the URL was breaking it.

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Tue Jan 23, 2007 5:18 pm View user's profile Send private message Visit poster's website AIM Address
Guest








Please login to hide the ads.

FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2668
Location: Germany

Post Reply with quote
PepeT wrote:
EDIT : Actually i solved that one out, but now it won't accept the numbers and release the comment. So where's the problem?




As I expected, the second include on the left causes this problem. Do the following to fix it:



1. Open plugins/captcha.php and change this:

Code:
function check_image($allow) {



   if (isset($_POST['code'])) {

      if (!PhpCaptcha::Validate($_POST['code'])) {

      echo("<div style=\"text-align: center;\">Please enter the numbers from the image.<br /><a href=\"javascript:history.go(-1)\">go back</a></div>");

      $allow = false;

      }

   }



return ($allow ? true : false);



}




to this:

Code:
function check_image($allow) {

global $captcha;



if($captcha){

   if (isset($_POST['code'])) {

      if (!PhpCaptcha::Validate($_POST['code'])) {

      echo("<div style=\"text-align: center;\">Please enter the numbers from the image.<br /><a href=\"javascript:history.go(-1)\">go back</a></div>");

      $allow = false;

      }

   }

}



return ($allow ? true : false);



}




2. Add $captcha = true; to your main include code (not the one on the left).
Tue Jan 23, 2007 11:48 pm View user's profile Send private message
PepeT



Joined: 11 Nov 2005
Posts: 80
Location: Finland

Post Reply with quote
Alrighty, I'll have to test this out later today. Thanks.
Wed Jan 24, 2007 9:44 am View user's profile Send private message
PJR



Joined: 17 Oct 2005
Posts: 161
Location: Czech republic

Post Reply with quote
OK, I really don't know Smile, so I'm asking once more:



What shall I do with this error?



Quote:
Fatal error: Undefined class name 'phpcaptcha' in /mnt/data/accounts/p/punkrock/data/www/administrace/plugins/captcha.php on line 48

Tue Jan 30, 2007 5:33 pm View user's profile Send private message
Servantez



Joined: 19 Feb 2007
Posts: 1

Post Reply with quote
My friend came up with a solution (multiple includes)



instead of:

@include 'cutenews/plugins/captcha/php-captcha.inc.php';



use a path starting directly from 'plugins'

@include 'plugins/captcha/php-captcha.inc.php';





Hope it helps... Wink
Mon Feb 19, 2007 6:32 pm View user's profile Send private message
WellWho



Joined: 09 Jan 2007
Posts: 62

Post Reply with quote
I've installed this plugin and it's working great, but sometimes show one of the letters in white color which is difficult to see.
Wed Feb 21, 2007 11:53 pm View user's profile Send private message Visit poster's website
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2668
Location: Germany

Post Reply with quote
Open plugins/catpcha/php-captcha.inc.php and find this:

Code:
if ($this->bUseColour) {

            $iTextColour = imagecolorallocate($this->oImage, rand(0, 100), rand(0, 100), rand(0, 100));




Change it to something like this and see what happens:

Code:
if ($this->bUseColour) {

            $iTextColour = imagecolorallocate($this->oImage, rand(20, 100), rand(20, 100), rand(20, 100));

Thu Feb 22, 2007 12:07 am View user's profile Send private message
WellWho



Joined: 09 Jan 2007
Posts: 62

Post Reply with quote
Still last letter is white.
Thu Feb 22, 2007 12:28 am View user's profile Send private message Visit poster's website
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2668
Location: Germany

Post Reply with quote
Then change the 100 to 80 or whatever.
Thu Feb 22, 2007 12:39 am View user's profile Send private message
WellWho



Joined: 09 Jan 2007
Posts: 62

Post Reply with quote
It's not problem in that, i changed all brackets to (20, 80) and still last letter is white. You can chek site and try to comment.
Thu Feb 22, 2007 3:41 pm View user's profile Send private message Visit poster's website
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2668
Location: Germany

Post Reply with quote
Change everything to this:

Code:
if ($this->bUseColour) {

            $iTextColour = imagecolorallocate($this->oImage, 20, 40, 60);

Thu Feb 22, 2007 3:51 pm View user's profile Send private message
WellWho



Joined: 09 Jan 2007
Posts: 62

Post Reply with quote
It works! Smile
Thu Feb 22, 2007 4:16 pm View user's profile Send private message Visit poster's website
Jorioz



Joined: 15 Aug 2006
Posts: 31
Location: Holland

Post Reply with quote
I thought this should work, but it is definitely not!



Check this out: http://www.musicincontrol.nl/index.php/2007/03/15/above-beyond-trance-around-the-world-155-armin-guest-mix.html



I installed this script the 2nd of april, early in the morning. As you can see i'm still having that g*dd*m spam! Sad Sad Sad

_________________
Take a look at my CuteNews.RU based website:

MUSIC IN CONTROL . NL
Wed Apr 04, 2007 10:15 am View user's profile Send private message Visit poster's website
scottdallas



Joined: 04 May 2006
Posts: 1802
Location: US

Post Reply with quote
It works but it doesn't stop every spam. I have found quite an effective way of stopping spam.



Read this:



http://english.cutenews.ru/forum/removing-spam-%29-t1230.html



You may find that {captcha} isn't necessary anymore after doing the steps in the link above.

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Wed Apr 04, 2007 1:23 pm View user's profile Send private message Visit poster's website AIM Address
Jorioz



Joined: 15 Aug 2006
Posts: 31
Location: Holland

Post Reply with quote
true Smile

i'll give it a try

_________________
Take a look at my CuteNews.RU based website:

MUSIC IN CONTROL . NL
Wed Apr 04, 2007 4:31 pm View user's profile Send private message Visit poster's website
Display posts from previous:    
Reply to topic    Forum Index » Additional Downloads All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 4 of 7

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.