Forums / Templates, Stylesheets, Page Layout / Code displays in the header of my webpage

Code displays in the header of my webpage

Locked

Views: 1,182

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
12 Mar 2007, 11:57 PM
#1
thunbug avatar

thunbug

New Zenner

Join Date:
Mar 2007
Posts:
26
Plugin Contributions:
0

Code displays in the header of my webpage

I followed the steps in FAQ to create a new Custom Template, https://www.zen-cart.com/tutorials/index.php?article=142. It worked okay but now I have some code in my header section starting with " // Display all header alerts via messageStack:"

Below is the code from template_info.php where this is coming from. Can someone tell me why this code is displayed on my website? Unfortunately, I saved the changes in the /template_default directory by mistake before I saved again to /custom.

<?php /** * Common Template - tpl_header.php * * this file can be copied to /templates/your_template_dir/pagename<br /> * example: to override the privacy page<br /> * make a directory /templates/my_template/privacy<br /> * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_header.php<br /> * to override the global settings and turn off the footer un-comment the following line:<br /> * <br /> * $flag_disable_header = true;<br /> * * @package templateSystem * @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: tpl_header.php 4813 2006-10-23 02:13:53Z drbyte $ */ ?> <?php $template_name = 'CUSTOM';$template_version = 'Version 1.0';$template_author = Thunbug';$template_description = 'This is my own template, created for my site at [www.xxxxx.com/shop';$template\_screenshot](http://www.xxxxx.com/shop';$template_screenshot) = '';?>

// Display all header alerts via messageStack:
if ($messageStack->size('header') > 0) {
echo $messageStack->output('header');
}
if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
echo htmlspecialchars(urldecode($_GET['error_message']));
}
if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
echo htmlspecialchars($_GET['info_message']);
} else {
}
?>

13 Mar 2007, 3:18 AM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,667
Plugin Contributions:
0

Re: Code displays in the header of my webpage

Uh ... you have modified the wrong file.

the file you have change is the tpl_header.php.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

13 Mar 2007, 12:58 PM
#3
thunbug avatar

thunbug

New Zenner

Join Date:
Mar 2007
Posts:
26
Plugin Contributions:
0

Re: Code displays in the header of my webpage

Mmm. I see...wonder how I got those mixed up. I've looked at a number of FAQ topics on customization and I guess I got myself all mixed up. Thank you Kim.