There was no typo. It said "case insensitive." :wink:
I feel for you. I'm so glad I'm my own boss now. :smile:
Printable View
It's still the wrong text.. That means it's still a typo..:yes:
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:
When uploading, do I need to upload the files: captcha_debug.php, captcha_img.php or captcha_test.php? Also, am I right in thinking that the 'fonts' folder goes into the top root directory where 'includes' is?
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):
Don't forget the very last lineCode:<?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) {
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:
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.Code:<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>
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:
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.
4. 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
Interesting related report:
Spammers' bot cracks Microsoft's CAPTCHA
http://www.computerworld.com/action/...&intsrc=kc_top
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
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,