Gallery2:Modules:recaptcha - Gallery Codex
Personal tools

Gallery2:Modules:recaptcha

From Gallery Codex

ReCaptcha

Stop Spam,

Read Books

Description

This module is an alternative for the default captcha component.

ReCaptcha G2 module uses the reCAPTCHA API for Carnegie Mellon University.

the current v0.4 is a beta !

Features

Protect your gallery for spam comment

and brute force attack on your login.

Installation

  • Download the module from: http://ilpleut.be/
  • Install it by
    • creating a directory called "recaptcha" under gallery/modules/
    • unzipping the contents of recaptcha.zip into that directory
  • Create your ReCAPTCHA key
  • Activate the module on your Gallery website under "Site Admin" -> "Plugins"
  • Configure the module by entering in the public and private key that you obtained when you created your ReCAPTCHA key.
  • If you have the "Captcha" plugin already installed and activated, deactivate it to avoid having both Captcha and ReCaptcha running at the same time.

if your gallery has multiple domain names, activate the plugins through each of them.

Version

  • v0.3, initial release
  • v0.4, this version can manage a gallery with multiple domain name & bugs fix

Requested Features for Next Version

Other Requests

Bugs

v0.4 Version 0.4 contains a couple of minor bugs which results in PHP notices filling the apache error log. The notices look like this :

[Sun Jun 01 17:04:40 2008] [error] [client 192.168.1.100] PHP Notice:  Use of undefined constant recaptcha - assumed 'recaptcha' in /var/www/html/gallery/modules/recaptcha/classes/ReCaptchaValidationPlugin.inc on line 75
[Sun Jun 01 17:04:40 2008] [error] [client 192.168.1.100] PHP Notice:  Undefined variable: error in /var/www/html/gallery/modules/recaptcha/classes/ReCaptchaValidationPlugin.inc on line 75

This is caused by an old array syntax which you can read about here : [1] and an undefined "$error" array.

Here is a patch that fixes these bugs :

59c59
<                               #$form[recaptcha-error] = $resp-> error;
---
>                               #$form['recaptcha-error'] = $resp-> error;
68a69
>                 $error = array();
75c76
<                       $form[recaptcha]=recaptcha_get_html($publickey, $error);
---
>                       $form['recaptcha']=recaptcha_get_html($publickey, $error);