Advertisement:

Author Topic: reCaptcha v3  (Read 120 times)

p206ab

  • Sr. Member
  • ****
  • Posts: 339
reCaptcha v3
« on: June 18, 2019, 11:06:59 pm »
Hi,
has anyone already tried to implement reCaptcha v3 into Osclass site?

aide2006

  • Newbie
  • *
  • Posts: 16
Re: reCaptcha v3
« Reply #1 on: June 19, 2019, 01:26:53 pm »
yes, but only by changing my theme directly

p206ab

  • Sr. Member
  • ****
  • Posts: 339
Re: reCaptcha v3
« Reply #2 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.

pipetko

  • Newbie
  • *
  • Posts: 6
Re: reCaptcha v3
« Reply #3 on: June 20, 2019, 08:59:16 pm »
I am also interested to see that :)

aide2006

  • Newbie
  • *
  • Posts: 16
Re: reCaptcha v3
« Reply #4 on: Today at 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

BaghDad

  • Newbie
  • *
  • Posts: 2
Re: reCaptcha v3
« Reply #5 on: Today at 08:17:01 pm »
yes, but only by changing my theme directly

not right