mark27uk3 Posted February 24, 2004 Share Posted February 24, 2004 Hi Guys, Will you please glance your eyes over this piece of code from header.php and tell me why it's giving me a parse error. Its probably something really simple that I have missed but my eyes are going square staring at the code :huh: <table border="0" width="100%" cellspacing="0" cellpadding="1"> <tr class="headerNavigation"> <td align="center" class="headerNavigation"> <?php echo '<a href="' . tep_href_link(FILENAME_INFORMATION) . '?info_id=2">' . BOX_INFORMATION_SHIPPING . '</a>';">/*Enter Header Bar Info Here*/</td> <td align="right" class="headerNavigation"></a> </td> </tr> </table> Thanx Mark Lifes a bitch, then you marry one, then you die! Link to comment Share on other sites More sharing options...
241 Posted February 24, 2004 Share Posted February 24, 2004 where is the closing tag for the php I see no ?> is it meant to be here <table border="0" width="100%" cellspacing="0" cellpadding="1"> <tr class="headerNavigation"> ? <td align="center" class="headerNavigation"> <?php echo '<a href="' . tep_href_link(FILENAME_INFORMATION) . '?info_id=2">' . BOX_INFORMATION_SHIPPING . '</a>';">/*Enter Header Bar Info Here*/ ?></td> ? <td align="right" class="headerNavigation"></a> </td> </tr> </table> also the extra </a> so is the code <table border="0" width="100%" cellspacing="0" cellpadding="1"> <tr class="headerNavigation"> <td align="center" class="headerNavigation"> <?php echo '<a href="' . tep_href_link(FILENAME_INFORMATION) . '?info_id=2">' . BOX_INFORMATION_SHIPPING . '</a>';">/*Enter Header Bar Info Here*/ ?></td> <td align="right" class="headerNavigation"> </td> </tr> </table> No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
berkedam Posted February 24, 2004 Share Posted February 24, 2004 ion"></a> What's the </a> doing there? "If you're working on something new, then you are necessarily an amateur." Link to comment Share on other sites More sharing options...
241 Posted February 24, 2004 Share Posted February 24, 2004 here is a bit of code for you to compare with <table border="0" width="100%" cellspacing="0" cellpadding="0"> ?<tr class="headerNavigation"> ? ?<td align="center" class="headerNavigation"><?php echo '<a class="headerNavigation" href="' . tep_href_link(FILENAME_DEFAULT) . '">' . HEADER_LINKS_DEFAULT . '</a>' . ' | ' . "\n"; ?> ? <?php echo '<a class="headerNavigation" href="' . tep_href_link(FILENAME_BEAD_SPECIALS) . '">' . HEADER_LINKS_SPECIALS . '</a>' . ' | ' . "\n"; ?> ? <?php echo '<a class="headerNavigation" href="' . tep_href_link(FILENAME_PRODUCTS_NEW) . '">' . HEADER_LINKS_WHATS_NEW . '</a>' . ' | ' . "\n"; ?> ? ? ? ? <?php echo '<a class="headerNavigation" href="' . tep_href_link(FILENAME_REVIEWS) . '">' . HEADER_LINKS_REVIEWS . '</a>' . "\n"; ?> </td> ?</tr> </table> so your code would be <table border="0" width="100%" cellspacing="0" cellpadding="1"> <tr class="headerNavigation"> ? <td align="center" class="headerNavigation"> <?php echo '<a href="' . tep_href_link(FILENAME_INFORMATION) . '">' . BOX_INFORMATION_SHIPPING . '</a>' . "\n"; ?></td> ? <td align="right" class="headerNavigation"> </td> </tr> </table> No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
mark27uk3 Posted February 24, 2004 Author Share Posted February 24, 2004 cheers steve! Lifes a bitch, then you marry one, then you die! Link to comment Share on other sites More sharing options...
mark27uk3 Posted February 24, 2004 Author Share Posted February 24, 2004 Hi, Right the next problem I have is I have added an extra coloured bar below the header bar and I cant seem to get rid of the white gap to make it look all in one. Here is what it looks like, the code is below it. I would appreciate any help to close the gap. <?php /* $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ define('DIR_WS_TEMPLATE_IMAGES', 'templates/Original/images/'); // WebMakers.com Added: Down for Maintenance // Hide header if not to show if (DOWN_FOR_MAINTENANCE_HEADER_OFF =='false') { if (SITE_WIDTH!='100%') { ?> <table width="100%" cellpadding="10" cellspacing="0" border="0" BGCOLOR="#ffffff"> <tr><td> <table BORDERCOLORLIGHT="2F4F2F" CELLSPACING="2" CELLPADDING="4" BORDER="0" width="<?php echo SITE_WIDTH;?>" align="center" BGCOLOR="FFFFFF" align="center"> <tr><td BORDERCOLOR="FF0000"> <table border="0" width="100%"><tr><td> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr class="header"> <td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_TEMPLATE_IMAGES . 'logo.gif', 'Store Logo') . '</a>'; ?></td> <td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?> </td> </tr> <tr class="headerNavigation"> <td align="center" class="headerNavigation"> <?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">'. BOX_INFORMATION_HOME . '</a>' . "\n"; ?></td> <td align="right" class="headerNavigation"> </td> </tr> </table> <tr bgcolor="#FFFFCC" align="center"> <td height="20"><font face=Verdana, size=1 arial,="undefined" helvetica,="undefined" sans-serif="undefined"><font color="#000066"><?php echo '<a href="' . tep_href_link(FILENAME_INFORMATION) . '">' . BOX_INFORMATION_SHIPPING . '</a>' . "\n"; ?></a> </font><font face=Verdana, size=1 arial,="undefined" helvetica,="undefined" sans-serif="undefined" color="#000066">: <a href="http://www.myurl.co.uk/mfcart.php?mode=review">View shopping basket</a></font><font color="#000066"> : <a href="http://www.myurl.co.uk/contact-us.htm">Contact us</a> : <a href="http://www.myurl.co.uk/security-and-privacy.htm">Privacy Notice</a></font></font></td> </tr> <tr valign="top"> <td height="6"> </td> </tr> </td> </tr> </table> <?php } ?> <?php } ?> Thanx Again Mark Lifes a bitch, then you marry one, then you die! Link to comment Share on other sites More sharing options...
241 Posted February 24, 2004 Share Posted February 24, 2004 move your table tag </table> the code looks a bit messy, here is an example for you ?> <table border="0" width="100%" cellspacing="0" cellpadding="0" align="center"> <tr class="header"> <td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'Corinasmall.jpg') . '</a>'; ?></td> <td align="right" valign="baseline"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2" align="right" class="cart"><a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="cart"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a><?php require(DIR_WS_BOXES . 'shopping_cart.php'); ?></table> </td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr class="headerNavigation"> <td align="center" class="headerNavigation"><?php echo '<a class="headerNavigation" href="' . tep_href_link(FILENAME_DEFAULT) . '">' . HEADER_LINKS_DEFAULT . '</a>' . ' | ' . "\n"; ?> <?php echo '<a class="headerNavigation" href="' . tep_href_link(FILENAME_BEAD_SPECIALS) . '">' . HEADER_LINKS_SPECIALS . '</a>' . ' | ' . "\n"; ?> <?php echo '<a class="headerNavigation" href="' . tep_href_link(FILENAME_PRODUCTS_NEW) . '">' . HEADER_LINKS_WHATS_NEW . '</a>' . ' | ' . "\n"; ?> <?php echo '<a class="headerNavigation" href="' . tep_href_link(FILENAME_REVIEWS) . '">' . HEADER_LINKS_REVIEWS . '</a>' . "\n"; ?> </td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr class="footer"> <td align="right" class="footer"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="footer"><?php echo HEADER_TITLE_LOGOFF; ?></a> | <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> | <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a> </td> </td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="1"> <tr class="headerNavigation"> <td class="headerNavigation"> <?php echo $breadcrumb->trail(' » '); ?></td> </tr> </table> <?php this gives three lines No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
241 Posted February 24, 2004 Share Posted February 24, 2004 sorry I will try again try taking out the last to sets of closing tags as in your code </td> </tr> No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
mark27uk3 Posted February 24, 2004 Author Share Posted February 24, 2004 Hi, I have moved the </table> and that has closed the gap, but now the width of the bar is half length it should be. Any ideas? Thanx Mark Lifes a bitch, then you marry one, then you die! Link to comment Share on other sites More sharing options...
241 Posted February 24, 2004 Share Posted February 24, 2004 if that has closed the gap then reading between the lines try taking out this <td align="right" class="headerNavigation"> </td> that should give you full width No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
mark27uk3 Posted February 24, 2004 Author Share Posted February 24, 2004 Hi Steve, When that line is removed it makes both bars half the width. Mark Lifes a bitch, then you marry one, then you die! Link to comment Share on other sites More sharing options...
241 Posted February 24, 2004 Share Posted February 24, 2004 ok try this code I am trying to do this blind would be much easier with the complete header.php i notice that there is a mix of upper and lower case for some of the tables <?php /* $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ define('DIR_WS_TEMPLATE_IMAGES', 'templates/Original/images/'); // WebMakers.com Added: Down for Maintenance // Hide header if not to show if (DOWN_FOR_MAINTENANCE_HEADER_OFF =='false') { if (SITE_WIDTH!='100%') { ?> <table width="100%" cellpadding="10" cellspacing="0" border="0" BGCOLOR="#ffffff"> <tr><td> <table BORDERCOLORLIGHT="2F4F2F" CELLSPACING="2" CELLPADDING="4" BORDER="0" width="<?php echo SITE_WIDTH;?>" align="center" BGCOLOR="FFFFFF" align="center"> <tr><td BORDERCOLOR="FF0000"> <table border="0" width="100%"><tr><td> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr class="header"> <td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_TEMPLATE_IMAGES . 'logo.gif', 'Store Logo') . '</a>'; ?></td> <td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?> </td> </tr></table><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr class="headerNavigation"> <td align="center" class="headerNavigation"> <?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">'. BOX_INFORMATION_HOME . '</a>' . "\n"; ?></td> <td align="right" class="headerNavigation"> </td> </tr> <tr bgcolor="#FFFFCC" align="center"> <td height="20"><font face=Verdana, size=1 arial,="undefined" helvetica,="undefined" sans-serif="undefined"><font color="#000066"><?php echo '<a href="' . tep_href_link(FILENAME_INFORMATION) . '">' . BOX_INFORMATION_SHIPPING . '</a>' . "\n"; ?></a> </font><font face=Verdana, size=1 arial,="undefined" helvetica,="undefined" sans-serif="undefined" color="#000066">: <a href="http://www.myurl.co.uk/mfcart.php?mode=review">View shopping basket</a></font><font color="#000066"> : <a href="http://www.myurl.co.uk/contact-us.htm">Contact us</a> : <a href="http://www.myurl.co.uk/security-and-privacy.htm">Privacy Notice</a></font></font></td> </tr> <tr valign="top"> <td height="6"> </td> </tr> </table> </td> </tr> </table> <?php } ?> <?php } ?> No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
mark27uk3 Posted February 24, 2004 Author Share Posted February 24, 2004 Hi Steve, Your getting close mate, its bout half an inch still Mark Lifes a bitch, then you marry one, then you die! Link to comment Share on other sites More sharing options...
241 Posted February 24, 2004 Share Posted February 24, 2004 are you actually using the feature of the webmaker or are you hacking all of that out if you are hacking all that out try this <?php /* $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ define('DIR_WS_TEMPLATE_IMAGES', 'templates/Original/images/'); // WebMakers.com Added: Down for Maintenance // Hide header if not to show ?> <table width="100%" cellpadding="10" cellspacing="0" border="0" BGCOLOR="#ffffff"> <tr><td> <table border="0" width="100%"><tr><td> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr class="header"> <td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_TEMPLATE_IMAGES . 'logo.gif', 'Store Logo') . '</a>'; ?></td> <td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?> </td> </tr> <tr class="headerNavigation"> <td colspan="2" align="center" class="headerNavigation"> <?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">'. BOX_INFORMATION_HOME . '</a>' . "\n"; ?></td> </tr> <tr bgcolor="#FFFFCC" align="center"> <td colspan="2" height="20"><font face=Verdana, size=1 arial,="undefined" helvetica,="undefined" sans-serif="undefined"><font color="#000066"><?php echo '<a href="' . tep_href_link(FILENAME_INFORMATION) . '">' . BOX_INFORMATION_SHIPPING . '</a>' . "\n"; ?></a> </font><font face=Verdana, size=1 arial,="undefined" helvetica,="undefined" sans-serif="undefined" color="#000066">: <a href="http://www.myurl.co.uk/mfcart.php?mode=review">View shopping basket</a></font><font color="#000066"> : <a href="http://www.myurl.co.uk/contact-us.htm">Contact us</a> : <a href="http://www.myurl.co.uk/security-and-privacy.htm">Privacy Notice</a></font></font></td> </tr> </table></td></tr></table> No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
mark27uk3 Posted February 24, 2004 Author Share Posted February 24, 2004 Thats sorted that job out. Thanx! I am hacking it abit! Now how easy would it be to add the search box into the bottom bar? Thanx Mark Lifes a bitch, then you marry one, then you die! Link to comment Share on other sites More sharing options...
241 Posted February 24, 2004 Share Posted February 24, 2004 it is reasonably straight forward, have a go and see No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
mark27uk3 Posted February 24, 2004 Author Share Posted February 24, 2004 Ok, I will let you know how I get on. Lifes a bitch, then you marry one, then you die! Link to comment Share on other sites More sharing options...
mark27uk3 Posted February 24, 2004 Author Share Posted February 24, 2004 Hi, Its me again! <?php echo tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . ' ' . tep_hide_session_id() . tep_template_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH) . '<br>' . BOX_SEARCH_TEXT . '<br><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>');?> I am presuming that I have selected the right piece of code but how the hell do I change it from being in an array?? Arrrrrrrrrrrrrghhhhhhhhhhhhhh!!! Mark Lifes a bitch, then you marry one, then you die! Link to comment Share on other sites More sharing options...
mark27uk3 Posted February 25, 2004 Author Share Posted February 25, 2004 Hi, I have found another topic which covers adding the search fields to the header, but for the life of me I can not find it again. If anyone would like the code here it is, and thanks very much to the guys that sorted it (whoever you are! :P ) <?php $hide = tep_hide_session_id(); echo '<form name="quick_find" method="get" action="' . tep_href_link (FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false) . '">'; echo $hide . '<input type="text" name="keywords" onFocus=this.value="" size="20" maxlength="30" value="' . BOX_SEARCH_TEXT . '"> ' . '<input type="submit" value="Go"><br><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '">' . BOX_SEARCH_ADVANCED_SEARCH . tep_draw_hidden_field('search_in_description', '1') . '</a>'; echo '</form>'; ?> Regards Mark Lifes a bitch, then you marry one, then you die! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.