chrometweaks.org

What's the best iPage web host in the UK?

Click Here To View All Answers...


Got a question... What's the best iPage web host in the UK? Thanks in advance for any response. Another question on my mind: Everything was going fine... I was editing the header.php file to make it look and feel the way I want it to. Let me explain everything as I did it..

1. I pulled the appropriate code out and put it in front page to make some minor adjustments (I added some table rows and cells so I could put my own background images into them for a more custom feel).

2. I added the code back into the correct place and saved the header.php file. After it saved I checked it out at www.sneakerbase.com/store and everything was fine. My background image came out exactly how I wanted it to..

3. Now I'm thinking I'm doing good..., I then start to make my own custom button links for "my account", "view cart", and "check out". I saved the button links to replace the old buttons. I saved them as there original file names so I wouldnt run into any problems..

4. I loaded it and saved it to the internet and it was still oka.. I saw my buttons come up and they were linked to there appropriate .php pages. The only problem was that they were sitting in the wrong table and were not where I wanted them to be..

5. I then try and fix the problem by taking that line of code out and putting it in the correct table that I wanted it to be in. I finaly think my page is done, I save it, and I'm surprised with a Parse error:.

Var/www/html/store/includes/header.php on line 74.

6. I go back and simply do a couple of "undo's" to get back to where the links were originally at. I upload it to the server and save the header.php file. I still get the parse error....

7. UPDATE: I just looked at my code and I think I know what may be wrong.., I think I somehow deleted the lower section of the code! (I think) Please check and see if I am correct. If I am, does anyone know where I can get this code again? I did not back up my files (because I'm dumb.

And always learn from mistakes)..

Please check the code for my header.php file:.

.................................................................................

........................................

<?php.

/*.

$Id: header.php,v 1.19 2002/04/13 16:11:52 hpdl Exp $.

OsCommerce, Open Source E-Commerce Solutions.

Http://www.oscommerce.com.

Copyright © 2002 osCommerce.

Released under the GNU General Public License.

*/.

If ($messageStack->size > 0) {.

Echo $messageStack->output();.

}.

?>.

<table border="0" width="100%" cellspacing="0" cellpadding="0">.

<tr>.

<td><?php echo tep_image(DIR_WS_IMAGES'oscommerce.gif', 'osCommerce', '204', '50'); ?></td>.

<td align="right"><?php echo '<a href="http://www.oscommerce.com" target="_blank">'tep_image(DIR_WS_IMAGES'header_support.gif', HEADER_TITLE_SUPPORT_SITE, '50', '50')'</a>&nbsp;&nbsp;<a href="'tep_catalog_href_link()'">'tep_image(DIR_WS_IMAGES'header_checkout.gif', HEADER_TITLE_ONLINE_CATALOG, '53', '50')'</a>&nbsp;&nbsp;<a href="'tep_href_link(FILENAME_DEFAULT, '', 'NONSSL')'">'tep_image(DIR_WS_IMAGES'header_administration.gif', HEADER_TITLE_ADMINISTRATION, '50', '50')'</a>'; ?>&nbsp;&nbsp;</td>.

</tr>.

<tr class="headerBar">.

<td class="headerBarContent">&nbsp;&nbsp;<?php echo '<a href="'tep_href_link(FILENAME_DEFAULT, '', 'NONSSL')'" class="headerLink">'HEADER_TITLE_TOP'</a>'; ?></td>.

<td class="headerBarContent" align="right"><?php echo '<a href="http://www.oscommerce.com" class="headerLink">'HEADER_TITLE_SUPPORT_SITE'</a> &nbsp;|&nbsp; <a href="'tep_catalog_href_link()'" class="headerLink">'HEADER_TITLE_ONLINE_CATALOG'</a> &nbsp;|&nbsp; <a href="'tep_href_link(FILENAME_DEFAULT, '', 'NONSSL')'" class="headerLink">'HEADER_TITLE_ADMINISTRATION'</a>'; ?>&nbsp;&nbsp;</td>.

</tr>.

</table>.

.................................................................................

.........................................

Comments (58)

Good question... I dunno what is the answer to that question. I'll do some research in Google and get back to you if I bump into an decent answer. You should email the people at iPage as they probably know..

Comment #1

Thankyou so much my friend..., I will try it out and see if it works...

Comment #2

Nope.., didn't work. I'm still getting the same error message. This is what the line 74 reads:.

(DIR_WS_IMAGES'header_checkout.gif', HEADER_TITLE_CHECKOUT)'</a>'; ?>&nbsp;&nbsp;</td>.

Does this mean there is somthing wrong with the header_checkout.gif?.

This post has been edited by.

Krookymonster.

: 05 November 2004, 15:24..

Comment #3

This is the original code for that bit:.

