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

Captcha using TTF & GD

Views: 147,342

Results 281 to 300 of 593
30 Jan 2008, 6:50 PM
#281
ktnaturals avatar

ktnaturals

Zen Follower

Join Date:
Dec 2006
Location:
Ohio
Posts:
196
Plugin Contributions:
0

Captcha using TTF & GD

DivaVocals:

Apparently the answer is that the text on the forms is a typo.:smile: No worries..
There was no typo. It said "case insensitive." :wink:

I feel for you. I'm so glad I'm my own boss now. :smile:

30 Jan 2008, 11:09 PM
#282
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Captcha using TTF & GD

KTNaturals:

There was no typo. It said "case insensitive."It's still the wrong text.. That means it's still a typo..:yes:

KTNaturals:

I feel for you. I'm so glad I'm my own boss now.Sorry for me??:smile: For trying to answer my client's questions?? For not having a perfect client?? No reason to feel for me.. It's part of the cost of being the boss ya know??:yes: All my clients can't easy to work with.. though it is something I strive for:laugh:.. for the record.. I AM my own boss too or was that not clear??:wink:

I thank you all for your responses.. I have a clear idea on how to proceed..:cool:

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

2 Feb 2008, 11:02 PM
#284
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Captcha using TTF & GD

If anyone's interested in using the Captcha feature with their Return Authorisation Request page..this is how I did it (it works great for me).

First modify your header_php.php file located in
\includes\modules\pages\returns
so it looks something like this (only modified part of file shown):

<?php
/**
 * Return Page
 * 
 * @package page
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: header_php.php 3230 2006-03-20 23:21:29Z drbyte $
 */
require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));

// BOF Captcha
if(CAPTCHA_CONTACT_US != 'false') {
	require(DIR_WS_CLASSES . 'captcha.php');
	$captcha = new captcha();
}
// EOF Captcha

  //require('includes/application_top.php');
if (REGISTERED_RETURN == 'true'){
  if (!$_SESSION['customer_id']) {
    $_SESSION['navigation']->set_snapshot();
    zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
  }
}


  $error = false;

  if (isset($_GET['action']) && ($_GET['action'] == 'send')) {
    $name = zen_db_prepare_input($_POST['contactname']);
    $email_address = zen_db_prepare_input($_POST['email']);
	$telephone = zen_db_prepare_input($_POST['telephone']);
    $street_address = zen_db_prepare_input($_POST['street_address']);
    $city = zen_db_prepare_input($_POST['city']);
    $state = zen_db_prepare_input($_POST['state']);
    $postcode = zen_db_prepare_input($_POST['postcode']);
    $order_number = zen_db_prepare_input($_POST['order_number']);
    $value = zen_db_prepare_input($_POST['total_value']);
    $item_number = zen_db_prepare_input($_POST['item_number']);
    $item_name = zen_db_prepare_input($_POST['item_name']);
    $action = zen_db_prepare_input($_POST['action']);
    $reason = zen_db_prepare_input(strip_tags($_POST['reason']));

  $zc_validate_email = zen_validate_email($email_address);

// BOF Captcha
  if (is_object($captcha) && !$captcha->validateCaptchaCode()) {
    $error = true;
    $messageStack->add('returns', ERROR_CAPTCHA);
  }
// EOF Captcha
	
  if ($zc_validate_email and !empty($reason) and !empty($name) and !$error) {

Don't forget the very last line

Note that the code above will configure it so that in admin when you turn off the captcha on the Contact Us page, it would also turn off the captcha on the Returns page as well. I have a feeling you would need to edit the SQL to have a separate setting (something I wasn't sure on how to do).

Then in..
includes\templates\YOUR_TEMPLATE\templates
edit tpl_returns_default.php so it looks like this:

<label class="inputLabel" for="entry-action"><?php echo ENTRY_ACTION; ?></label>
<?php echo zen_draw_input_field('action', $default_action, 'size="20" id="entry-action"') ; ?>

<?php
}	
?>

</fieldset>
<br class="clearBoth" />
<fieldset id="write">
<legend><?php echo ENTRY_REASON . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></legend>
<?php echo zen_draw_textarea_field('reason', '30', '7', '', 'id="reason"'); ?>
</fieldset>

<?php
// BOF Captcha
if(is_object($captcha)) {
?>
<fieldset>
<legend><?php echo TITLE_CAPTCHA; ?></legend>	
<?php echo $captcha->img(); ?>
<?php echo $captcha->redraw_button(BUTTON_IMAGE_CAPTCHA_REDRAW, BUTTON_IMAGE_CAPTCHA_REDRAW_ALT); ?>
<br class="clearBoth" />
<label for="captcha"><?php echo TITLE_CAPTCHA; ?></label>
<?php echo $captcha->input_field('captcha', 'id="captcha"') . ' <span class="alert">' . TEXT_CAPTCHA . '</span>'; ?>
<br class="clearBoth" />
</fieldset>
<?php
}
// BOF Captcha
?>

<br class="clearBoth" />
<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_SEND, BUTTON_SEND_ALT); ?></div>
</fieldset>
<?php
  }
