MyBB Community Forums

Full Version: Customize google Recaptcha 2 Theme
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The "Google Recaptcha 2" has the ability to swap between "light" & "dark" theme. Currently there are no option to change this, and I can't say light one looks very good on dark themes.

I hope to see a option swapping between dark & light via ACP easily without editing any core code.

Here is a picture of how the dark one will look like:
[Image: yAFBxsz.png]
Using a custom theme means you already have customized the templates. So chaning the recaptcha template should be no big deal. Furthermore I would not consider template changes 'core changes'. A proper design of the captchas is the job of a theme designer, and not a question of configuration.

Therefore: unnecessary.
(2015-05-28, 12:18 PM)Nik101010 Wrote: [ -> ]Using a custom theme means you already have customized the templates. So chaning the recaptcha template should be no big deal. Furthermore I would not consider template changes 'core changes'. A proper design of the captchas is the job of a theme designer, and not a question of configuration.

Therefore: unnecessary.


Can you explain how a theme developer would change this then? From what I know, themes has nothing to do with how the recaptcha looks. This is changed within the captcha code it self, nothing to do with CSS etc.
post_captcha_nocaptcha is the template to display the captcha (in 1.8 - 2.0 will have an other template system, but I'm sure there will be a template, too).
https://developers.google.com/recaptcha/docs/display the documentation.

The remain is reading Big Grin
Yep, 2.0 will have special captcha templates too.
This is your solution, 6 years late, but it may help someone,

You have add this to post_captcha_nocaptcha
<div class="g-recaptcha" data-size="compact" data-theme="dark" data-sitekey="{$public_key}"></div>

essentially you are setting the dark theme.