close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Captcha Font color not changing

Thread began 10/28/2009 9:38 am by asnw0764437428 | Last modified 11/13/2009 2:59 am by asnw0764437428 | 11397 views | 28 replies |

asnw0764437428

Captcha Font color not changing

Have the captcha files working on a couple of sites, but for one no matter what color settings I use the font does not change color. At the moment it is yellow. The site is on the same server as the other that are working, so its not the server. All the code is exactly the same as the others that work, except the changes associated with the form fields etc.

Any idea what it could be?. I noticed that in the WAVT_CaptchaSecurityImages.php file at the bottom of the code, it already has settings there already. yes, I have even tried changing the color settings here, but still no joy. Could it be something to do with the GDLibrary version 2.0.34 or Freetype version 1.3 ?

Sign in to reply to this post

tom92909Beta Tester

Check out the WA_Globals.php file
in the WA_Globals directory....

php:
$WAGLOBAL_Captcha_Width = "120" ;

  $WAGLOBAL_Captcha_Height = "24" ;
  $WAGLOBAL_Captcha_Characters = "5" ;
  $WAGLOBAL_Captcha_Font = "Fonts/MOM_T___.TTF" ;
  $WAGLOBAL_Captcha_BG = "cccccc" ;
  $WAGLOBAL_Captcha_Noise = "000000" ;
  $WAGLOBAL_Captcha_Text = "fffc00" ;
  $WAGLOBAL_Captcha_BG_transparent = "0" ;
Sign in to reply to this post

Jason ByrnesWebAssist

Also make sure the captcha image tag passes all of the WA_Globals variables:

php:
<img  src="WA_ValidationToolkit/WAVT_CaptchaSecurityImages.php?noisecolor=<?php echo $WAGLOBAL_Captcha_Noise?>&bgcolor=<?php echo $WAGLOBAL_Captcha_BG?>&textcolor=<?php echo $WAGLOBAL_Captcha_Text?>&transparent=<?php echo $WAGLOBAL_Captcha_BG_transparent?>&characters=<?php echo $WAGLOBAL_Captcha_Characters?>&width=<?php echo $WAGLOBAL_Captcha_Width?>&height=<?php echo $WAGLOBAL_Captcha_Height?>&font=<?php echo $WAGLOBAL_Captcha_Font?>&gridfreq=0" alt="security code" />
Sign in to reply to this post

asnw0764437428

captcha font color

My WA Globals are set to this:

$WAGLOBAL_Captcha_Width = "200" ;
$WAGLOBAL_Captcha_Height = "40" ;
$WAGLOBAL_Captcha_Characters = "5" ;
$WAGLOBAL_Captcha_Font = "Fonts/MOM_T___.TTF" ;
$WAGLOBAL_Captcha_BG = "ffffff" ;
$WAGLOBAL_Captcha_Noise = "eeeeee" ;
$WAGLOBAL_Captcha_Text = "ff0000" ;
$WAGLOBAL_Captcha_BG_transparent = "0" ;

You would think the text would be 'red'. Well its currently 'Blank' If I change the 'Captcha_Text = "000000" you would think it is Black?. Well its yellow????

Take a look at the example:
contact_us.php

This is all as it should be: (not edited)

<img src="WA_ValidationToolkit/WAVT_CaptchaSecurityImages.php?noisecolor=<?php echo $WAGLOBAL_Captcha_Noise; ?>&bgcolor=<?php echo $WAGLOBAL_Captcha_BG; ?>&textcolor=<?php echo $WAGLOBAL_Captcha_Text; ?>&transparent=<?php echo $WAGLOBAL_Captcha_BG_transparent; ?>&characters=<?php echo $WAGLOBAL_Captcha_Characters; ?>&width=<?php echo $WAGLOBAL_Captcha_Width; ?>&height=<?php echo $WAGLOBAL_Captcha_Height; ?>&font=<?php echo $WAGLOBAL_Captcha_Font; ?>" alt="security code" />

On another site (on the same server) the font will not show up at all.

I have also tried another captcha tool, this time a dreamweaver extension I have just purchased and that works fine, just a few tweeks to integrate UE and all should be well.

It seems that this solution pack works when it feels like it and sometime when it works ignores some settings. The whole point of this solution was I think to save people time?

I would suggest getting this into a dedicated extension and integrated say within UE. makes sense!

Sign in to reply to this post

Jason ByrnesWebAssist

In the WA_ValidationToolkit/WAVT_CaptchaSecurityImages.php file, line 168 should be:

$textcolor = isset($_GET['textcolor']) && $_GET['textcolor'] != "" ? $_GET['textcolor'] : '000000';


can you check that yours is set properly.

captcha is a built into the CSS Form Builder extension.

Sign in to reply to this post

asnw0764437428

Captcha text color not changing

I had a look at the code you mentioned and all seems to be correct. However I decided to set the form again using all the code from the orginal contact page you provide.

You will notice from the example page:
contact_us.php

that the Text color is still yellow. If you view source it has the text color as 'Black' ???

I am not too sure as to what is going on.

Sign in to reply to this post

neilo

Not the correct technical approach, but if it were me I would search (find/replace) the the 'Entire Current Local Site' > 'Source Code' for ' ffff00 ' to see where that colour is specified, then try changing the settings there, assuming that it's in a related page.

Sign in to reply to this post

asnw0764437428

Captcha text color not changing

I have already checked (just in case) something within a style could have caused the issue. No, nothing at all. When I change the font color it also sometimes disappears. Its as though it is ignoring any styling color related to the font. For example I have just changed the Font, Captcha BG and Captcha Noise to ff0000 (red) and hey the font now completely disappears, even though it is set to Black and showing as Yellow, its gone!!! ????

Sign in to reply to this post

neilo

That is weird.

If you want to try my settings, I have attached a copy of my WA_ValidationToolkit > WAVT_CaptchaSecurityImages.php (which is where the captcha image settings are stored).

Back up your existing file, then try the attached. This will help to narrow down the causes of your problem.

Let us know how you get on!

Attached Files
captcha.zip
Sign in to reply to this post

asnw0764437428

Captcha text color not changing

Nope.. just uploaded the validation file you attached, thanks. And no its still not having it.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...