Forums / All Other Contributions/Addons / Captcha using TTF & GD

Captcha using TTF & GD

Views: 147,342

Results 321 to 340 of 593
18 Jul 2008, 5:17 AM
#321
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Captcha using TTF & GD

But...the validation through CAPTCHA is not active, you can leave the field blank and the message is sent the usual way...any suggestion to have the verification working? (Using v.1.3.8a)starks -- Look at your edits to see if you have them all in place. I have it installed on 1.3.8a and working.

Has there been any fix for the "Enable This Picture" problem with the Ultimate SEO module?Jeff_Mash -- Still looking into it... I've been able to recreate the problem, just have to trace it back to the cause.

Dave
Always forward thinking... Lost my mind!

18 Jul 2008, 6:31 PM
#322
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: Captcha using TTF & GD

davewest:

Jeff_Mash -- Still looking into it... I've been able to recreate the problem, just have to trace it back to the cause.

Thanks Dave. I will be anxiously awaiting your response. If you need me to verify anything, just let me know.

  • Jeff
19 Jul 2008, 5:39 PM
#323
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: Captcha using TTF & GD

Ok, I am making SOME progress with the "Enable This Picture" error that you get when using Ultimate SEO's.

Right now, I am simply working with the captcha_test.php until I get it to work totally correct.

If you edit the captcha_test.php, do the following:

FIND:

$this->img_href = zen_href_link('captcha_img.php', zen_session_name() . '=' . zen_session_id(), 'SSL', false, false, true);

REPLACE WITH:

$this->img_href = original_zen_href_link('captcha_img.php', zen_session_name() . '=' . zen_session_id(), 'SSL', false, false, true);

That will make the image appear! However, now it doesn't matter what code I type in, I am still getting an INVALID error. I will continue to poke around but if you can assist, just let me know what you find out.

  • Jeff
19 Jul 2008, 5:50 PM
#324
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: Captcha using TTF & GD

From what I can see, when you submit the form, the following variable is empty:

$_POST[$_SESSION['captcha_field']]

Now to figure out how to make sure the value gets saved in there!

  • Jeff
19 Jul 2008, 6:08 PM
#325
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: Captcha using TTF & GD

Nevermind my last post. The captcha_test page won't validate the code correctly, and I was trying to figure out why.

However, the real script on the Contact Us page now works. So in order to get around the Enable This Picture error that you see when using the Ultimate SEO module, simply do that little code change below and it will display the picture for you.

Hope that helps!

Open the includes/classes/captcha.php and change the following:

FIND in function captcha():

$this->img_href = zen_href_link('captcha_img.php', zen_session_name() . '=' . zen_session_id(), 'SSL', false, false, true);

REPLACE WITH:

$this->img_href = original_zen_href_link('captcha_img.php', zen_session_name() . '=' . zen_session_id(), 'SSL', false, false, true);
  • Jeff
20 Jul 2008, 8:41 PM
#326
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: Captcha using TTF & GD

Jeff_Mash:

Open the includes/classes/captcha.php and change the following:

Jeff.. tried the code change and got a white screen....

I've tested on my heavy modified site, I use USEO. Also tested on a fresh install with no modes or .htaccess .. all 1.3.8a I get the same results on my testing server.

I found if I comment out a line in includes/init_includes/init_customer_auth.php
line;

zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));

CAPTCHA shows and works, but I don't think that would be a good idea for a live site. I don't have a SSL cert installed on my testing server, so I'm still looking at the code. For now, I don't think USEO or .htaccess is the problem, but more of an SSL thing. Least that's how it's behaving on my system.

Dave
Always forward thinking... Lost my mind!

20 Jul 2008, 10:17 PM
#327
knuckle_101 avatar

knuckle_101

Totally Zenned

Join Date:
Dec 2005
Location:
Cincinnati Ohio
Posts:
1,034
Plugin Contributions:
3

Re: Captcha using TTF & GD

Okay after some retesting and and doing some odd ball reconfigurations if you are using the captcha-number-subject-combo-in-one-1.0 here is a way to test your mod install by doing the following to make sure it is not folder over ride related.

Before doing so be sure to back up the original files no matter the issue and you will have a backup of the original and can replace any problems with it.

Some of you are using this mod with Ultimate SEO however the pages that the captcha work on are not to be used in SEO unless this is a necessary must and it is not recommended to use with the following pages if you have it configured this way.

Pages Are:

  1. Create Account Page
  2. Leave A Review Page
  3. Tell A Friend Page
  4. Login Page
  5. Contact Us Page
  6. Link Submit - Only if your using this

These pages are not recommended for rank or search engines not sure why you would even use these pages for rank or any other search engine related tasks.

If you have your htaccess file configured to rewrite them simply rewrite the htaccess file to ignore friendly url on the pages above.

