Price: Free
More From: Raymond Benc
phpFox reCAPTCHA Plug-in
This modification will replace the default phpFox Captcha found on the "sign up" and "contact us" form.
What is reCAPTCHA?
Quote:
A CAPTCHA is a program that can tell whether its user is a human or a computer. You've probably seen them — colorful images with distorted text at the bottom of Web registration forms. CAPTCHAs are used by many websites to prevent abuse from "bots," or automated programs usually written to generate spam. No computer program can read distorted text as well as humans can, so bots cannot navigate sites protected by CAPTCHAs.
Learn more about reCAPTCHA: http://recaptcha.net/learnmore.html A CAPTCHA is a program that can tell whether its user is a human or a computer. You've probably seen them — colorful images with distorted text at the bottom of Web registration forms. CAPTCHAs are used by many websites to prevent abuse from "bots," or automated programs usually written to generate spam. No computer program can read distorted text as well as humans can, so bots cannot navigate sites protected by CAPTCHAs.
Live Demo: http://sandbox.phpfox.com/natio/signup/
:: Steps to Install ::
1) Sign up at ReCaptcha for a free account: http://recaptcha.net/whyrecaptcha.html
Once you have signed up make sure to add a site so you get your API keys which will be needed later when configuring the script.
2) Log into your phpFox Admin CP and navigate to:
Quote:
Options >> Edit Options >> Signup
Set the following option to "No":Options >> Edit Options >> Signup
Quote:
Turn on Image Verification on sign up
3) Download the ZIP attachment and Unzip to your computer.Turn on Image Verification on sign up
4) Open the file "plugins/recaptcha/config.php.new" with your favorite text editor.
Look for:
PHP:
ADD_YOUR_PUBLIC_KEY_HERE
Next look for:
PHP:
ADD_YOUR_PRIVATE_KEY_HERE
Save and close the file.
5) Rename the file:
Quote:
plugins/recaptcha/config.php.new
toplugins/recaptcha/config.php.new
Quote:
plugins/recaptcha/config.php
6) Upload the folder "plugins/" to your phpFox root directory.plugins/recaptcha/config.php
7) On your server open the file: /design/templates/default/_modules/Account/Signup.html
Look for:
HTML:
{if $bIsProtImage}
<br />
<table style="width:100%;" cellpadding="4" class="border2">HTML:
{if function_exists('recaptcha_get_html')}
<table style="width:100%;" cellpadding="4" class="border2">
<tr>
<td style="width:35%; text-align:right; font-size:9pt; vertical-align:top;">{language text="verification_code"}:</td>
<td style="font-size:9pt; vertical-align:top;">{php} echo recaptcha_get_html(App::getParam('sPublicKey')); {/php}</td>
</tr>
</table>
{/if}Look for:
PHP:
if ($bIsProtImage && !$oSrvSec->checkProtectionCode($oReq->get('sProtCode')))
PHP:
if (function_exists('recaptcha_check_answer'))
{
$oResp = recaptcha_check_answer(App::getParam('sPrivateKey'), $_SERVER["REMOTE_ADDR"], $oReq->get('recaptcha_challenge_field'), $oReq->get('recaptcha_response_field'));
if (!$oResp->is_valid)
{
$this->addErrors(App::format('Mod_Account.error.wrong_code'));
}
}
Look for:
HTML:
<table style="width:100%;" cellpadding="4" class="border2"> <tr> <td style="width:35%; text-align:right; font-size:9pt; vertical-align:top;">{language text="verification_code"}:</td> <td style="font-size:9pt; vertical-align:top;">{captcha input='sProtCode'}</td> </tr> <tr> <td style="width:35%; text-align:right; font-size:9pt; vertical-align:top;">{language text='Mod_Account.enter_above_code_here'}: <span class="star">*</span></td> <td style="font-size:9pt; vertical-align:top;"> <input type="text" id="sProtCode" name="sProtCode" size="12" onfocus="this.className='inputmain';" onblur="this.className='';" /> <div style="font-size:8pt;"><i>({language text='Mod_Account.code_case_sensitive'})</i></div> </td> </tr> </table>
HTML:
{if function_exists('recaptcha_get_html')}
<table style="width:100%;" cellpadding="4" class="border2">
<tr>
<td style="width:35%; text-align:right; font-size:9pt; vertical-align:top;">{language text="verification_code"}:</td>
<td style="font-size:9pt; vertical-align:top;">{php} echo recaptcha_get_html(App::getParam('sPublicKey')); {/php}</td>
</tr>
</table>
{/if}Look for:
PHP:
if (!$oSrvSec->checkProtectionCode($oReq->get('sProtCode')))
{
$this->addErrors(App::format('Mod_Account.error.wrong_code'));
}
PHP:
if (function_exists('recaptcha_check_answer'))
{
$oResp = recaptcha_check_answer(App::getParam('sPrivateKey'), $_SERVER["REMOTE_ADDR"], $oReq->get('recaptcha_challenge_field'), $oReq->get('recaptcha_response_field'));
if (!$oResp->is_valid)
{
$this->addErrors(App::format('Mod_Account.error.wrong_code'));
}
}


