Recaptcha For DLE 9.0 works 100% » DataLife Engine Support

DLEVIET - DataLife Engine Support Home Page

DataLife Engine Support » DataLife Engine » Modules » Recaptcha For DLE 9.0 works 100%

Recaptcha For DLE 9.0 works 100%

  • Author: rajeshaah;  
  • Views: 2477;  
  • Date: 13 September 2010;  
Recaptcha For DLE 9.0 works 100%


Hello Guys i tried to implement in comment box but i failed i got this code from Russian site and it works in only in registration page ..so if any body can implement in comment section it will be great and please share it here if you did.. thanks.

http://www.google.com/recaptcha


Login to recaptcha using google account add your domain after download latest PHP library version at

http://code.google.com/p/recaptcha/downloads/list?q=label:phplib-Latest


Extract zip and upload recaptchalib.php to

root/example/engine/modules/


Installation:

Open
engine/modules/register.php


Find
require_once ENGINE_DIR . '/classes/parse.class.php';


BELOW add
require_once ENGINE_DIR . '/modules/recaptchalib.php';


Find
function check_reg($name, $email, $password1, $password2, $sec_code = 1, $sec_code_session = 1) {


Replace with
function check_reg($name, $email, $password1, $password2,$sec_code=1) {


Find
if( $sec_code != $sec_code_session or ! $sec_code_session ) $stop .= $lang['reg_err_19'];


Replace with
if( $sec_code != 1) $stop .= $lang['reg_err_19'];


Find
if( $config['allow_sec_code'] == "yes" ) {
        $sec_code = $_POST['sec_code'];
        $sec_code_session = ($_SESSION['sec_code_session'] != '') ? $_SESSION['sec_code_session'] : false;
    } else {
        $sec_code = 1;
        $sec_code_session = 1;
    }


Replace (Add your Private Key )
if( $config['allow_sec_code'] == "yes" ) {
          $resp = recaptcha_check_answer ("Private Key",$_SERVER["REMOTE_ADDR"],$_POST["recaptcha_challenge_field"],$_POST["recaptcha_response_field"]);
          if ($resp->is_valid)
            $sec_code=1;
          else
            $sec_code=2;
    }


Private Key add by you, don't forget to do this love

Find
$tpl->set( '{reg_code}', "<span id="dle-captcha"><img src="" . $path['path'] . "engine/modules/antibot.php" alt="{$lang['sec_image']}" border="0" /><br /><a onclick="reload(); return false;" href="#">{$lang['reload_code']}</a></span>" );



Replace: (Add your Public Key )
$tpl->set( '{reg_code}', recaptcha_get_html("Public Key", "") );


Public Key add by you, don't forget to do this love

Find and remove below code

function reload () {

    var rndval = new Date().getTime();

    document.getElementById('dle-captcha').innerHTML = '<img src="{$path['path']}engine/modules/antibot.php?rndval=' + rndval + '" border="0" width="120" height="50" alt="" /><br /><a onclick="reload(); return false;" href="#">{$lang['reload_code']}</a>';

};



Now final step.. Open your template folder registration.tpl and find this code and remove it...it looks some thing link this
<tr valign="middle">
  <td width="120" height="25"><br>Enter the code</td>
  <td height="25"><br><input type="text" name="sec_code" style="width:167px; height:18px; font-family:tahoma; font-size:11px; border:1px solid #E0E0E0 "></td>
</tr>


Thats all ....Thanks once again...


We encourage you to Register or Login to website under your name.

The1Master

Posted 14 October 2010 09:38 Register: 4.04.2010
thnx admin it works great for me (dle 9.0) but i want to use it in the Quick Register what can'i do ? code can use it to do that ?
and if sommebody can help me plz do that :)
and thank you in advance

laoten

Posted 14 November 2010 01:31 Register: 7.05.2010
Thanks for de solution

thuanngo

Posted 13 January 2011 14:05 Register: 7.11.2010
Thanks Admin,
- I have setup successful above guide. I have some problem.
For example: http://www.dleviet.com/index.php?do=lostpassword Security Code can't loading. Please help how to setup order to fix it.

Thanking u!
lol

admin

Posted 13 January 2011 20:23 Register: 25.04.2009
Upgrade to DLE 9.2 and you don't need to do this because ReCaptcha was added in DLE 9.2

waqwaq

Posted 14 April 2012 18:50 Register: 18.03.2012
lol
Information
Members of Guest cannot leave comments.

Pagerank Update

    Updates Yandex SEO
    13.04.2012
    16.02.2012
    04.02.2012
    Updates Yandex search
    17.05.2012
    15.05.2012
    12.05.2012
    Updates Yandex Catalogue
    22.05.2012
    21.05.2012
    18.05.2012
    Updates Google
    03.05.2012
    06.02.2012
    08.11.2011

Find us on Facebook

Poll

How do you know DataLife Engine Support?

Search Engine
Other DLE Support websites
Forum
Friends
Others

Sponsor

Calendar

«    May 2012    »
MoTuWeThFrSaSu
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
Contact us in social network

Facebook

Twitter