Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Template Shares
Reply
  #41  
Old 2nd August 2018, 00:32
outtyrox outtyrox is offline
Senior Member
 
Join Date: Apr 2015
Posts: 59
Default
has there been a solution for captcha v2 created yet? currently I've had to disable it in the admincp

dashboard> options> security> enable captcha for guests NO


doesn't look like it would be too difficult.

only difficult part is making it some its simple for users to enter their own private and public keys for the captcha v2 after the updates are made.


1. Mod /library/pages/signup.php
2. Mod /library/classes/class_recaptcha.php
3. Mod the default template for captcha

Click the image to open in full size.

Click the image to open in full size.

Bump: guess I should have checked all the pages.

I see joe roberts been working on it.
Reply With Quote
  #42  
Old 2nd August 2018, 01:00
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
I posted a fix in here
http://www.bvlist.com/showthread.php?t=11654
__________________
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
  #43  
Old 2nd August 2018, 01:09
outtyrox outtyrox is offline
Senior Member
 
Join Date: Apr 2015
Posts: 59
Default
Quote:
Originally Posted by joeroberts View Post

I see the signup.php mod there. where is the mod for the class_recaptcha.php?

Last edited by outtyrox; 2nd August 2018 at 02:14.
Reply With Quote
  #44  
Old 2nd August 2018, 01:16
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
http://www.bvlist.com/showpost.php?p=52086&postcount=25
__________________
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
  #45  
Old 2nd August 2018, 02:08
outtyrox outtyrox is offline
Senior Member
 
Join Date: Apr 2015
Posts: 59
Default
Quote:
Originally Posted by joeroberts View Post
You have made the edit in the templates?
Paste this snippet before the closing
Code:
</head>
tag on your HTML template:
Code:
<script src='https://www.google.com/recaptcha/api.js'></script>
Paste this snippet at the end of the
Code:
<form>
where you want the reCAPTCHA widget to appear:
Code:
<div class="g-recaptcha" data-sitekey="YOUR PUBLIC KEY"></div>

joe which template(s) need this added? this is only part I'm not sure on. I have everything else updated.
Reply With Quote
  #46  
Old 2nd August 2018, 02:35
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
going to have to say signup, lost password and login
__________________
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
The Following User Says Thank You to joeroberts For This Useful Post:
outtyrox (2nd August 2018)
  #47  
Old 2nd August 2018, 02:47
outtyrox outtyrox is offline
Senior Member
 
Join Date: Apr 2015
Posts: 59
Default
suggestion:
seems like in the future it'd be a better option to make another file to import the recaptcha public and private keys from also. that way users dont mess up php files.

Bump:
----------------------------------------------------------------------------------------------------------------------------------------------------------------
got it to work after modifying the files joe said in his posts here. all credit goes to him for making this work.

first I made an account for google recaptcha and added my site url to get private and public key here:
Code:
https://www.google.com/recaptcha/admin


second i did the file edits joe posted here. (good idea to back these files up after for next time)

file edits:
http://www.bvlist.com/showpost.php?p=52086&postcount=25

template modes pictured below:
http://www.bvlist.com/showpost.php?p=52086&postcount=27



third in the template editor I modified the main template. sigup, and captcha template (good idea to backup the default template before you modify anything in here)

like so


main
Click the image to open in full size.


captcha (don't forget to put in your public key here)
Click the image to open in full size.


sigup
Click the image to open in full size.



then put your private key in the updated /library/classes/class_captcha.php file

Click the image to open in full size.

-------------------------

Bump: I have to do some more testing because confirmation working correctly.

- the new member signup to complete but I see this wierd confirmation. must be the captcha template mod i did.

wierd confirmation
Click the image to open in full size.

Bump: I fixed the weird error. It was a self inflected wound in class_captchA.php I added the ?> like PHP has and for some reason xam leaves out.


-----------------------------------------------------------


I'm having and issue getting class_captcha.php to return true. If I set it manually to true it works. I've tried making a new PHP using CURL instead the fileget method but same result.



TESTING CURL METHOD BUT SAME RESULT
Code:
<?php 

class TSUE_captcha
{
    public function verifyCaptcha($recaptcha_challenge_field = "", $recaptcha_response_field = "")
    {
                //
                //PUT YOUR PRIVATE KEY HERE//
                $secret = "6LcsM2gUAAAAAAjbvuAs-YtADTLyAKkG96AX8nmK";
                //
                //
                //
                $remoteip = $_SERVER["REMOTE_ADDR"];
                $url = "https://www.google.com/recaptcha/api/siteverify";
                $response = $_POST["g-recaptcha-response"];
         
                // Curl Request
                $curl = curl_init();
                curl_setopt($curl, CURLOPT_URL, $url);
                curl_setopt($curl, CURLOPT_POST, true);
                curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
                curl_setopt($curl, CURLOPT_POSTFIELDS, array(
                    'secret' => $secret,
                    'response' => $response,
                    'remoteip' => $remoteip
                    ));
                $curlData = curl_exec($curl);
                curl_close($curl);
         
                // Parse data
                $jsonResponse = json_decode($curlData);
                if ($jsonResponse->success === true)
                    return true;
                else
                    return false;
    }

}

Last edited by outtyrox; 2nd August 2018 at 20:15.
Reply With Quote
  #48  
Old 4th August 2018, 16:22
MasterMan MasterMan is offline
Senior Member
 
Join Date: Jan 2012
P2P
Posts: 141
Default
edit these:


1. main template of your all styles and add


Quote:
<script src='https://www.google.com/recaptcha/api.js'></script>

before the closing of </head>


2. go to your captcha template and add to all styles the following on the top;



Quote:
<div class="g-recaptcha" data-sitekey="xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"></div>

change the xxxxxxxxxxxxxxxxxxxx with your site key where you registered with google recaptcha!


that's it ...! this works :)
Reply With Quote
  #49  
Old 4th August 2018, 17:02
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
OMG masterman your brilliant!!!
Now why didn’t I think of that???
Just make sure you turn off recaptcha in the tracker so that it won’t get checked on submit because it well never F**cking pass this way!!!
__________________
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
  #50  
Old 4th August 2018, 17:28
outtyrox outtyrox is offline
Senior Member
 
Join Date: Apr 2015
Posts: 59
Default
yes works until google flags your key for the callback not being implemented correctly.

this is the part that needs fixed so the update to v2 keeps working

Code:
https://developers.google.com/recaptcha/docs/verify#api-request
Bump:
Quote:
Originally Posted by MasterMan View Post
edit these:


1. main template of your all styles and add





before the closing of </head>


2. go to your captcha template and add to all styles the following on the top;






change the xxxxxxxxxxxxxxxxxxxx with your site key where you registered with google recaptcha!


that's it ...! this works :)

same thing i posted above.

you didn't mention you still have to update the other files with joe's edits or it's not going to work.

the recaptcha option in settings has to stay on also or the recaptcha wont appear or run neither.

then after a day or two google will stop the recaptcha from working for the call back not working correctly.
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 17:20. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.