Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Template Shares (http://www.bvlist.com/forumdisplay.php?f=26)
-   -   reCAPTCHA for tsue 2.2 (http://www.bvlist.com/showthread.php?t=11654)

TraceR 16th June 2018 14:42

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


Botanicar 16th June 2018 16:42

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

TraceR 16th June 2018 20:07

Quote:

Originally Posted by Botanicar (Post 52049)


i had a bit more good and better one but iam faild to validate to login system
https://i.gyazo.com/9125d45ad22288de...1e8bcbd263.png

Botanicar 16th June 2018 20:34

@TraceR


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


Test it yourself and come back with resultate


Or disable reCaptcha

joeroberts 16th June 2018 22:10

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;


TraceR 17th June 2018 07:27

this is tsue captcha class


Code:




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;
    }

}


bigjohn 17th June 2018 12:24

Quote:

Originally Posted by TraceR (Post 52054)
this is tsue captcha class


Code:




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

Botanicar 17th June 2018 18:44

Like a say to you, my option working fine





https://s8.postimg.cc/ddtylpq45/Screenshot_3.jpg




https://s8.postimg.cc/tc2obuzrp/Screenshot_4.jpg

https://s8.postimg.cc/jerniskg5/Screenshot_5.jpg

joeroberts 17th June 2018 19:41

Quote:

Originally Posted by Botanicar (Post 52057)
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.

Botanicar 17th June 2018 20:03

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:








   

       

            {$signup_through_facebook}
            {$TSUE['TSUE_Language']->phrase['signup_form']}
       

   





   

       

       

   


   

       

           
       

       

           
       

   


   

       

       

   


   

       

           
       

       

           
       

   


   

       

       

   

   
   

       

           

               

               
           

       

       

           
       

   


   

       
{$TSUE['TSUE_Language']->phrase['memberinfo_gender']}

       

   


   

       

           
           
           
       

       
{$get_timezones}

   





   

       


YOU_SITE_KEY_HERE">

       

   




   

       

               
               
       

   






All times are GMT +2. The time now is 08:49.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.