<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>&nbsp;&nbsp;<a href="'tep_href_link(FILENAME_SHOPPING_CART)'">'tep_image(DIR_WS_IMAGES'header_cart.gif', HEADER_TITLE_CART_CONTENTS)'</a>&nbsp;&nbsp;<a href="'tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')'">'tep_image(DIR_WS_IMAGES'header_checkout.gif', HEADER_TITLE_CHECKOUT)'</a>'; ?>&nbsp;&nbsp;</td>.

Post your bit, include all of it from <td> to </td> and put it between easier to read that way..

Comment #4

I see, sorry about that. here is the code:.

<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>&nbsp;&nbsp;<a href="'tep_href_link(FILENAME_SHOPPING_CART)'">'tep_image(DIR_WS_IMAGES'header_cart.gif', HEADER_TITLE_CART_CONTENTS)'</a>&nbsp;&nbsp;<a href="'tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')'">'tep_image(DIR_WS_IMAGES'header_checkout.gif', HEADER_TITLE_CHECKOUT)'</a>'; ?>&nbsp;&nbsp;</td>..

Comment #5

<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>&nbsp;&nbsp;<a href="'tep_href_link(FILENAME_SHOPPING_CART)'">'tep_image(DIR_WS_IMAGES'header_cart.gif', HEADER_TITLE_CART_CONTENTS)'</a>&nbsp;&nbsp;<a href="'tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')'">'tep_image(DIR_WS_IMAGES'header_checkout.gif', HEADER_TITLE_CHECKOUT)'</a>'; ?>&nbsp;&nbsp;</td>..

Comment #6

Just ran your code on my test site.

You've got:.

Tep_catalog_href_link() ..

Have you defined this function?.

Also you've got no variables in it.

Normally they look like:.

Tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') ...

Comment #7

I'm sorry.., I am still very new to oscommerce. What do you mean by defining a function?.

Also, what do you mean when you say that I have:.

Tep_catalog_href_link() ??? Because that does not show up anywhere in the code that i've posted??? Where are you seeing that at?.

What do you recommend I should do (in Newb terms).

?..

Comment #8

In your original post it is there..

What are you trying to do with your header, how do you want it to look?.

If you have msn messenger send me an pm with your addy and ill talk you through it..

Comment #9

If you don't know what you're doing, best thing is to do nothing. Sorry, but you really cannot expect to just start trying to rewrite the header file if you do not know how to do it. Best advice - restore the original, then read up on the Knowledge Base..

Vger..

Comment #10

I do know a lot about things like html, javascript, photoshop, flash and am in the process of learning this stuff.. I hate being a newB to but I gotta start somwheres... I will check that knowledge base out tho.

This post has been edited by.

Krookymonster.

: 05 November 2004, 16:02..

Comment #11

Everything was going fine... I was editing the header.php file to make it look and feel the way I want it to. Let me explain everything as I did it..

1. I pulled the appropriate code out and put it in front page to make some minor adjustments (I added some table rows and cells so I could put my own background images into them for a more custom feel).

2. I added the code back into the correct place and saved the header.php file. After it saved I checked it out at www.sneakerbase.com/store and everything was fine. My background image came out exactly how I wanted it to..

3. Now I'm thinking I'm doing good..., I then start to make my own custom button links for "my account", "view cart", and "check out". I saved the button links to replace the old buttons. I saved them as there original file names so I wouldnt run into any problems..

4. I loaded it and saved it to the internet and it was still oka.. I saw my buttons come up and they were linked to there appropriate .php pages. The only problem was that they were sitting in the wrong table and were not where I wanted them to be..

5. I then try and fix the problem by taking that line of code out and putting it in the correct table that I wanted it to be in. I finaly think my page is done, I save it, and I'm surprised with a Parse error:.

Var/www/html/store/includes/header.php on line 74.

6. I go back and simply do a couple of "undo's" to get back to where the links were originally at. I upload it to the server and save the header.php file. I still get the parse error....

7. UPDATE: I just looked at my code and I think I know what may be wrong.., I think I somehow deleted the lower section of the code! (I think) Please check and see if I am correct. If I am, does anyone know where I can get this code again? I did not back up my files (because I'm dumb.

And always learn from mistakes)..

Please check the code for my header.php file:.

.................................................................................

........................................

<?php.

/*.

$Id: header.php,v 1.19 2002/04/13 16:11:52 hpdl Exp $.

OsCommerce, Open Source E-Commerce Solutions.

Http://www.oscommerce.com.

Copyright © 2002 osCommerce.

Released under the GNU General Public License.

*/.

If ($messageStack->size > 0) {.

Echo $messageStack->output();.

}.

?>.

<table border="0" width="100%" cellspacing="0" cellpadding="0">.

<tr>.

<td><?php echo tep_image(DIR_WS_IMAGES'oscommerce.gif', 'osCommerce', '204', '50'); ?></td>.