?>
</div>
</form>
<div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div>
<br class="clearBoth" />
</div>

I'm quite sure that's all I did. Please state if it works ok for you, to confirm the instructions are correct and complete.

3 Feb 2008, 1:24 AM
#285
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Captcha using TTF & GD

Great info.. Wish I had this info beforehand.. I usually got around this by only allowing registered users to access the returns page.. Gonna definitely bookmark your instructions to try out on my test cart for future use..:yes:

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

3 Feb 2008, 5:42 AM
#286
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Captcha using TTF & GD

DivaVocals:

I consider customer satisfaction a meaningful effort. :blush: But thanks for your response.

Diva,

  1. There is no need to explain your motivations.

  2. My recommendation regarding investing time was to Andrew, not you. ;-)

  3. One can say:

IS NOT CASE SENSITIVE

-OR-

IS CASE INSENSITIVE

Totatoes, Totatos

But if you want to make the mod case sensitive the PHP code is there for you to work with.

  1. Just show your client some other forms protected by CAPTCHA and explain reasons needed. Should not be difficult to convince on the reasonableness of integrating captcha. But if client refuses, let it be.

Good luck,

Woody

3 Feb 2008, 6:56 AM
#287
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Captcha using TTF & GD

Woodymon:

Diva,

  1. There is no need to explain your motivations.

  2. My recommendation regarding investing time was to Andrew, not you. ;-)

  3. One can say:

IS NOT CASE SENSITIVE

-OR-

IS CASE INSENSITIVE

Totatoes, Totatos

But if you want to make the mod case sensitive the PHP code is there for you to work with.

  1. Just show your client some other forms protected by CAPTCHA and explain reasons needed. Should not be difficult to convince on the reasonableness of integrating captcha. But if client refuses, let it be.

Good luck,

WoodyOK..

Like I said.. I already worked out a solution, and have moved on to other things.. But thanks again for your input..:smile:

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

22 Feb 2008, 6:40 PM
#289
knottybynature avatar

knottybynature

New Zenner

Join Date:
Jul 2007
Location:
Western New York
Posts:
48
Plugin Contributions:
0

Re: Captcha using TTF & GD

greetings :D

i added the updated captcha mod with the optional 'hide telephone'. i went to my site as a guest and the captcha does not appear on any applicable pages-contact, tell a friend, registration.

http://knottybynature-ny.com/index.php?main_page=

did i forget to modify a file? i loaded the original captcha program first, then overwrote it with the updated files. if necessary i can overwrite everything with the backup i did (smart little me) and start over, although i'd rather not :no:

thanks,
cat

Knotty By Nature, Custom Fine Silver Jewelry
http://www.knottybynature-ny.com

1 Mar 2008, 8:54 AM
#290
megaman avatar

megaman

New Zenner

