Jump to content

Editing Ugly Captcha Images?


Guest perlinajewellery

Recommended Posts

Guest perlinajewellery

I have done a search for both captcha and security code in the forums but have come up with nothing.

I would like to customize the default captcha / security code images that come with the cube cart script as they are quite unattractive [sorry guys but they really are!]

Can anyone point me in the right direction? I'm using version 4.1.1.

Link to comment
Share on other sites

Guest hennaboy

I know the font is called anonymous.gdf which is called from the classes/gd/font directory.

The images etc are detailed in the gd.inc around line 119

Link to comment
Share on other sites

  • 2 weeks later...
Guest Ash Spain

Ok so i have just started looking into this as well.

I have found a replacement captcha script that is available under the GNU General Public License.

It lets you use any ttf you want, rotate a specific amount (or randomly) and to specifiy a background image. As far as i know, this is all that is needed to make a captcha that fits any site style while still remaining secure.

I don't think i'm breaking the forum rules by saying you can find it under google with fewer trolls captcha, but if i am then go ahead and delete this post.

It says you can put it into any form you like really easily so i'm hoping it will be really easy to implement.

I will post my findings when I'm done.

Link to comment
Share on other sites

  • 4 months later...

I know the font is called anonymous.gdf which is called from the classes/gd/font directory.

The images etc are detailed in the gd.inc around line 119

i looked around line 119... how can i change the noise?

Link to comment
Share on other sites

  • 1 month later...
Guest perlinajewellery

Has anyone figured out how to edit the captcha settings yet? All I really wanted to do was decrease the font size and generally make the entire captcha image smaller to fit nicer into my theme.

I have figured out how to make the image smaller but the bottom of the captcha text is now cut off because the font size is too big. I have tried editing variables in the gd.inc and phpplot files but nothing is working.

Link to comment
Share on other sites

  • 1 month later...

The easiest way to make the captcha nicer eg: no scratchy image is to turn off your GD in general settings.....they will just be plain black no#s.......just have to remember than it won't automatically do your thumbs.

Has anyone figured out how to edit the captcha settings yet? All I really wanted to do was decrease the font size and generally make the entire captcha image smaller to fit nicer into my theme.

I have figured out how to make the image smaller but the bottom of the captcha text is now cut off because the font size is too big. I have tried editing variables in the gd.inc and phpplot files but nothing is working.

Link to comment
Share on other sites

Guest Brivtech

I would very mich like to see a noise level control, as well as some alternatives implemented into CC. I've had trouble from customers not being able to order because they couldn't register because the captcha image was too difficult to interpret.

Obviously in the long term, I want to have captcha back, but in a better form.

Link to comment
Share on other sites

Can relate to that.....while testing my store.....I must have tried 4 times! (minty moment :) ) If I had that much trouble and I was a customer then I wouldn't bother....hence as soon as my store is live....I'm just going to turn the GD off.

Link to comment
Share on other sites

Guest ej-rebirth

In the gd.inc at around line 152, you can change the number of scratches to apply to the image, as well as changing the font used.

You'll need to convert any font you use to gdf format. But it's pretty easy to change a few values.

I'm not sure if i'm prohibited in posting the exact lines to change on this forum or not :ninja2:

Link to comment
Share on other sites

Guest Brivtech

You're not prohibited from doing that at all, it's very useful information and we welcome it.

I've just tried this and its great. To elaborate futher, open: classes/gd/gd.inc.php

Find on line 151:

		## Add Random noise

		for ($i = 0; $i < 25; $i++) {

... and change the 25 to something less. I'm using 3.

It would be nice if the noise level could be adjusted directly through admin.

Link to comment
Share on other sites

Guest ej-rebirth

:ninja2: I am using 10, but i've also changed the font to tahoma (after converting it from ttf to gdf so PHP can read it).

It certainly seems much more friendly to the average user.

However, I still think the CAPTCHA can be improved, maybe having more uniformed lines, or alternating between a few fonts. I'm playing around with it as of this moment, I'll see if I can come up with anything fancy!

Edit:

I decided to do something quick for my client, (time is money, and all that) so I havn't actually made any big changes.

## Add Random noise

for ($i = 0; $i < 10; $i++) {

$rx1 = $this->img["width"];

$rx2 = 0;

$ry1 = $this->img["height"] - ($i*6)+2;

$ry2 = $ry1;

$rc1 = imagecolorallocate($this->img["src"],100,100,100);

imageline ($this->img["src"], $rx1, $ry1, $rx2, $ry2, $rc1);

}

I replaced the whole '## Add Random noise' section with the above to give me 6 horizontal same colour lines. Readability is much better.

It also looks less like a child has gone on the rampage with crayons.

Link to comment
Share on other sites

  • 3 months later...
Guest jacksond

I have made all the changes noted above to my gd file, I converted a verdana font to gdf and uploaded it. I see absolutely no change to the captcha image - not in font, not in the number of scratches.

Am I missing something? Is there something else I should do to change this?

Thanks very much for any help. Some of those are really hard to read, I'd hate to see a customer sitting there thinking that she can't be bothered.

Link to comment
Share on other sites

  • 2 years later...
Guest arames

I was wondering, is there a way to make the Captcha Image show ONLY Numbers.

Example:

32189

instead of Letters + Numbers.

Because sometime the 0 (zero) and O (O like Olive) can be confusing :sourcerer:

Would love to hear any thoughts on that

Anticipated thanx,

Arames

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...