Also for the ones with SSL on your live site follow these steps as well so you can find out if your over ride folders are working.

In the mod folders that you downloaded you will see folders name YOUR_TEMPLATE make sure they are renamed to the exact template you are using.

Like in includes/templates/classic if you are using this for your template rename the folders in the mod folders from YOUR_TEMPLATE to classic. if you think you done so double check to be absolute sure they are named same as your template folder.

If you do not know which template you are using then go to the zencart
admin --> templates, this will tell you which template you are using.

Now since you have checked and made sure which template you have named all folders correctly and it still does not work do the following and test it this way.

Instead of the over ride folders replace the original files instead of using the over ride folder.

Here is how you do that.

  1. In your ftp go to all folders that you see in the mod folder

For example the includes/modules/YOUR_TEMPLATE just like it is in the downloaded file you got from the download sections of zencart.

Now instead of using the override replace the file in the main modules folder create_account.php and do all files this way and then test your store.

It has been reported to us that sometimes this mod does not work in the over rides reason is unknown and is still under development. Until this you can test this on a test site and not a LIVE site and see if it works.

here is a 100% live site we just installed this mod on and nothing was done to it, it is the same exact file set you are using.

https://www.echo-electronics.com

This site is using both Ultimate SEO and SSL at the same time and it works fine.

Do the above tests and see how it works for you. If it works after testing with the core files instead of the over ride folder then you know one of the few things listed.

  1. Another mod is conflicting if any installed.
  2. Your over ride setup is not complete in some way
  3. Your htaccess rewrite is not written or coded correctly
  4. Just forgot something?

The site I posted shows this mod is in 100% working order and the problem should go away after you tried everything above.

As for shared ssl this should work as well but we have no means of testing shared ssl as we do not use shared for security reasons.

We wish you luck.

PCI Certified Web Hosting - ControlScan, Security Metrics (Platinum Partner), McAfee, TrustKeeper
Business Class Web Hosting - Linux and cPanel Powered

3 Aug 2008, 7:50 PM
#328
ts232 avatar

ts232

Zen Follower

Join Date:
May 2006
Posts:
167
Plugin Contributions:
0

Re: Captcha using TTF & GD

Thanks Andrew for the Mod, and everyone for the help with debugging and documentation.

I installed this and it works perfectly with just one small exception. I use css buttons, and the redraw image button is not active. The user can not click on it to generate an action, it simply selects the ALT text.

Does anyone have a suggestion for a fix? Either making the CSS button work, or disabling it for this single use?

--
Author of Stock vs. Sales Report

3 Aug 2008, 8:03 PM
#329
ts232 avatar

ts232

Zen Follower

Join Date:
May 2006
Posts:
167
Plugin Contributions:
0

Re: Captcha using TTF & GD

I am thinking a fix could be in the classes/captcha.php function:

function redraw_button($image, $alt = '', $parameters = '', $sec_class = '') {
    $redraw = 'onclick="document.getElementById(\'captcha-img\').src=\'' . $this->img_href . '&rand=\'+Math.random();return false;"';
    return zen_image_button($image, $alt, $redraw . ' ' . $parameters, $sec_class );
}

--
Author of Stock vs. Sales Report

5 Aug 2008, 11:54 PM
#330
e_aroma avatar

e_aroma

New Zenner

Join Date:
Jun 2008
Location:
Athens, Greece
Posts:
14
Plugin Contributions:
0

Re: Captcha using TTF & GD

Hi,

Thanks a lot for this very good addon and helpfull post from all.

First :

For the friends who face problem with mysql...
simple replace

