use reCaptcha in place of existing captchas?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Neut
Regular
Posts: 91
Joined: Sat Jun 17, 2006 7:51 pm
Location: NL, Earth
Contact:

Post by Neut »

And a great job you have done chrisbra! A lot of people will be very very pleased with your work. It was just my opinion, but maybe I also should have pointed out, that it made me very happy that someone took the time and effort to make this plugin.

It's guys like you who make the S9Y community so valueable for ordinary users (who can not make code) like me. Thanks!
Who is General Failure, and why is he reading my disk?
chrisbra
Regular
Posts: 63
Joined: Wed Jun 08, 2005 4:12 pm

Re: use reCaptcha in place of existing captchas?

Post by chrisbra »

garvinhicking wrote: No, it does not generate an error because if the response-POST-Field is missing, the webservice is not even queried in current code.
Fixed that:

Code: Select all

--- serendipity_event_recaptcha.php	2007-05-31 02:36:00.000000000 +0200
+++ serendipity_event_recaptcha.0.6.php	2007-06-06 12:20:00.104554600 +0200
@@ -39,7 +39,7 @@
             'smarty'      => '2.6.7',
             'php'         => '4.1.0'
         ));
-        $propbag->add('version',       '0.5');
+        $propbag->add('version',       '0.6');
         $propbag->add('event_hooks',    array(
             'frontend_configure'   => true,
             'frontend_saveComment' => true,
@@ -220,13 +220,6 @@
             $links_moderate  = $this->get_config('links_moderate', 10);
             $links_reject    = $this->get_config('links_reject', 20);
 
-            if (function_exists('imagettftext') && function_exists('imagejpeg')) {
-                $max_char = 5;
-                $min_char = 3;
-                $use_gd   = true;
-            } else {
-                $max_char = $min_char = 5;
-                $use_gd   = false; }
 
             switch($event) {
                 case 'frontend_configure':
@@ -267,6 +260,9 @@
                                         return false;
                                     }
                             }
+                            else {
+                                return false;
+                           }
                         }
                     }
BTW: will my random plugin have a chance getting included into spartacus?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: use reCaptcha in place of existing captchas?

Post by garvinhicking »

Hi!

Thanks a lot, commited your fix!
BTW: will my random plugin have a chance getting included into spartacus?
Oh, sorry, I skipped that one. Will reply there.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Dawn
Regular
Posts: 69
Joined: Thu May 04, 2006 11:46 am

Post by Dawn »

First of all, thanks a lot for your great plugin. I want to support the recaptcha project too.

Today I've installed it. I'm using the following settings:
Disable Recaptchas for Authors: All Authors
Use Recaptcha: Yes
Which style to use for recaptcha: Red
Public key for recaptcha: [My public key]
Private key for recaptcha: [My private key]
Force captchas after how many days: 0
Choose logging method: DB
Logfile location: var/www/vhosts/[domainname]/httpdocs/blog/spamblock.log

Then I've deactivated the Captcha in the Spam Protect plugin (because it showed its capcha too).

