Wish we could get a better readable Captcha...

Use GitHub to post feature requests for phpwcms.
Locked
Nordlicht
Posts: 160
Joined: Wed 12. Apr 2006, 08:16
Location: Germany, near Hamburg
Contact:

Wish we could get a better readable Captcha...

Post by Nordlicht »

...like this one.
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Post by pepe »

Je bessere es zu lesen ist... um so besser kann es auch automatisch ausgewertet werden :roll: :cry:

Ein Kompromiss wirds also immer bleiben!
spirelli
Posts: 996
Joined: Tue 27. Jul 2004, 13:37
Location: London

Post by spirelli »

You can customize the look and behaviour of the captcha function if you find and change the relevant files.
Goran
Posts: 81
Joined: Thu 27. Nov 2003, 11:43
Location: Zagreb, Croatia
Contact:

Post by Goran »

Wish we could get a better readable Captcha
Just edit this file: include/inc_ext/SOLMETRA_FormValidator/SPAF_FormValidator.class.php
Take a look: http://www.7dana.com/contact.phtml
Nordlicht
Posts: 160
Joined: Wed 12. Apr 2006, 08:16
Location: Germany, near Hamburg
Contact:

Post by Nordlicht »

Looks nice, just what I was looking for.
So you changed this part:

Code: Select all

  // !!! EDITABLE CONFIGURATION ===============================================
  var $lib_dir      = 'lib/';
  var $backgrounds  = array('01.png', '02.png', '03.png', '04.png', '05.png', 
                            '06.png', '07.png', '08.png', '09.png', '10.png', 
                            '11.png', '12.png');
  var $fonts        = array('solmetra1.ttf', 'solmetra2.ttf', 'solmetra3.ttf', 
                            'solmetra4.ttf');
  var $font_sizes   = array(13, 14, 15);
  var $colors       = array(
    array(221, 27, 27),
    array(94, 71, 212),
    array(212, 71, 210),
    array(8, 171, 0),
    array(234, 142, 0)
  );
  var $shadow_color = array(255, 255, 255);
  var $hide_shadow  = false;
  var $char_num     = 5;
  var $chars        = array('A', 'C', 'D', 'E', 'F', 'H', 'J', 'K', 'L', 'M', 
                            'N', 'O', 'P', 'R', 'S', 'T', 'Y', '3', '4', '6', 
                            '7', '9');
  var $session_var  = 'spaf_form_validator_tag';
  
  var $no_session   = false;  // If this is set to true following config 
                              // variables must also be set
  
  var $work_dir     = 'work'; // If $no_session is set to true set this variable
                              // to the directory in which FormValidator will 
                              // create its temporary files.
                              // If path begins with a backslash (i.e. /tmp), 
                              // FormValidator will assume it's an absolute path
                              // Otherwise path will be treated as relative to
                              // FormValidator class location. 
                              // Please note that this directory must be 
                              // writable to PHP scripts.
  
  var $work_ext     = 'spaf'; // An extention to use for temporary work files
  
  var $tag_ttl      = 120;    // Number of minutes to consider user tag valid  
                              // Used only in conjunction with: 
                              // $no_session = true
  
  var $tag_cookie   = 'spaf_formvalidator'; // the name of cookie to be used 
                                            // for tagging a user 
  
  var $gc_prob      = 1;      // Percental probability for garbage collector to
                              // launch per each instance of FormValidator 
                              // class. Garbage collector is needed to remove
                              // old user tag files from disk if you use 
                              // $no_session = true
                              // 0 means GC will never launch
                              // 100 means GC will launch everytime you 
                              // instantiate this class 
Right?

Did you removed the backgrounds? By the way where can I found those images?
And than just edit the colors and shadow_color?
Goran
Posts: 81
Joined: Thu 27. Nov 2003, 11:43
Location: Zagreb, Croatia
Contact:

Post by Goran »

Try this configuration (don't forget to replace fonts names):
var $backgrounds = array('11.png', '12.png');
var $fonts = array('LUCON.TTF', 'GOTHIC.TTF');
var $font_sizes = array(28, 32, 36);
var $colors = array(
array(128, 128, 128),
array(139, 139, 139),
array(142, 142, 142),
array(146, 146, 146),
array(160, 160, 160)
);
var $shadow_color = array(255, 255, 255);
var $hide_shadow = false;
var $char_num = 5;
var $chars = array('A', 'C', 'D', 'E', 'F', 'H', 'J', 'K', 'L', 'M',
'N', 'P', 'R', 'S', 'T', 'Y', 'W', '1', '2', '3', '4', '6',
'7', '9');
Also, copy following images to /phpwcms_template/inc_captcha/ directory:
Image
Image
Locked