How to change Captcha style
Permalink 1 user found helpful
Hi,
I found the Captcha style is defined in /concrete/core/models/system/captcha/types/securimage/controller.php.
But no matter how I change the file variables, nothing changes on site. Am I missing something? I used to simply override the 3rd party library a few versions before. But now it all changed and I can't figure out how to change the Captcha style.
If I copy /concrete/core/models/system/captcha/types/securimage/controller.php to MYSITE/models/system/captcha/types/securimage/controller.php and change it there, it gives me an error: "Fatal error: Class 'SecurimageSystemCaptchaTypeController' not found in /srv/www/htdocs/MYSITE/concrete/core/models/system/captcha/library.php on line 129".
Please help. Thank you.
I found the Captcha style is defined in /concrete/core/models/system/captcha/types/securimage/controller.php.
But no matter how I change the file variables, nothing changes on site. Am I missing something? I used to simply override the 3rd party library a few versions before. But now it all changed and I can't figure out how to change the Captcha style.
If I copy /concrete/core/models/system/captcha/types/securimage/controller.php to MYSITE/models/system/captcha/types/securimage/controller.php and change it there, it gives me an error: "Fatal error: Class 'SecurimageSystemCaptchaTypeController' not found in /srv/www/htdocs/MYSITE/concrete/core/models/system/captcha/library.php on line 129".
Please help. Thank you.
Thank you very much. It worked! Thanks a lot!
Could you please tell me how this can be done automatically when installing a package? That is, I am writing a package which installs a block. This works fine. But I also need to change the Captcha style when installing the block. How can I copy the Captcha controller into the Models folder during the block installation? Thank you.
Could you please tell me how this can be done automatically when installing a package? That is, I am writing a package which installs a block. This works fine. But I also need to change the Captcha style when installing the block. How can I copy the Captcha controller into the Models folder during the block installation? Thank you.
I'm not sure about this one, but maybe you can extend the class in your package.
1- copy '\concrete\models\system\captcha\types\securimage\controller.php' to '\models\system\captcha\types\securimage\controller.php' [its an empty class]
2- now, copy construct method from '\concrete\core\models\system\captcha\types\securimage' to newly added file, inside the class, then change settings at this new file.
your code at the new file should look like this: