Very well, since this feature seem to be on demand, let's do a try-out.
First, I will post sectionized codings of the MOD called: Sicherheit. So - one section at the time for everybody, (as I have did several ones already - so it's all working), but - to make sure everybody is following me here - let's do this step-by-step.
// Clarification:
Make sure NOT to install the current Captcha MOD (nothing personal to the author of this topic. It is simply to instruct users by avoiding any confrontation with my modifications in order to install a clean copy of Sicherheit MOD).
// Preparation of steps:
Make a full backup of your uploaded Zen-Cart files (or test this on a test folder of Zen-Cart).
// Step 1:
From the attachment link, upload sicherheit.php file to your store's root path (yes, store-front where index.php file is, first, located).
// Step 2:
In your includes/languages/<your_language>/extra_definitions/sicherheit.php file (create the file first - of course),
Create the following:
<?php
define('ENTRY_SICHERHEIT', 'Verification number:');
define('ENTRY_SICHERHEIT_CODE', 'Code:');
define('ENTRY_SICHERHEIT_VALIDATION_CODE_ERROR', 'You did not entered the validation code correctly. Please, try again.');
?>
// Step 3:
In your includes/templates/<your_template>/templates/tpl_contact_us_default.php file,
find:
<label for="enquiry"><?php echo ENTRY_ENQUIRY . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
<?php echo zen_draw_textarea_field('enquiry', '30', '7', '', 'id="enquiry"'); ?>
<br class="clearBoth" />
add below:
<label class="inputLabel"><br class="clearBoth" /><?php echo ENTRY_SICHERHEIT_CODE . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
<?php echo zen_draw_hidden_field('sicherheit_dec', $comment_sicherheit); ?>
<?php echo zen_draw_input_field('sicherheit_code', $sicherheit_code, ' size="30" id="sicherheit_code"'); ?>
<img src="sicherheit.php?z=<?php echo $comment_sicherheit; ?>">
(Note: Please excuse the 'original filename from the <img src tag. I tried setting the definition name from includes/extra_datafiles but doesn't show up without it's source. It's probably due to the encryption / decryption handling method or something).
// Step 4:
In your includes/modules/pages/contact_us/header_php.php file,
find:
$enquiry = strip_tags(zen_db_prepare_input($_POST['enquiry']));
add below:
$sicherheit_dec = zen_db_prepare_input($_POST['sicherheit_dec']);
$sicherheit_code = zen_db_prepare_input($_POST['sicherheit_code']);
if (!isset($sicherheit_dec)) {
$messageStack->add('contact', ENTRY_SICHERHEIT_VALIDATION_CODE_ERROR);
} ###### End of if statement.
Then, find:
if ($zc_validate_email and !empty($enquiry) and !empty($name)) {
replace with:
if ($zc_validate_email and !empty($enquiry) and !empty($name) && $sicherheit_code != "" && ($sicherheit_code == str_replace('=', '´|´', base64_decode(base64_decode($sicherheit_dec))))) {
Then, find:
if (empty($enquiry)) {
$messageStack->add('contact', ENTRY_EMAIL_CONTENT_CHECK_ERROR);
}
add below:
if (($sicherheit_code == "") || ($sicherheit_code != str_replace('´|´', '=', base64_decode(base64_decode($sicherheit_dec))))) {
$messageStack->add('contact', ENTRY_SICHERHEIT_VALIDATION_CODE_ERROR);
}
// End of steps:
So, as you can see, this is just for the contact us page. Of course, I coded it for the rest of offered features from the DEV team (such as: login, registration, tell-a-friend ect ...) but I just wish to make sure that it works for everybody first.
Try this on and let me know how it works for you. :thumbsup:
Security note: This feature has been totally & entirely tested before posting these results. It took me hours of work just to figure how something like this could be implemented.
If you require assistance, based on these modifications, please - do NOT hesitate to ask them. :wink2:
Good luck !