Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
5 - 4 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     
'recaptcha', // default mode image, text or recaptcha "name" => 'xoopscaptcha', // captcha name "skipmember" => true, // Skip CAPTCHA check for members "maxattempt" => 10, // Maximum attempts for each session "num_chars" => 4, // Maximum characters "rule_text" => _CAPTCHA_RULE_TEXT, "maxattempt_text" => _CAPTCHA_MAXATTEMPTS, "private_key" => 'myAPIkey' ); ?>[/code] -4- add config.recaptcha.php and fill in your public key [code] 'myAPIkey' ); ?>[/code] -5- add recaptcha.php [code]__construct($handler); } function isActive() { return true; } function render() { $image = $this->loadImage(); return $image . ''; } function loadImage() { require_once(XOOPS_ROOT_PATH . '/class/captcha/'.'recaptchalib.php'); $publickey = $this->config["public_key"]; // you got this from the signup page see config.captcha.php $ret = recaptcha_get_html($publickey); return $ret; } } ?>[/code] -6- insert [code] // Verify the ReCaptcha code } elseif ($this->config["mode"] == 'recaptcha') { require_once(XOOPS_ROOT_PATH . '/class/captcha/'.'recaptchalib.php'); $privatekey = $this->config["private_key"] ; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { $this->message[] = $resp->error; } else { $is_valid = true; } // Verify the code Captcha[/code] before[code] } elseif (!empty($_SESSION["{$sessionName}_code"])) { $func = !empty($this->config["casesensitive"]) ? "strcmp" : "strcasecmp"; $is_valid = ! $func( trim(@$_POST[$sessionName]), $_SESSION["{$sessionName}_code"] ); }[/code]in xoopscaptcha.php You need also to change: [code]$this->path_plugin = XOOPS_ROOT_PATH . "/Frameworks/captcha";[/code] to [code]$this->path_plugin = XOOPS_ROOT_PATH . '/class/captcha';[/code] in xoopscaptcha.php -7- test Edit: corrected include path and made it clearer for public and private keys. - Added correction for Frameworks relic [/quote]" />

Re: Webinstall and reCaptcha
by madDan on 2010/6/21 12:22:04

Regarding Recaptcha

Any reason it is no longer used here?

I would have thought it'd be a nice feature to have as an option as part of the install if you have already registered?

Re: Webinstall and reCaptcha
by hrac on 2010/4/5 8:02:49

Do you mean reCaptcha (by definition) is as follows:

- Only checks for the first word
- Does not check last letter of first word
Re: Webinstall and reCaptcha
by ghia on 2010/4/4 1:40:42

The number of character parameter is for the regular XOOPS captcha and is not used with reCaptcha.
Quote:
But this is not what we want.
It is what it is.
Re: Webinstall and reCaptcha
by hrac on 2010/4/3 9:41:56

Thanks. I install as instructed. It seems to be working but there are some problems:

If you keep num_chars as 4, reCaptcha looks for first 4 letters.

So I set num_chars as 24 instead of 4, but it does not solve problems.

If first word has N letters, and if you write only first N-1 letters of first word (and it does not care of second word) than you will passed by reCaptcha. But this is not what we want.
Re: Webinstall and reCaptcha
by ghia on 2010/4/3 8:42:23

See post #5

Who's Online

249 user(s) are online (188 user(s) are browsing Support Forums)


Members: 0


Guests: 249


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits