Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    JComments component    General discussion    Topic: Change Catpcha display
Pages: [1]   Go Down
  Print  
Author Topic: Change Catpcha display  (Read 17251 times)
0 Members and 1 Guest are viewing this topic.
korb
Jr. Member
**

Karma: 3
Offline Offline

Posts: 14



WWW
« on: December 13, 2008, 20:46:42 »

Hi,

I wish to know if it is possible to change the color of the background of captcha image.

Then I want to modify the engine make the letters always readeble, not distorted not altered, simple. And I want to have a specific color. I've seen the images of the "fonts" and I can't fogure out why they are distorted.


Thanks
Logged

Visit my JComments powered website
PC Adviser - IT Info & Shop in one place.
smart
Administrator
Hero Member
*****

Karma: 188
Offline Offline

Gender: Male
Posts: 1883



WWW
« Reply #1 on: December 16, 2008, 14:06:08 »

You can setup it manually in KCAPTCHA's configuration file /components/com_jcomments/libraries/kcaptcha/kcaptcha_config.php. More information about KCAPTCHA library can be found at official site: captcha.ru/en/kcaptcha/
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
korb
Jr. Member
**

Karma: 3
Offline Offline

Posts: 14



WWW
« Reply #2 on: December 16, 2008, 22:25:14 »

I wanted to know how to make the text unaltered, but obviously, I couldn't find any resource on link you provided.
Thank you, anyway
Danny
Logged

Visit my JComments powered website
PC Adviser - IT Info & Shop in one place.
smart
Administrator
Hero Member
*****

Karma: 188
Offline Offline

Gender: Male
Posts: 1883



WWW
« Reply #3 on: December 16, 2008, 22:32:08 »

See original configuration file (with author's comments):

Code:
<?php

# KCAPTCHA configuration file

$alphabet "0123456789abcdefghijklmnopqrstuvwxyz"# do not change without changing font files!

# symbols used to draw CAPTCHA
//$allowed_symbols = "0123456789"; #digits
$allowed_symbols "23456789abcdeghkmnpqsuvxyz"#alphabet without similar symbols (o=0, 1=l, i=j, t=f)

# folder with fonts
$fontsdir 'fonts';

# CAPTCHA string length
$length mt_rand(5,6); # random 5 or 6
//$length = 6;

# CAPTCHA image size (you do not need to change it, whis parameters is optimal)
$width 120;
$height 60;

# symbol's vertical fluctuation amplitude divided by 2
$fluctuation_amplitude 5;

# increase safety by prevention of spaces between symbols
$no_spaces true;

# show credits
$show_credits true# set to false to remove credits line. Credits adds 12 pixels to image height
$credits 'www.captcha.ru'# if empty, HTTP_HOST will be shown

# CAPTCHA image colors (RGB, 0-255)
//$foreground_color = array(0, 0, 0);
//$background_color = array(220, 230, 255);
$foreground_color = array(mt_rand(0,100), mt_rand(0,100), mt_rand(0,100));
$background_color = array(mt_rand(200,255), mt_rand(200,255), mt_rand(200,255));

# JPEG quality of CAPTCHA image (bigger is better quality, but larger file size)
$jpeg_quality 90;
?>

I hope that comments help you with understanding parameters...
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    General discussion    Topic: Change Catpcha display
 
Jump to: