Originally Posted by
Woodymon
When you installed the captcha mod did you upload the provided override for tpl_modules_create_account.php to your custom template directory?
I do not see the fieldset tags display in the browser on the create acct/login page (/index.php?main_page=login) when captcha is disabled in admin.
However as Paul stated when viewing the source in the browser I do see a lone closing </fieldset> tag all by all itself, where the captcha code would be rendered. It is errant but shouldn't hurt anything.
Which browser are you noticing issue?
I'm running ZC 1.36 fresh install with captcha_0.99.136 mod. Viewing page in Firefox 2.0.
BTW, what kind of errors are your customers observing when captcha is enabled?
Woody
Just on that closing </fieldset> -- it appears to be a problem with the core Zen-Cart code, rather than anything the CAPTCHA modification has added, as it comes up on a fresh install of the original zipfile from sourceforge too.
My code, looks a bit like:
Code:
@@ -183,6 +183,56 @@
</fieldset>
<?php
+if (ACCOUNT_VALIDATION == 'true') {
+?>
+
+<?php
+if (strstr($_SERVER['REQUEST_URI'],'create_account') && CREATE_ACCOUNT_VALIDATION == 'true' || strstr($_SERVER['REQUEST_URI'],'login') && LOGIN_VALIDATION == 'true') {
+?>
+
+<?php
+ if ($is_read_only == false || (strstr($_SERVER['REQUEST_URI'],'create_account')) || (strstr($_SERVER['REQUEST_URI'],'login'))) {
+ $sql = "DELETE FROM " . TABLE_ANTI_ROBOT_REGISTRATION . " WHERE timestamp < '" . (time() - 3600) . "' OR session_id = '" . zen_session_id() . "'";
+ if( !$result = $db->Execute($sql) ) { die('Could not delete validation key'); }
+ $reg_key = generate_captcha_code();
+ $sql = "INSERT INTO ". TABLE_ANTI_ROBOT_REGISTRATION . " VALUES ('" . zen_session_id() . "', '" . $reg_key . "', '" . time() . "')";
+ if( !$result = $db->Execute($sql) ) { die('Could not check registration information'); }
+?>
+
+
+<fieldset>
+<legend><?php echo CATEGORY_ANTIROBOTREG; ?></legend>
+<label class="inputLabel" for="antirobotreg"><?php echo ENTRY_ANTIROBOTREG ?></label>
+
+<?php
+$validation_images = '';
+for($i = 0; $i < ENTRY_VALIDATION_LENGTH; $i++)
+ {
+ $parse_image = 'validation/validation_' . $reg_key{$i} . '.gif';
+ $parse_image_alt = $reg_key{$i};
+ $validation_images .= zen_image(DIR_WS_IMAGES . $parse_image, $parse_image_alt);
+ }
+ echo '<div class="centered">';
+ echo $validation_images . '<br />';
+ echo '</div>';
+?>
+
+<?php echo zen_draw_input_field('antirobotreg','', 'id="antirobotreg"') . (zen_not_null(ENTRY_ANTIROBOTREG) ? '<span class="alert">' . ENTRY_ANTIROBOTREG_TEXT . '</span>': ''); ?>
+<br class="clearBoth" />
+
+<?php
+ }
+?>
+
+<?php
+ }
+?>
+
+<?php
+ }
+?>
The first </fieldset> comes from the stock code, everything with a + is my changes -- and the only additional <fieldset> (line 202) i've added (which probably could do with a closing tag around line 206 too, i'll make sure I add one for the next release.) is safely caught within the initial if().
Paul
Bookmarks