Jump to content

Archived

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

the apprentice webmaster

can anyone help

Recommended Posts


hi guy i am trying to add a image to my home page , but it seems that i can't , down below is the index.php
so can anyone tell me if i wanna insert an image , how should i go by thx

[b]

<?
define('TEXT_MAIN', '');
define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');
define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');
define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
define('HEADING_TITLE', $breadcrumb->last());
define('TABLE_HEADING_IMAGE', '');
define('TABLE_HEADING_MODEL', 'Model');
define('TABLE_HEADING_PRODUCTS', 'Product Name');
define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');
define('TABLE_HEADING_QUANTITY', 'Quantity');
define('TABLE_HEADING_PRICE', 'Price');
define('TABLE_HEADING_WEIGHT', 'Weight');
define('TABLE_HEADING_BUY_NOW', 'Buy Now');
define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');
define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');
define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');
define('TEXT_SHOW', '<b>Show:</b>');
define('TEXT_BUY', 'Buy 1 \'');
define('TEXT_NOW', '\' now');
define('TEXT_ALL_CATEGORIES', 'All Categories');
define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');
} elseif ($category_depth == 'top') {
define('HEADING_TITLE', 'Welcome');
} elseif ($category_depth == 'nested') {
define('HEADING_TITLE', $breadcrumb->last() . '&nbsp;' . '');
}
?>
[/b]

Share this post


Link to post
Share on other sites
Use HTML IMG tag

[a href=\"http://www.w3schools.com/html/html_images.asp\" target=\"_blank\"]http://www.w3schools.com/html/html_images.asp[/a]

Share this post


Link to post
Share on other sites
[!--quoteo(post=373200:date=May 11 2006, 03:09 AM:name=Barand)--][div class=\'quotetop\']QUOTE(Barand @ May 11 2006, 03:09 AM) [snapback]373200[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Use HTML IMG tag

[a href=\"http://www.w3schools.com/html/html_images.asp\" target=\"_blank\"]http://www.w3schools.com/html/html_images.asp[/a]
[/quote]

thx , for ur reply , can u be more precise i am newbee thx

Share this post


Link to post
Share on other sites
no offense man, but if you don't understand html, then why are you even trying to tackle php stuff? html is like, an afterthought.

<img src="blah.jpg" width="100" height="100">

Share this post


Link to post
Share on other sites
[!--quoteo(post=373206:date=May 11 2006, 03:27 AM:name=Crayon Violent)--][div class=\'quotetop\']QUOTE(Crayon Violent @ May 11 2006, 03:27 AM) [snapback]373206[/snapback][/div][div class=\'quotemain\'][!--quotec--]
no offense man, but if you don't understand html, then why are you even trying to tackle php stuff? html is like, an afterthought.

<img src="blah.jpg" width="100" height="100">
[/quote]


oh ok , so sorry , i got it now , i have tried that but the image doesn't appear , all i get is the alt text that 's all , why is that guys ?

Share this post


Link to post
Share on other sites
probably because you mispelled the image name, or else the image does not exist in the directory you have it in. for instance, if you simply put

src="blah.jpg"

but blah.jpg is in fact in ../images/blah.jpg well you need to make sure the path is correct.

src="../images/blah.jpg"

it depends on where the script is, versus where the image is.

Share this post


Link to post
Share on other sites
[!--quoteo(post=373211:date=May 11 2006, 03:37 AM:name=Crayon Violent)--][div class=\'quotetop\']QUOTE(Crayon Violent @ May 11 2006, 03:37 AM) [snapback]373211[/snapback][/div][div class=\'quotemain\'][!--quotec--]
probably because you mispelled the image name, or else the image does not exist in the directory you have it in. for instance, if you simply put

src="blah.jpg"

but blah.jpg is in fact in ../images/blah.jpg well you need to make sure the path is correct.

src="../images/blah.jpg"

it depends on where the script is, versus where the image is.
[/quote]

i added it like this :
define('TEXT_MAIN', '<img src="images/header.gif" alt="header" />');

and the result is this : header

why is that guys , thx once again

Share this post


Link to post
Share on other sites
put your define(..) back to the way it was. do not touch the php code. if all you want to do is display a static image on your web page and that's it, then you have no business touching the php code. all you have to do is this:

<img src="images/header.gif" alt="header">

just put that on its very own line somewhere, not inside the <? ... ?> tags. if you put it inside those two tags then put it like this (on it's OWN LINE):

echo "<img src='images/header.gif' alt='header'>";

if you still don't understand, then I'm sorry, I just don't know how else to explain it.

Share this post


Link to post
Share on other sites
[!--quoteo(post=373219:date=May 11 2006, 04:16 AM:name=Crayon Violent)--][div class=\'quotetop\']QUOTE(Crayon Violent @ May 11 2006, 04:16 AM) [snapback]373219[/snapback][/div][div class=\'quotemain\'][!--quotec--]
put your define(..) back to the way it was. do not touch the php code. if all you want to do is display a static image on your web page and that's it, then you have no business touching the php code. all you have to do is this:

<img src="images/header.gif" alt="header">

just put that on its very own line somewhere, not inside the <? ... ?> tags. if you put it inside those two tags then put it like this (on it's OWN LINE):

echo "<img src='images/header.gif' alt='header'>";

if you still don't understand, then I'm sorry, I just don't know how else to explain it.
[/quote]
thx alot Crayon Violent , thx a million

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.