DazJ Posted August 11, 2008 Posted August 11, 2008 I've searched and searched but for the life of me can't seem to find ANYWHERE that has the line of code I need to display an image on my TEXT_MAIN index.php page. The image required is in the /images folder so what do I need to type in TEXT_MAIN? Cheers in advance.
♥FWR Media Posted August 11, 2008 Posted August 11, 2008 I've searched and searched but for the life of me can't seem to find ANYWHERE that has the line of code I need to display an image on my TEXT_MAIN index.php page. The image required is in the /images folder so what do I need to type in TEXT_MAIN? Cheers in advance. define('TEXT_MAIN', 'I am some text' . tep_image(DIR_WS_IMAGES . 'myImageName.jpg', '100', '100') . ' I am some more text'); Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
DazJ Posted August 11, 2008 Author Posted August 11, 2008 Thankyou but that doesn't work. It just makes the entire page not appear. Here's my code: define('TEXT_MAIN', '<B>100% genuine & licensed games at wholesale prices! Wanna order in bulk? Let us know and we\'ll arrange an even CHEAPER price!!!</B>' . 'tep_image(DIR_WS_IMAGES . 'beijing_olympics.jpg', '100', '100') ');
♥FWR Media Posted August 11, 2008 Posted August 11, 2008 Thankyou but that doesn't work. Yes it does .. your interpretation is what doesn't work. define('TEXT_MAIN', '<B>100% genuine & licensed games at wholesale prices! Wanna order in bulk? Let us know and we\'ll arrange an even CHEAPER price!!!</B>' . tep_image(DIR_WS_IMAGES . 'beijing_olympics.jpg', '100', '100')); Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
DazJ Posted August 11, 2008 Author Posted August 11, 2008 Yes it does .. your interpretation is what doesn't work. define('TEXT_MAIN', '<B>100% genuine & licensed games at wholesale prices! Wanna order in bulk? Let us know and we\'ll arrange an even CHEAPER price!!!</B>' . tep_image(DIR_WS_IMAGES . 'beijing_olympics.jpg', '100', '100')); Thankyou but I removed the 100x100 dimensions. It works fine but now I need the image on the next line and in the centre. How would I do that?
♥FWR Media Posted August 11, 2008 Posted August 11, 2008 Thankyou but I removed the 100x100 dimensions. It works fine but now I need the image on the next line and in the centre. How would I do that? I don't mind solving a coding issue but I'm not doing your basic html. Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
DazJ Posted August 11, 2008 Author Posted August 11, 2008 I don't mind solving a coding issue but I'm not doing your basic html. Ok thankyou. Anyone else fancy helping a newbie who isn't a genius? Any help would be appreciated. Once I know I won't have to ask again. Thanks.
knifeman Posted August 11, 2008 Posted August 11, 2008 This link is full of ads, but it does have a very nice chart of html tags. You will find it useful to format your pages. <P> creates a paragraph break and <center> text or image here </center> will center your text or image html tags
DazJ Posted August 11, 2008 Author Posted August 11, 2008 This link is full of ads, but it does have a very nice chart of html tags. You will find it useful to format your pages.<P> creates a paragraph break and <center> text or image here </center> will center your text or image html tags Excellent! Thankyou for helping me, it's just what I needed and a lot more simple than that complicated code at first.
♥FWR Media Posted August 11, 2008 Posted August 11, 2008 Excellent! Thankyou for helping me, it's just what I needed and a lot more simple than that complicated code at first. Less complicated but bear in mind that the <center> element was deprecated in HTML 4.01 and also in oscommerce you should use the PHP function tep_image() for images not simple <img> html, if you don't you'll create all sorts of problems for yourself further down the road .. e.g. secure pages. Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
knifeman Posted August 15, 2008 Posted August 15, 2008 Less complicated but bear in mind that Sorry, I didn't mean for anyone to change the code you provided. I was trying to point the direction to some basic html tags for formatting the rest of the page. Tim
micheleangle Posted September 15, 2008 Posted September 15, 2008 I tried your code, but my image won't display - Can you tell me what I did wrong? Thanks! tep_image (DIR_WS_IMAGES. 'credit_cards_logos.JPG'));
arietis Posted September 15, 2008 Posted September 15, 2008 I tried your code, but my image won't display - Can you tell me what I did wrong? Thanks! tep_image (DIR_WS_IMAGES. 'credit_cards_logos.JPG')); are you getting a php error, or is it that you see an empty box where the image should be? if it's a php error, we'd need more code that just what you provided. give us not only the text of the php error, but the code with a few lines above and below where the error is occurring. you might have the file name wrong - try .jpg instead of .JPG. most web servers are unix and they are case sensitive for their file names. also, make sure that the image is actually there. you may have uploaded it to a different directory.
micheleangle Posted September 15, 2008 Posted September 15, 2008 are you getting a php error, or is it that you see an empty box where the image should be? if it's a php error, we'd need more code that just what you provided. give us not only the text of the php error, but the code with a few lines above and below where the error is occurring. you might have the file name wrong - try .jpg instead of .JPG. most web servers are unix and they are case sensitive for their file names. also, make sure that the image is actually there. you may have uploaded it to a different directory. I inserted the credit card image under the authorize.net seal. The seal displays on my right column. The credit cards logo just displays the "x" on my site - like a broken link. I changed the JPG to lower case and double checked the logo. I still need help! src="//verify.authorize.net/anetseal/seal.js" ></script> <br> tep_image (DIR_WS_IMAGES.'credit_cards_logos.jpg')); </center> </td> </tr>
arietis Posted September 15, 2008 Posted September 15, 2008 src="//verify.authorize.net/anetseal/seal.js" ></script> <br> tep_image (DIR_WS_IMAGES.'credit_cards_logos.jpg')); </center> </td> </tr> it appears that your tep_image() call is not inside php tags. try this: <br><?php echo tep_image (DIR_WS_IMAGES.'credit_cards_logos.jpg')); ?> if that doesn't work, you will need to post more of the surrounding code, up to and including any <?php and ?> tags so that someone can get an idea of exactly how you're trying to use this.
micheleangle Posted September 15, 2008 Posted September 15, 2008 it appears that your tep_image() call is not inside php tags. try this: <br><?php echo tep_image (DIR_WS_IMAGES.'credit_cards_logos.jpg')); ?> if that doesn't work, you will need to post more of the surrounding code, up to and including any <?php and ?> tags so that someone can get an idea of exactly how you're trying to use this. Arietis - Thanks for your assistance, but I still haven't been able to view my credit cards' logo. I'm trying to put it on the right column under the reviews box - I've included more code work leading up to this. Of course, I modified authorize.net info. I want to place credit card logo under the authorize.net logo. Hope this makes sense. :blink: require(DIR_WS_BOXES . 'reviews.php'); ?> <tr><td><br><center> <!-- © 2005, 2008. Authorize.Net is a registered trademark of CyberSource Corporation --> <div class="AuthorizeNetSeal"> <script type="text/javascript" language="javascript">var ANS_customer_id="12345";</script> <script type="text/javascript" language="javascript" src="//verify.authorize.net/aneseal/seal.js" ></script> <br>echo tep_image (DIR_WS_IMAGES.'credit_cards_logos.jpg')); </center> </td> </tr>
arietis Posted September 16, 2008 Posted September 16, 2008 it appears you missed the php tags in the example i gave you in my previous post. make sure that you have the <?php before the 'echo' and a ?> at the end.
micheleangle Posted September 16, 2008 Posted September 16, 2008 it appears you missed the php tags in the example i gave you in my previous post. make sure that you have the <?php before the 'echo' and a ?> at the end. Ok, I will try it again. The last time I did, the whole right column disappeared!
micheleangle Posted September 16, 2008 Posted September 16, 2008 Ok, I will try it again. The last time I did, the whole right column disappeared! <br><?php echo tep_image (DIR_WS_IMAGES.'credit_cards_logos.jpg'));?> </center> </td> </tr> I tried it and the same thing happened - right column disappeared except for the error message displayed.
sLaV- Posted September 16, 2008 Posted September 16, 2008 <br><?php echo tep_image (DIR_WS_IMAGES.'credit_cards_logos.jpg'));?> </center> </td> </tr> I tried it and the same thing happened - right column disappeared except for the error message displayed. Your first mistake in the above code is that THERE IS NO SPACE BETWEEN tep_image and the opening bracket ( ... it should read like this: tep_image(DIR_WS_IMAGES... Your second mistake is your double closing brackets ... it should read: <?php echo tep_image(DIR_WS_IMAGES . 'credit_cards_logos.jpg'); ?>
micheleangle Posted September 16, 2008 Posted September 16, 2008 Your first mistake in the above code is that THERE IS NO SPACE BETWEEN tep_image and the opening bracket ( ... it should read like this: tep_image(DIR_WS_IMAGES...Your second mistake is your double closing brackets ... it should read: <?php echo tep_image(DIR_WS_IMAGES . 'credit_cards_logos.jpg'); ?> Wow - that was it! It worked!!! Thank you, thank you to both of you! B)
Vasi Posted May 15, 2009 Posted May 15, 2009 Your first mistake in the above code is that THERE IS NO SPACE BETWEEN tep_image and the opening bracket ( ... it should read like this: tep_image(DIR_WS_IMAGES...Your second mistake is your double closing brackets ... it should read: <?php echo tep_image(DIR_WS_IMAGES . 'credit_cards_logos.jpg'); ?> Hi, Can someone help me to insert an image in the index page. I tried so many ways, it is still not working. I have pasted how I have done it. inspired jewelry, swarovski jewelry and cz jewelry. Also available are necklace, ring, earring, bangles/bracelet, pearls & stud earrings. tep_image(DIR_WS_IMAGES.'front 1.gif'); <font color="#00000"><b>' . '</b> </font>.'); define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s'); define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products'); define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');
Recommended Posts
Archived
This topic is now archived and is closed to further replies.