How can I change CAPTCHA colours?

Permalink 5 users found helpful
Is it possible to edit the way my CAPTCHA looks??

Regards.

 
Tony replied on at Permalink Best Answer Reply
Tony
yeah, it's pretty easy (http://inneroptics.net/contact/... ). just copy the folder /concrete/libraries/3rdparty/securimage/ to /libraries/3rdparty/securimage/, and the open up the file /libraries/3rdparty/securimage/securimage.php and start editing some of those class variables, particularly image_bg_color, multi_text_color, line_color, and arc_line_colors.

(btw, i tried to override the captcha helper to do it through there, but something funky was happening with overrides there)
astrocas replied on at Permalink Reply
that WAS pretty easy! worked a treat. thanks very much for that.

theres some awesome photos on that inner optics site!
Tony replied on at Permalink Reply
Tony
thanks :-)
mose replied on at Permalink Reply
mose
@Tony: Helpers currently cannot be overridden. They can only be extended.
Tony replied on at Permalink Reply
Tony
good tip. thx.
AngusHume replied on at Permalink Reply
AngusHume
Great tip, but when I tried it it did not work. I had to edit the helper instead. Maybe something has changed in recent update?
MVS replied on at Permalink Reply
I think so, I´ve tried it too, but doesen´t work. But I don´t like the standard Captcha-look. Can anyone help?
AngusHume replied on at Permalink Reply
AngusHume
I just edited the core php file at concrete5/concrete/helpers/validation/captcha.php

But make sure you keep a backup first, and note the changes you make as the file will likely be replaced with concrete updates. Look at around lines 47-57, it's pretty easy to change the RGB colour ranges, turn off multicolour text (true/false), change the number of lines.

$this->securimage->image_bg_color = new Securimage_Color(227, 218, 237);
      $this->securimage->line_color = new Securimage_Color(51, 51, 51);
      $this->securimage->num_lines = 5;
      $this->securimage->use_multi_text   = true;
      $this->securimage->multi_text_color = array(
         new Securimage_Color(184, 4, 50),
         new Securimage_Color(12, 67, 157),
         new Securimage_Color(244, 49, 11)
         );
      $this->securimage->text_color = new Securimage_Color(184, 4, 50);
exiteden replied on at Permalink Reply
I'm trying to change my captcha colors using this idea but my captcha.php file doesn't have that many lines... it only has the following code:

<?php 
defined('C5_EXECUTE') or die("Access Denied.");
class ValidationCaptchaHelper {
   public function __construct() {
      Loader::model('system/captcha/library');
      Loader::model('system/captcha/controller');
      $captcha = SystemCaptchaLibrary::getActive();
      $this->controller = $captcha->getController();
   }      
   public function __call($nm, $args) {
      if (method_exists($this->controller, $nm)) { 
         return call_user_func_array(array($this->controller, $nm), $args);
      }
   }
}


Am I looking in the wrong file?
fastcrash replied on at Permalink Reply
fastcrash
i figure it too, it was for 5.4.x
exiteden replied on at Permalink Reply
Anybody know how to change the captcha colors in version 5.5.0?
12345j replied on at Permalink Reply
12345j
concrete/models/system/captcha/types/secureimage/controller.php
exiteden replied on at Permalink Reply
perfect! thanks for the tip.
Phallanx replied on at Permalink Reply
Phallanx
I would strongly recommend using reCaptcha instead of the default concrete5 one. It has been compromised on many sites (including this one).

http://www.concrete5.org/community/forums/block_requests/recaptcha-...

Search for "Attachment"