Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

adding an image in a footer


Guest

Recommended Posts

Posted

Hi,

 

I have been trying to add an image into my footer.php file and index.php. I have the images stored on my server in the images folder, and can see the images in my design view in Dreamweaver, yet the images will not display in a browser? It is as thought the images are not reachable.

 

I have added a little html to my footer.php and everything works well from dreamweaver? I don't understand.

 

Any help would be greatly appreciated.

Posted
Hi,

 

I have been trying to add an image into my footer.php file and index.php. I have the images stored on my server in the images folder, and can see the images in my design view in Dreamweaver, yet the images will not display in a browser? It is as thought the images are not reachable.

 

I have added a little html to my footer.php and everything works well from dreamweaver? I don't understand.

 

Any help would be greatly appreciated.

How did you add it ? You can do it by adjusting the FOOTER_TEXT_BODY define in (catalog)/includes/languages/english.php (and/or one of the other language files you might be using) or add something like

	  <td align="center">
<?php echo tep_image(DIR_WS_IMAGES . "somename.gif"); ?>
	</td>

at the appropriate place in (catalog)/includes/footer.php

Just make sure you use the appropriate osCommerce provided functions.

  • 2 months later...
Posted
How did you add it ? You can do it by adjusting the FOOTER_TEXT_BODY define in (catalog)/includes/languages/english.php (and/or one of the other language files you might be using) or add something like

	  <td align="center">
<?php echo tep_image(DIR_WS_IMAGES . "somename.gif"); ?>
	</td>

at the appropriate place in (catalog)/includes/footer.php

Just make sure you use the appropriate osCommerce provided functions.

 

Sorry to hijack the thread but have to ask something. when you add an image link to your index.html you need to modify the index.php file including the footer.php is what you're saying correct?

Posted

If you want to add an image and your image directory is, for example, 'www.yoursite.com/images/', then all you need to do is use the syntax:

<img src="/images/myimage.jpg">

 

By using just '/images..' instead of '<?php echo tep_image(DIR_WS_IMAGES . "somename.gif"); ?>' it means you have one less php action to run in the page, although it breaks with the OSCommerce format of being able to change entire site settings from the admin. I edit the footer regularly and never change the location of images, so I include fixed images in this way because OSC is v demanding on server resources anyway and a bit of hardcoding here and there speeds things up.

 

In addition, by using '/images/myimage.jpg' instead of 'http://www.yoursite.com/images/myimage.gif', it means that the image will load correctly in and out of SSL - never use absolute URLs when calling files into OSC because most browsers will send warnings to visitors when part of the page is or isn't secure.

 

->techwizard

Sorry to hijack the thread but have to ask something. when you add an image link to your index.html you need to modify the index.php file including the footer.php is what you're saying correct?

 

The file in /includes/languages/yourlanguage/index.php only contains references to the central content on your index page. The /includes/footer.php file is included on every single page of the site - http/https/public/logged-in - so a change here will be seen across the site. To change content ONLY on the index page, you should edit only the appropriate language file.

 

HTH

Archived

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

×
×
  • Create New...