<td align="right"><?php echo '<a href="http://www.oscommerce.com" target="_blank">'tep_image(DIR_WS_IMAGES'header_support.gif', HEADER_TITLE_SUPPORT_SITE, '50', '50')'</a>&nbsp;&nbsp;<a href="'tep_catalog_href_link()'">'tep_image(DIR_WS_IMAGES'header_checkout.gif', HEADER_TITLE_ONLINE_CATALOG, '53', '50')'</a>&nbsp;&nbsp;<a href="'tep_href_link(FILENAME_DEFAULT, '', 'NONSSL')'">'tep_image(DIR_WS_IMAGES'header_administration.gif', HEADER_TITLE_ADMINISTRATION, '50', '50')'</a>'; ?>&nbsp;&nbsp;</td>.

</tr>.

<tr class="headerBar">.

<td class="headerBarContent">&nbsp;&nbsp;<?php echo '<a href="'tep_href_link(FILENAME_DEFAULT, '', 'NONSSL')'" class="headerLink">'HEADER_TITLE_TOP'</a>'; ?></td>.

<td class="headerBarContent" align="right"><?php echo '<a href="http://www.oscommerce.com" class="headerLink">'HEADER_TITLE_SUPPORT_SITE'</a> &nbsp;|&nbsp; <a href="'tep_catalog_href_link()'" class="headerLink">'HEADER_TITLE_ONLINE_CATALOG'</a> &nbsp;|&nbsp; <a href="'tep_href_link(FILENAME_DEFAULT, '', 'NONSSL')'" class="headerLink">'HEADER_TITLE_ADMINISTRATION'</a>'; ?>&nbsp;&nbsp;</td>.

</tr>.

</table>.

.................................................................................

.........................................

Comment #12

This is the original header code: if this helps, if not post the code for line 74.

<?php.

/*.

 $Id: header.php,v 1.3 2003/09/30 16:25:12 serg Exp $.

 osCommerce, Open Source E-Commerce Solutions.

 http://www.oscommerce.com.

 Copyright (c) 2003 osCommerce.

 Released under the GNU General Public License.

*/.

// check if the 'install' directory exists, and warn of it's existence.

 if (WARN_INSTALL_EXISTENCE == 'true') {.

   if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME'])'/install')) {.

     $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');.

   }.

 }.

// check if the configure.php file is writeable.

 if (WARN_CONFIG_WRITEABLE == 'true') {.

   if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME'])'/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME'])'/includes/configure.php')) ) {.

     $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');.

   }.

 }.

// check if the session folder is writeable.

 if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {.

   if (STORE_SESSIONS == '') {.

     if (!is_dir(tep_session_save_path())) {.

       $messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');.

     } elseif (!is_writeable(tep_session_save_path())) {.

       $messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');.

     }.

   }.

 }.

// check session.auto_start is disabled.

 if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {.

   if (ini_get('session.auto_start') == '1') {.

     $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');.

   }.

 }.

 if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {.

   if (!is_dir(DIR_FS_DOWNLOAD)) {.

     $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');.

   }.

 }.

 if ($messageStack->size('header') > 0) {.

   echo $messageStack->output('header');.

 }.

?>.

<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_IMAGES'oscommerce.gif', 'osCommerce')'</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>&nbsp;&nbsp;<a href="'tep_href_link(FILENAME_SHOPPING_CART)'">'tep_image(DIR_WS_IMAGES'header_cart.gif', HEADER_TITLE_CART_CONTENTS)'</a>&nbsp;&nbsp;<a href="'tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')'">'tep_image(DIR_WS_IMAGES'header_checkout.gif', HEADER_TITLE_CHECKOUT)'</a>'; ?>&nbsp;&nbsp;</td>.

 </tr>.

</table>.

<table border="0" width="100%" cellspacing="0" cellpadding="1">.

 <tr class="headerNavigation">.

   <td class="headerNavigation">&nbsp;&nbsp;<?php echo $breadcrumb->trail(' &raquo; '); ?></td>.

   <td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> &nbsp;|&nbsp; <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> &nbsp;|&nbsp; <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> &nbsp;|&nbsp; <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a> &nbsp;&nbsp;</td>.

 </tr>.

</table>.

<?php.

 if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {.

?>.

<table border="0" width="100%" cellspacing="0" cellpadding="2">.

 <tr class="headerError">.

   <td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td>.

 </tr>.

</table>.

<?php.

 }.

 if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {.

?>.

<table border="0" width="100%" cellspacing="0" cellpadding="2">.

 <tr class="headerInfo">.

   <td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>.

 </tr>.

</table>.

<?php.

 }.

?>..

Comment #13


This question was taken from a support group/message board and re-posted here so others can learn from it.