![]() |
| | LinkBack | Thread Tools | Display Modes |
| ||||
| Ok these are the steps to get the Recaptcha in the submission page, so every user has to fill the captcha in order to continue with the submission. / You will end up with something like this: (check the attachment) (Before start you will need a Recaptcha keys, to get them go to recaptcha register and get the key, also download the recaptchalib.php from the same site and save it in your pligg base folder) (Before we start make sure the User Registration Captcha is "true" under the admin, configuration, Captcha) Step 1: open submit_step_2.tpl Look for this: HTML Code: <input type="submit" value="{#PLIGG_Visual_Submit2_Continue#}" class="submit" /> <input type="hidden" name="url" id="url" value="{$submit_url}" /> <input type="hidden" name="phase" value="2" /> <input type="hidden" name="randkey" value="{$randkey}" /> <input type="hidden" name="id" value="{$submit_id}" /> Code: {php}
require_once('recaptchalib.php');
$publickey = "YOURPUBLICKEY"; // you got this from the signup page
echo recaptcha_get_html($publickey);
{/php} look for this: PHP Code: PHP Code: PHP Code: PHP Code: I made this from a code I found there in pligg, plus the resources of Recaptcha.net and recaptcha group. I hope this helps, and work, please leave a comment after installation. I don't know what people are doing wrong, but for those here are the files. remember to do the backup of the 3 files before replace. NOTE i am using yget template on indipop.net check the attachment for the files. ok I hope it works for you guys. please post here if success Last edited by fhelik : 01-09-2008 at 05:41 PM. Reason: new files |
| Sponsored Links |
|
Check out the New Templates at the Pligg Pro Shop.
|
| ||||
| Awesome! Going to give it a shot right now...
__________________ Design Float - Digg For Designers |
| ||||
| Hmmm, I get a blank page after the captcha is entered and I hit submit. Could there be a syntax error?
__________________ Design Float - Digg For Designers |
| ||||
| Quote:
check that you have /register_error.tpl in your template folder try this: go to admin language find this: "PLIGG_Visual_Register_Error_BadCode", make sure is some text there. 1: submit 1 story and fill the gaptcha correct. It should go to next step. 2: submit 1 story and fill the captcha wrong. it have to show the error NOTE: I use yget template. look in indipop.net, it is working fine. both for registration and submit. |
| ||||
| check the post I just upload my files, make backup and replace, i hope this works. |
| ||||
| Hello; I haven tried it out but just my thought, we should put the captcha at the submit step 3. It is much better, because my user go back to change something, he has to enter the captcha again. Meanwhile at step 3, you onyl need to enter once. Thanks |
| |||
| I'm reveiving the same, but I think placement would make more sense in submit 3. |
| |||
| have you considered reCaptcha for the registration page? So I see why you would want reCaptcha for adding new stories but what about the first step which is when they register? Wouldn't that alleviate the problem of spam bots creating accounts? |
| |||
| Code for Register User reCaptcha use Quote:
1) In register_center.tpl add this: {if isset($form_captcha_error)}{ foreach value=error from=$form_captcha_error }<br /><span class="error">{$error}</span><br />{ /foreach }<br />{/if} {php} require_once('recaptchalib.php'); $publickey = "..."; // you got this from the signup page echo recaptcha_get_html($publickey); {/php} BEFORE THIS <input type="submit" name="submit" value="{#PLIGG_Visual_Register_Create_User#}" class="log2" tabindex="36" /> 2) In register.php add this: require_once('recaptchalib.php'); $privatekey = "..."; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { // if both captchas don't match $error = true; } BEFORE THIS $vars = array('username' => $username); check_actions('register_check_errors', $vars); AND THIS $main_smarty->assign('form_captcha_error', 'The reCAPTCHA code you entered was incorrect.'); AFTER THIS $main_smarty->assign('form_password_error', $form_password_error); |
| The Following User Says Thank You to MarekSpace For This Useful Post: | ||
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Mod] Dodging SPAM with recaptcha | ednet | Pligg Mods | 22 | 08-09-2008 01:48 PM |
| Request: reCAPTCHA | elindbloom | Suggestions | 1 | 06-24-2007 09:02 PM |





Linear Mode

