Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Template Shares
Reply
  #1  
Old 16th June 2018, 14:42
TraceR's Avatar
TraceR TraceR is offline
BittyTorrent
 
Join Date: Mar 2015
Posts: 135
Default reCAPTCHA for tsue 2.2
any one tried to upgrade from v1 reCAPTCHA to v2 reCAPTCHA in tsue 2.2 as old one is dead by google shutdown

Reply With Quote
  #2  
Old 16th June 2018, 16:42
Botanicar's Avatar
Botanicar Botanicar is offline
Senior Member
 
Join Date: Jun 2013
Croatia
Posts: 127
Default
http://www.bvlist.com/showpost.php?p=51659&postcount=63
Reply With Quote
  #3  
Old 16th June 2018, 20:07
TraceR's Avatar
TraceR TraceR is offline
BittyTorrent
 
Join Date: Mar 2015
Posts: 135
Default
Quote:
Originally Posted by Botanicar View Post

i had a bit more good and better one but iam faild to validate to login system
Click the image to open in full size.
Reply With Quote
  #4  
Old 16th June 2018, 20:34
Botanicar's Avatar
Botanicar Botanicar is offline
Senior Member
 
Join Date: Jun 2013
Croatia
Posts: 127
Default
@TraceR


I have tested this option my self, and it works, without problems


Test it yourself and come back with resultate


Or disable reCaptcha
Reply With Quote
  #5  
Old 16th June 2018, 22:10
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
did you update the conformation part?
this wont work for you but it well give you an idea
Code:
            $ip = $_SERVER['REMOTE_ADDR'];
            $response=file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$recap_private_key."&response=".$recaptcha_response_field."&remoteip=".$ip);
            $responseKeys = json_decode($response,true);         
            $recap_pass = intval($responseKeys["success"]) !== 1 ? false : true;
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #6  
Old 17th June 2018, 07:27
TraceR's Avatar
TraceR TraceR is offline
BittyTorrent
 
Join Date: Mar 2015
Posts: 135
Default
this is tsue captcha class


Code:

<?php 

class TSUE_captcha
{
    private $apiURL = "https://www.google.com/recaptcha/api/verify";
    private $privatekey = "6LfHFTQUAAAARFGHTDGGOyBEj7S";
    public $status = false;
    public $error = "";

    public function verifyCaptcha($recaptcha_challenge_field = "", $recaptcha_response_field = "")
    {
        $Query = http_build_query(array( "privatekey" => $this->privatekey, "remoteip" => MEMBER_IP, "challenge" => $recaptcha_challenge_field, "response" => $recaptcha_response_field ));
        if( function_exists("curl_init") && ($ch = curl_init()) ) 
        {
            curl_setopt($ch, CURLOPT_URL, $this->apiURL);
            curl_setopt($ch, CURLOPT_TIMEOUT, 15);
            curl_setopt($ch, CURLOPT_POST, true);
            curl_setopt($ch, CURLOPT_POSTFIELDS, $Query);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($ch, CURLOPT_USERAGENT, "TSUE via cURL/PHP");
            $result = curl_exec($ch);
            curl_close($ch);
            if( $result ) 
            {
                $result = preg_split("/\\r\\n|\\r|\\n/", $result);
                if( trim($result["0"]) == "true" ) 
                {
                    $this->status = true;
                }
                else
                {
                    $this->error = trim($result["1"]);
                }

            }

        }

        return $this->status;
    }

}
Reply With Quote
  #7  
Old 17th June 2018, 12:24
bigjohn bigjohn is offline
Member
 
Join Date: May 2018
Posts: 2
Default
Quote:
Originally Posted by TraceR View Post
this is tsue captcha class


Code:

<?php 

class TSUE_captcha
{
    private $apiURL = "https://www.google.com/recaptcha/api/verify";
    private $privatekey = "6LfHFTQUAAAARFGHTDGGOyBEj7S";
    public $status = false;
    public $error = "";

    public function verifyCaptcha($recaptcha_challenge_field = "", $recaptcha_response_field = "")
    {
        $Query = http_build_query(array( "privatekey" => $this->privatekey, "remoteip" => MEMBER_IP, "challenge" => $recaptcha_challenge_field, "response" => $recaptcha_response_field ));
        if( function_exists("curl_init") && ($ch = curl_init()) ) 
        {
            curl_setopt($ch, CURLOPT_URL, $this->apiURL);
            curl_setopt($ch, CURLOPT_TIMEOUT, 15);
            curl_setopt($ch, CURLOPT_POST, true);
            curl_setopt($ch, CURLOPT_POSTFIELDS, $Query);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($ch, CURLOPT_USERAGENT, "TSUE via cURL/PHP");
            $result = curl_exec($ch);
            curl_close($ch);
            if( $result ) 
            {
                $result = preg_split("/\\r\\n|\\r|\\n/", $result);
                if( trim($result["0"]) == "true" ) 
                {
                    $this->status = true;
                }
                else
                {
                    $this->error = trim($result["1"]);
                }

            }

        }

        return $this->status;
    }

}
If you update this file it will not work at all for you as joe as said you need to mod the code given you can try to update the class but it not get you anywhere at all as it will kick you on login still it needs a overhall new code full stop all you can do is swith it off in tools till there is a full fix for this im working on now code for this as it is noone will get it to work ....as joe as said need new
Reply With Quote
The Following User Says Thank You to bigjohn For This Useful Post:
papad (17th June 2018)
  #8  
Old 17th June 2018, 18:44
Botanicar's Avatar
Botanicar Botanicar is offline
Senior Member
 
Join Date: Jun 2013
Croatia
Posts: 127
Default
Like a say to you, my option working fine