INSERT INTO configuration_group (.......
WITH
INSERT IGNORE INTO configuration_group (........

this will help to bypass problems like value already exist :D

Second :

I have 2 languages in my site
Greek and English
First Language the Greek (NOT WORKING REDRAW :dontgetit )
Second language English and NOW WORKING AT ALL :no:
Any idea ????

ZEN CART 1.3.8

11 Aug 2008, 11:00 AM
#331
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: Captcha using TTF & GD

ts232:

I use css buttons, and the redraw image button is not active. The user can not click on it to generate an action, it simply selects the ALT text.
includes/classes/captcha.php:
Find

  function redraw_button($image, $alt = '', $parameters = '', $sec_class = '') {
    $redraw = 'onclick="document.getElementById(\'captcha-img\').src=\'' . $this->img_href . '&rand=\'+Math.random();return false;"';
    return zen_image_button($image, $alt, $redraw . ' ' . $parameters, $sec_class );
  }

Replace by

  function redraw_button($image, $alt = '', $parameters = '', $sec_class = '') {
    $redraw = ' onclick="document.getElementById(\'captcha-img\').src=\'' . $this->img_href . '&rand=\'+Math.random();return false;"';
    $redraw_button = zen_image_button($image, $alt, $redraw . ' ' . $parameters, $sec_class );
    if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes' && strpos($redraw_button, $redraw) === false) {
    	$redraw_button = str_replace('<span ', '<span ' . $redraw, $redraw_button);
    }
    return $redraw_button;
  }

NOTE: We are sorry that Andrew is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

11 Aug 2008, 12:21 PM
#332
ts232 avatar

ts232

Zen Follower

Join Date:
May 2006
Posts:
167
Plugin Contributions:
0

Re: Captcha using TTF & GD

Works great. Thanks Andrew!

--
Author of Stock vs. Sales Report

11 Aug 2008, 7:03 PM
#333
e_aroma avatar

e_aroma

New Zenner

Join Date:
Jun 2008
Location:
Athens, Greece
Posts:
14
Plugin Contributions:
0

Re: Captcha using TTF & GD

This code for css works fine and for me .
Thanks Andrew
Any idea why its not work for the second Language ?????
As remind I have 2 Languages Greek and English.
Even I tried to switch English to be default language works only for the Greek Language
Any idea please....

12 Aug 2008, 7:56 AM
#334
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: Captcha using TTF & GD

e-aroma:

This code for css works fine and for me .
Thanks Andrew
Any idea why its not work for the second Language ?????
As remind I have 2 Languages Greek and English.
Even I tried to switch English to be default language works only for the Greek Language
Any idea please....

I have already answered you. You have an error in the file includes/languages/english.php at line 1399 - you have an
extra blank or CR after "?>"

Delete ?> from the bottom of includes/languages/english.php

NOTE: We are sorry that Andrew is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

12 Aug 2008, 2:16 PM
#335
decostyle avatar

decostyle

Zen Follower

Join Date:
Mar 2008
Posts:
336
Plugin Contributions:
0

Re: Captcha using TTF & GD

Hi,

I was wondering if anyone can help me with some problems installing this mod.

I am running zen 1.3.8a using captcha v 2.8. I only want to use captcha on the link submit page. So have selectively uploaded the files:

fonts
includes/
modules/pages/links_submit/header_php.php
templates/my_template/templates/tpl_links_submit_default.php
all other files associated with captcha including sql patch.

When I run the captcha_test.php it works. When I click on the submit link page, I get a blank screen.

So I reverted to original files. Then started to install again and test.
When tpl_links_submit_default.php was uploaded, the submit page is still there without the captcha.

When links_submit/header_php.php was uploaded, the submit page dissappears.

On Admin, all other pages have been turned to false for captcha except for the submit link page.

:frusty: Can't figure out what the problem is. Appreciate any help from the forumers.

Thanks

13 Aug 2008, 9:51 AM
#336
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: Captcha using TTF & GD

Hi,

Decostyle:

using captcha v 2.8. I only want to use captcha on the link submit page.

Captcha v 2.8 support old version link submit page.

NOTE: We are sorry that Andrew is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

13 Aug 2008, 2:13 PM
#337
mamie avatar

mamie

New Zenner

Join Date:
Sep 2005
Location:
Baton Rouge, LA
Posts:
36
Plugin Contributions:
0

Re: Captcha using TTF & GD

Hi,

I have been trying to get this mod to work correctly...

captcha_using_ttf & gd__v2-8_28-04-2007 Captchav1-0 TelephoneHide

It was downloaded from here today.

Could someone tell me why this is looking this way.... I did finally get the scambled pic to work, but the redraw gif is missing and the title is missing.

I have copied all original files to keep and put the new Captcha files into the default template ( since I didn't thing using my over ride folder was working with this) it still did not work.

http://instantarmies.com/shop/index.php?main_page=contact_us

Thanks for any help.
Mamie

13 Aug 2008, 3:12 PM
#338
mamie avatar

mamie

New Zenner

Join Date:
Sep 2005
Location:
Baton Rouge, LA
Posts:
36
Plugin Contributions:
0

Re: Captcha using TTF & GD

I got it working....YEAAAA

Sorry for any trouble....

I found that the captcha.php file was not uploaded.

Certainly was a DUH moment...

Thanks,
Mamie

13 Aug 2008, 6:40 PM
#339
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: Captcha using TTF & GD

knuckle-101:

http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_47&products_id=915 this may be of some assistance

It would be correct for the new module to make a new topic and not discuss it here.

NOTE: We are sorry that Andrew is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

13 Aug 2008, 6:42 PM
#340
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: Captcha using TTF & GD

Mamie:

captcha_using_ttf & gd__v2-8_28-04-2007 Captchav1-0 TelephoneHide

What is it?

NOTE: We are sorry that Andrew is no longer with us.
We are grateful for all his contributions to the Zen Cart community.