Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding a custom image or banner to header.php


Guest

Recommended Posts

Posted

Hi Guys,

 

Finished the layout of my site, just want to add my own custom banner / logo / image in the header section.

 

I know the code that I have to change is:

 

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

<tr class="header">

<td valign="left"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'logo.gif', 'Enigmatek Entertainment and technology') . '</a>';

 

and I realize that the image has to be in the /images directory, but how do I change this code so that it doesn't contain a <a href> link and Is just an Image that's stretched along the the top of the site? I tried changing it myself, but kept on getting parse error expecting "," etc :( . Please help, have been wasting way to much time with this and would like to complete the site.

 

A stupid question to some I know :) But to a php newbie, a challenge!

 

Any responses appreciated

Thanks

Posted

try

 

<td valign="left"><?php echo tep_image('logo.gif', 'Enigmatek Entertainment and Technology'); ?></td>

 

in place of the

 

<td valign="left"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'logo.gif', 'Enigmatek Entertainment and technology') . '</a>';

Patrick Bailey

www.DisplayHaven.com

Posted

Thanks for feedback, but unfortunately didn't work. It completely removed the header from the index. :(

 

At least I didn't get any errors, so either i'm doing something wrong, or the code was very close?

 

thanks

Posted

alright...well try just taking it to basics:

 

<td valign="middle" align="center"><img src="images/logo.gif" alt="Enigmatek Entertainment and Technology"></td>

 

this should work...dont know what i was thinking earlier...dont use php when you dont have to...

 

luck..

Patrick Bailey

www.DisplayHaven.com

Posted

I'll try that then, sure it'll work. Thank for the help :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...