how to make recaptcha dark theme like in this article?
I need to make recaptcha dark in UNA
https://developers.google.com/recaptcha/docs/faq#can-i-customize-the-recaptcha-widget-or-badge
-
-
·
LeonidS
- ·
Hello @Genesis !
If you are using the Lucid template then you may transform the file modules\boonex\lucid\data\template\system\scripts\BxTemplCaptchaReCAPTCHANew.php by the following way:
<?php defined('BX_DOL') or die('hack attempt');
/**
* Copyright (c) UNA, Inc - https://una.io
* MIT License - https://opensource.org/licenses/MIT
*
* @defgroup UnaTemplate UNA Template Classes
* @{
*/
/**
* @see BxDolCaptcha
*/
class BxTemplCaptchaReCAPTCHANew extends BxBaseCaptchaReCAPTCHANew
{
public function __construct ($aObject, $oTemplate = false)
{
parent::__construct ($aObject, $oTemplate);
$this->_sSkin = 'dark';
}
}
/** @} */
The bold line was added. But don't forget about this part during the upgrade.
-
·
LeonidS
-
- · Genesis
-
·
In reply to LeonidS
- ·
Thanks. Is there a way to override the template so I can put that code in a separate file and then the Lucid template will always read from the new file first, so when I upgrade, it won't reset my changes? Like how some software has a functions.php in a child theme?
-
-
·
LeonidS
-
·
In reply to Genesis
- ·
No, anyway it will require the changes in the mentioned file. So the provided solution is the minimum.
-
·
LeonidS