Join Date:
Jan 2007
Posts:
27
Plugin Contributions:
0

Re: Captcha using TTF & GD

Hi,

is there still a place to download the last version of this add-on ?
The one from the download section seems old and the link in the first post is not working anymore :/

Regards,

17 Apr 2008, 10:58 PM
#293
vlad avatar

vlad

New Zenner

Join Date:
Apr 2008
Posts:
2
Plugin Contributions:
0

Re: Captcha using TTF & GD

Hi,
I would like to use this contribution with ZC 1.3.8a. Only but important problem I have is that the image is not displayed. I have tried also captcha_test.php but image is missing too. I also tried to use link from source generated, like:

http://mysite/captcha_img.php?zenid=uj6babhkegc57ifmn2pp177qa5&rand=0.412157001208472668

Browser offers to download the picture instead of displaying it. Downloaded picture is fine when jpeg set. Image viewer is complaining about corrupted header for png and gif. Have you ever seen such a behaviour ? Any idea what's wrong ?

Thanks
Vlad

18 Apr 2008, 7:03 AM
#294
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

Try captcha_debug.php

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

18 Apr 2008, 2:01 PM
#295
johneemac avatar

johneemac

New Zenner

Join Date:
Sep 2006
Posts:
65
Plugin Contributions:
0

Re: Captcha using TTF & GD

Hello,

Tried both these capchas - the older TTF one :: CAPTCHA using TTF & GD

And :: captcha-number-subject-combo-in-one-1.0

Both of them show the image fine but dont work :

You can still send an email through if there has been no validation code entered relating to what the captcha image is showing.

I tied the newer version first, uni stalled then tried to older version.

Any ideas? V1.3.7.

Thanks.

18 Apr 2008, 8:58 PM
#296
vlad avatar

vlad

New Zenner

Join Date:
Apr 2008
Posts:
2
Plugin Contributions:
0

Re: Captcha using TTF & GD

Hi Andrew,

The output from captcha_debug.php was displayed as text. See attachment.

Thanks

Vladimir

11 May 2008, 3:03 AM
#297
zinfandel avatar

zinfandel

Zen Follower

Join Date:
Feb 2007
Location:
NNJ
Posts:
205
Plugin Contributions:
0

Re: Captcha using TTF & GD

Ruff...sniff sniff...

Can you tell me what this means

Fatal error: Call to a member function close() on a non-object in C:\wamp\www\intimateu\includes\classes\captcha.php on line **337

I need some help fixing this.

Please.
**

Elliot

The loves of my life are a good white zinfandel and my dog Homer.

11 May 2008, 10:02 PM
#298
zinfandel avatar

zinfandel

Zen Follower

Join Date:
Feb 2007
Location:
NNJ
Posts:
205
Plugin Contributions:
0

Re: Captcha using TTF & GD

Excuse the bump folks,

After I commented out line 337 in includes/classes/captcha.php

like so

// $za_dir->close();

It began to function normally.
Otherwise the error as in the previous post.

Elliot

The loves of my life are a good white zinfandel and my dog Homer.

12 May 2008, 5:15 AM
#299
necsy avatar

necsy

New Zenner

Join Date:
Dec 2007
Posts:
16
Plugin Contributions:
0

Re: Captcha using TTF & GD

JohneeMac:

Hello,

Tried both these capchas - the older TTF one :: CAPTCHA using TTF & GD

And :: captcha-number-subject-combo-in-one-1.0

Both of them show the image fine but dont work :

You can still send an email through if there has been no validation code entered relating to what the captcha image is showing.

I tied the newer version first, uni stalled then tried to older version.

Any ideas? V1.3.7.

Thanks.

Hi Johnee, have solved your problem?
I have the same problem, again with the version 1.3.7 (amended Italian)

Necsy

17 May 2008, 1:18 PM
#300
necsy avatar

necsy

New Zenner

Join Date:
Dec 2007
Posts:
16
Plugin Contributions:
0

Re: Captcha using TTF & GD

any ideas?