ReCaptcha | Light Theme to Dark

    • 201 posts
    October 2, 2018 8:08 PM EDT

    With V2 ReCaptcha theme no longer allows for styling at Google.  Data-Theme for SE Default is light.  My inspector says is in the CSS but I can't find it - Would anyone know what file its in.

    • Moderator
    • 6923 posts
    October 3, 2018 4:48 AM EDT

    You would put the custom css in your theme.css via admin, making sure to work on a clone of the insignia theme if using that theme. I've put tips in other threads lately for how to figure out the css codes to use for each page of the site. You may want to check those tips as I'm not on my local dev site atm.

    • 201 posts
    October 3, 2018 9:08 AM EDT

    I tried the CSS no luck - I think this one is not that simple. With the multiple Js and states and its iframe its hard to figure out. Somewhere in my SE files lives the data-theme "light" I think if I just change it to "dark" it should work.  


    This post was edited by Miami Shade at October 3, 2018 9:12 AM EDT
    • Moderator
    • 6923 posts
    October 3, 2018 9:18 AM EDT

    I suggest you get sublime text as I use it for searching files for stuff. I searched recaptcha and found it is in application/libraries/Engine/Service/ReCaptcha2.php

    protected $_attributes = array( 65: 'class' => 'g-recaptcha', 66 'theme' => 'light', 67 'type' => 'image',

     

    I didn't have time to check all the other files or test but that should start you out, clear cache and browser cache after changing it. Backup the file before changing it. Use Sublime Text to find other instances if that doesn't work. laughing

    • 201 posts
    October 3, 2018 9:27 AM EDT

    AMAZING as always laughing  Found it right where you said let you know how it goes after backups etc.


    This post was edited by Miami Shade at October 3, 2018 9:31 AM EDT
    • Moderator
    • 6923 posts
    October 4, 2018 4:18 AM EDT

    Hope it works well.

    • 201 posts
    October 4, 2018 7:58 AM EDT

    That file alone didn't do the trick - might be several - I will keep looking and update if I find solution

    • Moderator
    • 6923 posts
    October 4, 2018 8:18 AM EDT

    It's also here application/modules/Core/Api/Core.php

    // Recaptcha 108 return array_merge(array( 109 'label' => 'Human Verification', 110: 'captcha' => 'ReCaptcha2', 111 'required' => true, 112 'captchaOptions' => array( 113: 'privkey' => $spamSettings['recaptchaprivate'], 114: 'pubkey' => $spamSettings['recaptchapublic'], 115 'theme' => 'light', 116 'size' => (isset($params['size']) ? $params['size'] : 'normal' ),
    • Moderator
    • 6923 posts
    October 4, 2018 8:20 AM EDT

    Tested and that worked. 

    • 201 posts
    October 4, 2018 8:34 AM EDT

    kiss @Donna

    Thank you.

    I changed just the application/modules/Core/Api/Core.php and it worked here too.

    THANK YOU !

    • Moderator
    • 6923 posts
    October 4, 2018 8:47 AM EDT

    Glad it worked cool