Osclass forums

Support forums => General help => Topic started by: p206ab on June 18, 2019, 11:06:59 pm

Title: reCaptcha v3
Post by: p206ab on June 18, 2019, 11:06:59 pm
Hi,
has anyone already tried to implement reCaptcha v3 into Osclass site?
Title: Re: reCaptcha v3
Post by: aide2006 on June 19, 2019, 01:26:53 pm
yes, but only by changing my theme directly
Title: Re: reCaptcha v3
Post by: p206ab on June 20, 2019, 10:31:20 am
yes, but only by changing my theme directly
I'm okay with that, as long as it works and spares my users of checking the box ;) Can you give me brief explanation on what changes are needed?
Thanks.
Title: Re: reCaptcha v3
Post by: pipetko on June 20, 2019, 08:59:16 pm
I am also interested to see that :)
Title: Re: reCaptcha v3
Post by: aide2006 on July 16, 2019, 06:23:21 pm
You need to deceide firstly what pages you want the recaptcha to work on
so for example Register
Goto the themes register.php and insert the code required from Google recaptcha
So =
Code: [Select]
<script src="https://www.google.com/recaptcha/api.js?render=reCAPTCHA_site_key"></script>
  <script>
  grecaptcha.ready(function() {
      grecaptcha.execute('reCAPTCHA_site_key', {action: 'homepage'}).then(function(token) {
         ...
      });
  });
  </script>
at the top of the register.php file after say echo head.php but before anything else
This should sort it for you
Title: Re: reCaptcha v3
Post by: BaghDad on July 16, 2019, 08:17:01 pm
yes, but only by changing my theme directly

not right