PDA

View Full Version : [MOD] ReCaptcha - the cool image validation


Boby
02-12-2008, 10:53 PM
Mod Title: reCaptcha - the cool image validation
Last Updated: 12.02.2008
Supported by Mod Developer: No
Where to Download: This Thread
Support Via This Thread or Download Site: This Thread
Compatible With: phpLD v2 & v3



Most of you have probably seen or at least heard of reCaptcha (http://recaptcha.net/). It is a new captcha (image verification) system that is easy for humans to read and nearly impossible for robots. How the system works...here (http://recaptcha.net/learnmore.html).


I have thought of this mod only as replacement for phpLD's image verification system on servers where the GD library is not bundled with PHP, and users cannot have this important feature.


Installation Instructions
Register (https://admin.recaptcha.net/accounts/signup/) for a free reCaptcha account and get yourself the private and public keys for your domain.
Either edit "init.php" and add the folowing:
Content visible to registered users only.or you can add new entries to your PLD_CONFIG database table with the IDs:
RECAPTCHA_PUBLIC_KEY and RECAPTCHA_PRIVATE_KEY having as values your keys.
Download (http://code.google.com/p/recaptcha/downloads/list?q=label:phplib-Latest) the reCAPTCHA Library, extract "recaptchalib.php" in a new folder called "recaptcha", inside your "/libs/" folder. The full path should be
Content visible to registered users only.
Create a new file called "function.recaptcha.php" inside your "/libs/smarty/plugins/" folder with the following code inside:
Content visible to registered users only.
Edit "submit.tpl", can be found on phpLD v3 inside your "/templates/{YOUR-TEMPLATE}/" or in older version simply inside "/templates/".
Look for something simmilar to the following code, it might be a little bit different from version to version or template to template:
Content visible to registered users only.Replace it with the following code (you may use here your own HTML markup to fit your template, this is just an example to the default template):
Content visible to registered users only.
Edit "submit.php", from the root of your phpLD installation.
Look for (right on top of the file):
Content visible to registered users only.Right after add:
Content visible to registered users only.
Look for the following code and remove it (might be a little different depending on your phpLD version, but you should be able to handle it):
Content visible to registered users only.Note: We will now split the instructions for phpLD v3 and phpLD v2 users.



Instructions for phpLD v3:
For all phpLD versions starting from v3.1.0 (and above), look for the following code and remove it (on top of the file):
Content visible to registered users only.
Look for the following:
Content visible to registered users only.Right above add:
Content visible to registered users only.Instructions for phpLD v2:
This is also aplicable for the very first phpLD v3 releases.
Look for:
Content visible to registered users only.Replace with:
Content visible to registered users only.
That's all :)
I have also attached a screenshot of the reCaptcha working on phpLD 3.3.0

Hope you like it!
Boby


say thank you? (http://www.frozenminds.com/donate.html)

vfenix
02-14-2008, 03:03 AM
cool mod.

i'm using it in my new directory, but i don't know what i make bad, because is totally functional in the submit article and in the spanish version of the directory, but in the english version of the principal submit form i have this error, and i can't find the solution:

Fatal error: Smarty error: [in submit.tpl line 392]: syntax error: mismatched tag {/if}. expected {/strip} (opened line 8). (Smarty_Compiler.class.php, line 2300) in path/libs/smarty/Smarty.class.php on line 1095

i wait your solution, because i want to run the site this friday, if is possible.

thank you

James
02-14-2008, 03:17 AM
just recheck the submit.tpl real close you missed a tag.

vfenix
02-14-2008, 04:02 AM
thank you, now is running.

torter
04-11-2008, 07:59 PM
seems good i ll try as soon as possible:)

David
04-22-2008, 12:35 AM
Anyone who has installed this recently that can show and example URL?

Prashant2k
05-03-2008, 04:13 AM
I have installed this mod. and its working fine to me.

please check at http://www.li-di.org/submit.php

I have made one modification for submit.tpl

instead of this code: Content visible to registered users only.

i Used :

Content visible to registered users only.

Prashant2k
05-03-2008, 04:16 AM
Content visible to registered users only.

if you help me to modify this this code for new registration and forgot password pages i will be really thankful to you.

astounded
05-06-2008, 07:07 AM
Excellent mod, thank you. Would love to get this working, but..

I am getting the following error after installing this mod:

Content visible to registered users only.

Here: http://directory.dotsauce.com/submit.php

shadav
05-07-2008, 01:19 AM
double check the install instructions and make sure that it was installed per instructions...

try clearing your cache folder for your templates

according to this thread > Fixing Smarty Errors (http://www.phplinkdirectory.com/forum/showthread.php?t=6776)
they said that this helped them > SmartyValidate: [validate plugin] form 'submit_link' is not registered (http://www.phplinkdirectory.com/forum/showthread.php?t=5250)

Jayson
06-01-2008, 01:19 AM
AWESOME!!! works great thanks :D