Now my problem is (when I'm logged out) that anybody can post a comment without entering anything in the recaptcha field. Do you have any idea what could be the problem?

Greets and best regards,
Dawn

PS: I'm using Version 0.6 from SPARTACUS
chrisbra
Regular
Posts: 63
Joined: Wed Jun 08, 2005 4:12 pm

Post by chrisbra »

Hi,
thanks for the feedback. Looks like I overlooked something.
Anyway, uploaded an updated serendipity_event_recaptcha.php file at my website.
unpack it and put it in the folder serendipity_event_recaptcha.
You could also manually edit the file:
look for the following code:

Code: Select all

                // Captcha checking
                        if ($show_captcha && $addData['type'] == 'NORMAL') {
                            $privatekey = $this->get_config('recaptcha_priv');
                            if ($_POST["recaptcha_response_field"]) {
                                    $resp = recaptcha_check_answer($privatekey,
and replace the if($_POST... part with this one:

Code: Select all

                            if ($_POST["recaptcha_response_field"] != 1) {
Maybe Garvin can check the new file in (preferably from my site, cause I removed some more old stuff and increased the version number)? ;)

Anyway, the spamblock plugin should disable its captcha automatically, when it detects the recaptcha plugin. Looks like this does not work. I think, this is, because with release 1.1.3 the spamblock plugin does not check for the recaptcha plugin. I wrote a small patch that achieves that.
I do not know, why it only works, if the recaptcha plugin is loaded before the spamblock_plugin, may be garvin can tell us?

regards,
Christian
Dawn
Regular
Posts: 69
Joined: Thu May 04, 2006 11:46 am

Post by Dawn »

Hi Christian,

Thanks a lot for your very fast answer. I use now the version from your page and it works like a charm :) Only one little thing is wrong: When you tar-gziped the replacement file, the permissions aren't right. I had to chmod it to 644.

About the spamblock_plugin: I'm really strained about what Garvin thinks about the problem which forces us to disable the "normal captcha" function. It's not a big problem, but it would be nice if that can be fixed. I didn't used your pach because I'm waiting for the "official" update of its plugin. If its out, I would enjoy to test it.

There is only one little thing: I think there are a lot of users who don't know what recaptcha is and what they have to do (till they get the error message). I think it would make sense to display a short description what they have to do and why. Something like: "Because of a anti-spam protection you've to fill in the following two words. For further information please check out recaptcha.org [ah popup if anybody clicks on the link]".

I saw there is no german language file, can I help you if I would translate it to german?

Greets and best regards from Switzerland,
Dawn
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Thanks a lot, I uploaded your patch! As for the spamblock, yes, this is only effective for s9y versions as of 1.2, I did not backport the patch.

1.2 will be released soon, so that should not be an issue. Releasing a 1.1.x backport version just because of this seems overkill to me.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
chrisbra
Regular
Posts: 63
Joined: Wed Jun 08, 2005 4:12 pm

Post by chrisbra »

Dawn wrote: Thanks a lot for your very fast answer. I use now the version from your page and it works like a charm :) Only one little thing is wrong: When you tar-gziped the replacement file, the permissions aren't right. I had to chmod it to 644.
Oh well, it was late and I was tired...
Dawn wrote: There is only one little thing: I think there are a lot of users who don't know what recaptcha is and what they have to do (till they get the error message). I think it would make sense to display a short description what they have to do and why. Something like: "Because of a anti-spam protection you've to fill in the following two words. For further information please check out recaptcha.org [ah popup if anybody clicks on the link]".
Hmm, I see if I can accomplish that.
Dawn wrote: I saw there is no german language file, can I help you if I would translate it to german?
Sure. Go ahead. This is appreciated. I would do it myself, but did not find the time. The best would probably to send garvin a message when you are finished, so he can commit the new files to spartacus.
Dawn wrote: Greets and best regards from Switzerland,
Dawn
I hope you have better weather than we in Germany...

regards,
Christian
Dawn
Regular
Posts: 69
Joined: Thu May 04, 2006 11:46 am

Post by Dawn »

Now I found the time to translate your really great recaptcha-plugin to german. Can you please include my "language-pack" into the official version of your recaptcha-plugin and tell me when I can delete the file from my server?

You can download it here: http://www.blankster.info/download/lang_de.inc.zip

Greets and best regards,
Dawn

EDIT: I've noticed that umlauts doesn't shown correctly. Can you please tell me whats my fault? I've seen that in other language files there are ä,ö,ü in plaintext too and they work.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Thanks, committed. You were simply missing a "UTF-8" subdir with utf-8 saved version of your ISO-file.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Dawn
Regular
Posts: 69
Joined: Thu May 04, 2006 11:46 am

Post by Dawn »

Thanks for commiting. I've created the UTF-8 versions of the both language files too: http://www.blankster.info/download/UTF-8.zip

Please let me know when I can delete it from my download dir.

Greets,
Dawn

EDIT: I found a smill glitch in the translation, here are all nessesary files (including UTF-8 versions): http://www.blankster.info/download/language_files.zip
TKS
Regular
Posts: 199
Joined: Thu Nov 11, 2004 1:34 am
Location: VA, USA
Contact:

Post by TKS »

Just wanted to let everyone know how much I appreciate this plugin.

reCAPTCHA is a fantastic service and drastically reduced the amount of SPAM my blog received. After I removed trackbacks as a function, my spam all but disappeared.

Please continue this plugin...it's fantastic!
tpost
Regular
Posts: 77
Joined: Fri Sep 21, 2007 1:45 am

Post by tpost »

just installed the recaptcha plugin!

if you want this to work in combination with the "Spam Protector" plugin, you must disable captchas in Spam Protector.

now i have the power of both akismet (for trackback spam) and recaptcha (for comment spam)!
Post Reply