trophy Posted May 16, 2008 Posted May 16, 2008 I would like to add in a picture on my main page nestled amongst the text. I have tried many way's but keep getting errors and no shows. After having given it a good shot I am forced to ask for help. Gill A
Jack_mcs Posted May 16, 2008 Posted May 16, 2008 Edit the includes/languages/english/index.php file and include something like this in the TEXT_MAIN definition: <img src="some image.jpg" title="some text" alt="some text" width="50" height="50" hspace="5" vspace="5"> Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
trophy Posted May 16, 2008 Author Posted May 16, 2008 Thanks jack for the quick reply. I have tried your suggestion but are still getting errors is there a particular place this code should be placed? Have included my index.php. I assume I upload a pic to my image file? Gill A define('TEXT_MAIN','<br> <strong>HOBBIES PLUS</strong> Welcome\'s you to New Zealand\'s first and only website dedicated to the sale of slot cars and accessories.<P> Only products that we sell are listed. <P> We are slowly getting our products listed with about another 2/3rds to go. <br> <br> Thanks for your patience.<br><b>Gill Andrews.<b><br> <br><b>HOBBIES PLUS.<b><br> <b> NEW ZEALAND.<b>'); 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', ''); define('TABLE_HEADING_IMAGE', 'What\'s new here'); 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', '<em><h3>HOBBIES PLUS</h3></em>'); } elseif ($category_depth == 'nested') { define('HEADING_TITLE', 'Categories'); } ?>
Jack_mcs Posted May 17, 2008 Posted May 17, 2008 Yes, you have to upload the image to the images directory. Then try changing this define('TEXT_MAIN','<br> <strong>HOBBIES PLUS</strong> Welcome\'s you to New Zealand\'s first and only website dedicated to the sale of slot cars and accessories.<P> Only products that we sell are listed. <P> We are slowly getting our products listed with about another 2/3rds to go. <br> <br> Thanks for your patience.<br><b>Gill Andrews.<b><br> <br><b>HOBBIES PLUS.<b><br> <b> NEW ZEALAND.<b>'); to this define('TEXT_MAIN','<br> <strong>HOBBIES PLUS</strong> Welcome\'s you to New Zealand\'s first and only website dedicated to the sale of slot cars and accessories.<P> <img src="some image.jpg" title="some text" alt="some text" width="50" height="50" hspace="5" vspace="5"> Only products that we sell are listed. <P> We are slowly getting our products listed with about another 2/3rds to go. <br> <br> Thanks for your patience.<br><b>Gill Andrews.<b><br> <br><b>HOBBIES PLUS.<b><br> <b> NEW ZEALAND.<b>'); You will still need to format the code so it places as you want. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
trophy Posted May 17, 2008 Author Posted May 17, 2008 Jack, thank you, I now see where I was putting it was incorrect. Now I can not get the jpg to show. Have uploaded to image & imagecache, nothing shows. http://www.hobbiesplus.co.nz Any ideas to why.
trophy Posted May 17, 2008 Author Posted May 17, 2008 Alll sorted with the pic getting to appear. Now I need to find out what to use for pic positioning on the page. I have tried to get this CSS coding to work but was unsuccessful. <img src=”imageright.gif” width=”" height=”" alt=”" style=”float: right” />
Vasi Posted September 19, 2009 Posted September 19, 2009 I was trying to insert the image too but there is a error. <?php /* $Id: index.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2007 osCommerce Released under the GNU General Public License */ define('TEXT_MAIN', 'Welcome to Papua. Buy elegant, trendy high quality designer and celebrity inspired fashion jewelry for great prices. We are an online retailer, who carries top quality costume jewelry accessories from all over the world. For the best price and the best selection of styles Papua will deliver its products right to your doorstep. To preserve the uniqueness of the pieces we carry only a limited number of units per product. Papua is one of the leading online celebrity and designer inspired high quality Cubic Zirconia, Silver, and Swarovski Crystal fashion jewelry stores for Affordable pricing in North America. <p>Shop Papua with complete confidence! You will never regret. Access to hollywood styles. We carry designer jewelry, silver jewelry and other fashion jewelry as seen in magazines and TV. celebrity inspired wedding rings and celebrity engagement rings just like the stars. The finest collection of celebrity inspired jewelry, swarovski jewelry and cz jewelry. Also available are necklace, ring, earring, bangles/bracelet, pearls & stud earrings. <font color="#ffffff"><b>' . '</b> </font>.'); define('TABLE_HEADING_NEW_PRODUCTS', 'Products'); 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', 'Let\'s See What We Have Here'); 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', 'Papua'); } elseif ($category_depth == 'nested') { define('HEADING_TITLE', 'Categories'); } <img src="Credit_Cards.jpg" title="some text" alt="some text" width="50" height="50" hspace="5" vspace="5"> ?>
trophy Posted September 19, 2009 Author Posted September 19, 2009 I had given up on this project. Vasi nice of you to contribute I will try it out. Thank you.
peter222 Posted September 19, 2009 Posted September 19, 2009 @ Vasi 1. you forgot to close your <P> tag <p>Shop Papua with complete confidence! You will never regret.</p> 2. you need to put the <img ...>....</img> into the TEXT_MAIN define
Vasi Posted September 21, 2009 Posted September 21, 2009 <?php /* $Id: index.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2007 osCommerce Released under the GNU General Public License */ define('TEXT_MAIN', 'Welcome to Papua. Buy elegant, trendy high quality designer and celebrity inspired fashion jewelry for great prices. We are an online retailer, who carries top quality costume jewelry accessories from all over the world. For the best price and the best selection of styles Papua will deliver its products right to your doorstep. To preserve the uniqueness of the pieces we carry only a limited number of units per product. Papua is one of the leading online celebrity and designer inspired high quality Cubic Zirconia, Silver, and Swarovski Crystal fashion jewelry stores for Affordable pricing in North America. <p>Shop Papua with complete confidence! You will never regret.<p> <img src="credit_card_paypal_logos_2.jpg" title="some text" alt="some text" width="50" height="50" hspace="5" vspace="5"> Access to hollywood styles. We carry designer jewelry, silver jewelry and other fashion jewelry as seen in magazines and TV. celebrity inspired wedding rings and celebrity engagement rings just like the stars. The finest collection of celebrity inspired jewelry, swarovski jewelry and cz jewelry. Also available are necklace, ring, earring, bangles/bracelet, pearls & stud earrings. <font color="#ffffff"><b>' . '</b> </font>.'); define('TABLE_HEADING_NEW_PRODUCTS', 'Products'); 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', 'Let\'s See What We Have Here'); 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', 'Papua'); } elseif ($category_depth == 'nested') { define('HEADING_TITLE', 'Categories'); } ?> I changed it accordingly, but still it is not working. in the main page there is a cross and the image is not coming. Thanks
♥14steve14 Posted September 22, 2009 Posted September 22, 2009 Try changing <img src="credit_card_paypal_logos_2.jpg" title="some text" alt="some text" width="50" height="50" hspace="5" vspace="5"> to <img src="[b]images[/b]/credit_card_paypal_logos_2.jpg" title="some text" alt="some text" width="50" height="50" hspace="5" vspace="5"> All we have done is to tell oscommerce that your image is in the images folder. REMEMBER BACKUP, BACKUP AND BACKUP
iflyamphib Posted September 23, 2009 Posted September 23, 2009 I too tried many of the suggestions here this evening without any luck. However I think I know why the image is not showing up - but I don't know how to correct this too see if this is the answer: Looking in my images directory at item images, the image TYPE is listed as image/x-generic. The image I uploaded to show on the index.php shows as text/x-generic. It does not appear this can be changed from the image menu. Both images have the same permissions, and both were uploaded using cpanel.
iflyamphib Posted September 23, 2009 Posted September 23, 2009 Ok I finally got this to work, but not really sure as to why. Here's what I did: I created an image using Corel. When I saved the image, I used the generic 'save as' function. I went back and tried again using the Export feature and saving as a jpg. I then replaced the image uploaded earlier and the image TYPE changed to the correct type: image/x-generic Then in my image path, I had to add /image, in my case for instance: /image/SeareySplash.jpg All is well now! Jim I too tried many of the suggestions here this evening without any luck. However I think I know why the image is not showing up - but I don't know how to correct this too see if this is the answer: Looking in my images directory at item images, the image TYPE is listed as image/x-generic. The image I uploaded to show on the index.php shows as text/x-generic. It does not appear this can be changed from the image menu. Both images have the same permissions, and both were uploaded using cpanel.
Vasi Posted September 23, 2009 Posted September 23, 2009 Ok I finally got this to work, but not really sure as to why. Here's what I did: I created an image using Corel. When I saved the image, I used the generic 'save as' function. I went back and tried again using the Export feature and saving as a jpg. I then replaced the image uploaded earlier and the image TYPE changed to the correct type: image/x-generic Then in my image path, I had to add /image, in my case for instance: /image/SeareySplash.jpg All is well now! Jim does anyone knows to do this withour Corel. All the images I have are jpg. I downloaded the inage in the image folder but there is a cross in the picture and picture would n't come up. Thanks
iflyamphib Posted September 24, 2009 Posted September 24, 2009 Vasi, I googled last night 'changing text/x-generic to image/x-gerneric and came up with a bunch of info. Here's a thread that may assist: http://hostmonsterforum.com/archive/index.php/t-5150.html does anyone knows to do this withour Corel. All the images I have are jpg. I downloaded the inage in the image folder but there is a cross in the picture and picture would n't come up. Thanks
bobsi18 Posted May 28, 2010 Posted May 28, 2010 I was just wondering, is it possible/how would I go about including php rather than html to include an image? I have a few extra images dotted here and there in my product descriptions - because it's only a few, I don't really need a contribution. A while back, I decided to change my /images/ folder to something less generic, and I had quite a few broken images because of this. And so, I got to thinking, if it was php that pulled the /image/ folder instead of html, it would work better. I presume it would then take care of any SSL issues? So, instead of: <img src=/images/myimage.jpg" alt="my description" width="150"> Could I have <?php echo tep_image(DIR_WS_IMAGES . 'myimage.jpg', 'my description', '150'); ?> Would there be any issues with this?
trophy Posted May 28, 2010 Author Posted May 28, 2010 OK I have been off this task for a while but I had some success. This coding works now since I modified it, gives you complete control over width, height etc of the picture. <img src="/images/picture.jpg" title="some text" alt="some text" width="150" height="150" hspace="15" vspace="55"> This code will install the pic as it is, the "size" will increase or decrease the pic to a size that is suitable for your application. <img src="/images/picture.jpg" alt="my description" size="200"> only problem is the text part does not work in either, I am lost there. I have been playing with it in "product description" Have a look here http://www.hobbiesplus.co.nz/large-weegies-p-1215.html hope this helps.
trophy Posted May 29, 2010 Author Posted May 29, 2010 This will also add a pic but it is not visable when in preview. <img src="images/tireweegie2.jpg" alt"">
longhorn1999 Posted June 5, 2010 Posted June 5, 2010 Edit the includes/languages/english/index.php file and include something like this in the TEXT_MAIN definition: <img src="some image.jpg" title="some text" alt="some text" width="50" height="50" hspace="5" vspace="5"> Jack When editing the TEXT_MAIN definition for the front page, is there a way to include tep_href links somehow? I want to include some links to elsewhere on my page but need to figure out how to maintain sessions here. Or for this should I just be editing root/index.php, not root/includes/languages/english/index.php? Thanks
germ Posted June 5, 2010 Posted June 5, 2010 When editing the TEXT_MAIN definition for the front page, is there a way to include tep_href links somehow? I want to include some links to elsewhere on my page but need to figure out how to maintain sessions here. Or for this should I just be editing root/index.php, not root/includes/languages/english/index.php? Thanks TEXT_MAIN example with two links, 1st uses an image, 2nd is text link define('TEXT_MAIN', ' <a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce') . '</a><br> <a href="' . tep_href_link(FILENAME_DEFAULT) . '">Back to homepage</a> '); If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
longhorn1999 Posted June 7, 2010 Posted June 7, 2010 TEXT_MAIN example with two links, 1st uses an image, 2nd is text link define('TEXT_MAIN', ' <a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce') . '</a><br> <a href="' . tep_href_link(FILENAME_DEFAULT) . '">Back to homepage</a> '); Thanks Germ. Great info. Five months after installing information pages unlimited I realized that I had an issue with sessions, and so I just uninstalled it and am rebuilding index.php the old-fashioned way. Could you tell me how to add a class to either of these two links? I'm really just trying to put a border around an image link on my front page that'll have a different color when a user hovers over it. I have the relevant lines in my stylesheet already, but can't figure out how to get the border to show up.
germ Posted June 7, 2010 Posted June 7, 2010 define('TEXT_MAIN', ' <a class="someclass" href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce') . '</a><br> <a class="someotherclass" href="' . tep_href_link(FILENAME_DEFAULT) . '">Back to homepage</a> '); If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Recommended Posts
Archived
This topic is now archived and is closed to further replies.