Click the image to open in full size.




Click the image to open in full size.

Click the image to open in full size.
Reply With Quote
  #9  
Old 17th June 2018, 19:41
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
Quote:
Originally Posted by Botanicar View Post
Like a say to you, my option working fine
then please post your
Code:
class TSUE_captcha
so that we can move on with this
getting the First screen to show the confirmation box is fine but with out the part that checks it it is work less.
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #10  
Old 17th June 2018, 20:03
Botanicar's Avatar
Botanicar Botanicar is offline
Senior Member
 
Join Date: Jun 2013
Croatia
Posts: 127
Default
Hi Joe,


like I write on this post, temporary solution:

http://www.bvlist.com/showpost.php?p=51659&postcount=63



Quote:
Appearance --> Themes --> Manage Templates: YOU_TEMPLATE --> signup
Code:

<form id="signupbox_form" action="">
<input type="hidden" name="invite_hash" value="{$invite_hash}" id="invite_hash" />
<input type="hidden" name="a_hash" value="{$a_hash}" id="a_hash" />

<div class="tableHeader">
    <div class="row">
        <div class="cell first">
            {$signup_through_facebook}
            {$TSUE['TSUE_Language']->phrase['signup_form']}
        </div>
    </div>
</div>

<div class="table">

    <div class="row">
        <div class="cell"><label for="signupbox_membername">{$TSUE['TSUE_Language']->phrase['your_name']}</label></div>
        <div class="cell"><label for="signupbox_date_of_birth">{$TSUE['TSUE_Language']->phrase['memberinfo_date_of_birth']}</label></div>
    </div>

    <div class="row">
        <div class="cell">
            <input type="text" name="signupbox_membername" id="signupbox_membername" class="s" accesskey="m" value="{$signupbox_membername}" title="{$TSUE['TSUE_Language']->phrase['membername_tip']}" />
        </div>
        <div class="cell">
            <input type="date" name="signupbox_date_of_birth" id="signupbox_date_of_birth" class="s" accesskey="d" value="{$signupbox_date_of_birth}" title="{$TSUE['TSUE_Language']->phrase['memberbday_tip']}" />
        </div>
    </div>

    <div class="row">
        <div class="cell"><label for="signupbox_email">{$TSUE['TSUE_Language']->phrase['your_email']}</label></div>
        <div class="cell"><label for="signupbox_email2">{$TSUE['TSUE_Language']->phrase['confirm_email']}</label></div>
    </div>

    <div class="row">
        <div class="cell">
            <input type="text" name="signupbox_email" id="signupbox_email" class="s" accesskey="e" value="{$signupbox_email}" title="{$TSUE['TSUE_Language']->phrase['memberemail_tip']}" />
        </div>
        <div class="cell">
            <input type="text" name="signupbox_email2" id="signupbox_email2" class="s" accesskey="f" value="" title="{$TSUE['TSUE_Language']->phrase['memberemail2_tip']}" />
        </div>
    </div>

    <div class="row">
        <div class="cell"><label for="signupbox_password">{$TSUE['TSUE_Language']->phrase['your_password']}</label></div>
        <div class="cell"><label for="signupbox_password2">{$TSUE['TSUE_Language']->phrase['confirm_password']}</label></div>
    </div>
    
    <div class="row">
        <div class="cell">
            <div class="passwordStrength">
                <div class="score"><span><b></b></span></div>
                <input type="password" name="signupbox_password" id="signupbox_password" class="s" accesskey="p" value="" title="{$TSUE['TSUE_Language']->phrase['memberpassword_tip']}" />
            </div>
        </div>
        <div class="cell">
            <input type="password" name="signupbox_password2" id="signupbox_password2" class="s" accesskey="c" value="" title="{$TSUE['TSUE_Language']->phrase['memberpassword2_tip']}" />
        </div>
    </div>

    <div class="row">
        <div class="cell">{$TSUE['TSUE_Language']->phrase['memberinfo_gender']}</div>
        <div class="cell"><label for="signupbox_timezone">{$TSUE['TSUE_Language']->phrase['membercp_timezone']}</label></div>
    </div>

    <div class="row">
        <div class="cell">
            <input type="radio" name="signupbox_gender" id="memberinfo_gender_female" value="f"{$genderChecked['f']} /> <label for="memberinfo_gender_female">{$TSUE['TSUE_Language']->phrase['memberinfo_gender_female']}</label>
            <input type="radio" name="signupbox_gender" id="memberinfo_gender_male" value="m"{$genderChecked['m']} /> <label for="memberinfo_gender_male">{$TSUE['TSUE_Language']->phrase['memberinfo_gender_male']}</label>
            <input type="radio" name="signupbox_gender" id="memberinfo_gender_unspecified" value=""{$genderChecked['n']} /> <label for="memberinfo_gender_unspecified">{$TSUE['TSUE_Language']->phrase['memberinfo_gender_unspecified']}</label>
        </div>
        <div class="cell">{$get_timezones}</div>
    </div>

</div>

<div class="tableFooter">
    <div class="row">
        <div class="cell">
<!-- {$CAPTCHA} -->
<div class="g-recaptcha" data-sitekey="YOU_SITE_KEY_HERE"></div>
        </div>
    </div>
</div>

<div class="tableFooter">
    <div class="row">
        <div class="cell">
                <input type="submit" value="{$TSUE['TSUE_Language']->phrase['signup']}" class="submit" /> 
                <input type="reset" value="{$TSUE['TSUE_Language']->phrase['button_clear']}" class="submit" id="signup-buttons" />
        </div>
    </div>
</div>

</form>
Reply With Quote
Reply

Tags
22 , recaptcha , tsue

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 15:07. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.