Defiant1 Posted February 1, 2010 Share Posted February 1, 2010 I just want to say before the usual, use the search function people chime in.... I have built my entire site from information from the awesome people from this site. Before I came here I knew nothing of website design, to be truthful I still know very little. BUT like i said I have a fully functional site and I just need help adding a few images to my right column. I know I need to go to column_right.php and add the proper code. I have actually been fighting with this stupid thing for about the last week. I have the three images I want in the column_right.php stored in the includes/images folder. I just need to know how to get them to show in the right column. This is what I have now. <?php /* $Id: column_right.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ /* ------------------------------------------------------- */ if (isset($HTTP_GET_VARS['products_id'])) { if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php'); } else { include(DIR_WS_BOXES . 'specials.php'); } /* ------------------------------------------------------- */ // require(DIR_WS_BOXES . 'reviews.php'); /* ------------------------------------------------------- */ // require(DIR_WS_BOXES . 'whats_new.php'); /* ------------------------------------------------------- */ ?> I was hoping I could finish the site without having to ask a bunch of silly questions, and except for this last little issue I have done so. So if someone could tell me what i need to add here to make an image from my images folder show in the right column I would be very grateful. I have searched and read on this, but the information I found was either not complete or I had basically no idea how to implement it. Thanks very much for any help. Link to comment Share on other sites More sharing options...
knifeman Posted February 1, 2010 Share Posted February 1, 2010 I just want to say before the usual, use the search function people chime in.... I have built my entire site from information from the awesome people from this site. Before I came here I knew nothing of website design, to be truthful I still know very little. BUT like i said I have a fully functional site and I just need help adding a few images to my right column. I know I need to go to column_right.php and add the proper code. I have actually been fighting with this stupid thing for about the last week. I have the three images I want in the column_right.php stored in the includes/images folder. I just need to know how to get them to show in the right column. This is what I have now. I was hoping I could finish the site without having to ask a bunch of silly questions, and except for this last little issue I have done so. So if someone could tell me what i need to add here to make an image from my images folder show in the right column I would be very grateful. I have searched and read on this, but the information I found was either not complete or I had basically no idea how to implement it. Thanks very much for any help. What I have done is to create a new info box. Instructions for that are in the knowledge base. So basically put a require in the cloumn of your choice: require(DIR_WS_BOXES . 'my_image.php'); Then create a file named my_image.php in includes/boxes and in that file call the image you want to show. Tim Link to comment Share on other sites More sharing options...
♥mdtaylorlrim Posted February 1, 2010 Share Posted February 1, 2010 You have a couple of options, the first being to follow the design of the boxes and put your images in a box. In my case I was putting certain advertising banners in boxes and it worked out well. You might simply want to create a simple html page that contains a table with one row and one data column with the image in that data container. Then save it. Call it using the same functions. Require or includes. Or you can put the image there using a simple php link code. <?php echo '<img src="images/your_image_name ">'?> Use the complete image code with alt text, etc. It really depends on the use of the image as to how you would want it to look. Remember that the right column is a fixed width and your image will have to fit. Community Bootstrap Edition, Edge Avoid the most asked question. See How to Secure My Site and How do I...? Link to comment Share on other sites More sharing options...
germ Posted February 1, 2010 Share Posted February 1, 2010 You also need to comply with the osC table format for the image to display in the right position. Something like: <tr> <td align="center"> <!-- code for 1st image goes here //--> </td> </tr> <tr> <td align="center"> <!-- code for 2nd image goes here //--> </td> </tr> <tr> <td align="center"> <!-- code for 3rd image goes here //--> </td> </tr> 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 > Link to comment Share on other sites More sharing options...
Defiant1 Posted February 1, 2010 Author Share Posted February 1, 2010 You have a couple of options, the first being to follow the design of the boxes and put your images in a box. In my case I was putting certain advertising banners in boxes and it worked out well. You might simply want to create a simple html page that contains a table with one row and one data column with the image in that data container. Then save it. Call it using the same functions. Require or includes. Or you can put the image there using a simple php link code. <?php echo '<img src="images/your_image_name ">'?> Use the complete image code with alt text, etc. It really depends on the use of the image as to how you would want it to look. Remember that the right column is a fixed width and your image will have to fit. OK I tried this first since it seemed the simplest, and got a parse error. Everything loaded with the exception of the right column. Hmmm if I cant manage this it is ok I suspect, I would just really like to have my paypal, and secure site ssl info over there as well as all the credit card information. I added that bit of code after the ?> as in ?> <?php echo '<img src="images/paypallogo.jpg ">'?> Oh and thanks again for the reply, people like u guys here on this site are really amazing, I feel like a guppy in the shark pond hahaha Oh my mediocre site is www.defiantmenace.com if seeing it helps Link to comment Share on other sites More sharing options...
germ Posted February 1, 2010 Share Posted February 1, 2010 Try: <?php echo '<img src="images/paypallogo.jpg ">';?> It posted code was missing the semi-colon. 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 > Link to comment Share on other sites More sharing options...
Defiant1 Posted February 1, 2010 Author Share Posted February 1, 2010 You also need to comply with the osC table format for the image to display in the right position. Something like: <tr> <td align="center"> <!-- code for 1st image goes here //--> </td></tr> <tr> <td align="center"> So this would be?></tr> <tr> <td align="center"> <Includes(DIR_WS_IMAGES . 'paypallogo.jpg'> </td></tr> Like that? Link to comment Share on other sites More sharing options...
Defiant1 Posted February 1, 2010 Author Share Posted February 1, 2010 Try: <?php echo '<img src="images/paypallogo.jpg ">';?> It posted code was missing the semi-colon. OK I tried this(as in above) ?> <?php echo '<img src="images/paypallogo.jpg ">';?> now i just get a little picture of what appears to be a piece of parchment that has been torn in half. And thanks :) Link to comment Share on other sites More sharing options...
germ Posted February 1, 2010 Share Posted February 1, 2010 The image file doesn't exist in your images folder. 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 > Link to comment Share on other sites More sharing options...
Defiant1 Posted February 1, 2010 Author Share Posted February 1, 2010 The image file doesn't exist in your images folder. I just checked it, and it is there, I even uploaded it to the site again just to make sure Link to comment Share on other sites More sharing options...
Defiant1 Posted February 1, 2010 Author Share Posted February 1, 2010 <?php /* $Id: column_right.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ /* ------------------------------------------------------- */ if (isset($HTTP_GET_VARS['products_id'])) { if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php'); } else { include(DIR_WS_BOXES . 'specials.php'); } /* ------------------------------------------------------- */ // require(DIR_WS_BOXES . 'reviews.php'); /* ------------------------------------------------------- */ // require(DIR_WS_BOXES . 'whats_new.php'); /* ------------------------------------------------------- */ ?> <?php echo '<img src="images/paypallogo.jpg ">';?> what I have now Link to comment Share on other sites More sharing options...
germ Posted February 1, 2010 Share Posted February 1, 2010 Use the correct name: Paypallogo.jpg Filename are case sensitive in UNIX. 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 > Link to comment Share on other sites More sharing options...
Defiant1 Posted February 1, 2010 Author Share Posted February 1, 2010 Use the correct name: Paypallogo.jpg Filename are case sensitive in UNIX. Wholly guacamole your fantastic! I have honestly been messing with that for a bloody week, i just didnt want my first post to be a bonehead question! Not to mention it took me a month to make the site :( Link to comment Share on other sites More sharing options...
germ Posted February 1, 2010 Share Posted February 1, 2010 Now if you surround it with the table formatting elements like I posted it will display at the bottom where it should. 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 > Link to comment Share on other sites More sharing options...
Defiant1 Posted February 1, 2010 Author Share Posted February 1, 2010 So like this? <tr> <td align="center"> <?php echo '<img src="images/Paypallogo.jpg ">';?> </td> </tr> Link to comment Share on other sites More sharing options...
germ Posted February 1, 2010 Share Posted February 1, 2010 So like this? <tr> <td align="center"> <?php echo '<img src="images/Paypallogo.jpg ">';?> </td> </tr> That's it. :thumbsup: 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 > Link to comment Share on other sites More sharing options...
Defiant1 Posted February 1, 2010 Author Share Posted February 1, 2010 That's it. :thumbsup: That worked perfect! I really cant thank you enough. I am guessing that if I wanted the logo to be left instead of centered I would just change the "center" to left? Link to comment Share on other sites More sharing options...
germ Posted February 1, 2010 Share Posted February 1, 2010 That worked perfect! I really cant thank you enough. I am guessing that if I wanted the logo to be left instead of centered I would just change the "center" to left? I think so. Most times people want things centered, but not always. 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 > Link to comment Share on other sites More sharing options...
Defiant1 Posted February 1, 2010 Author Share Posted February 1, 2010 I think so. Most times people want things centered, but not always. Yes left does work, Well I guess that is it for now. I almost made it on my own! Really I cant thank you enough, if you like anything on the site shoot me an email and I will give you a stellar deal! Link to comment Share on other sites More sharing options...
Defiant1 Posted February 1, 2010 Author Share Posted February 1, 2010 OH and a big thanks to everyone on the site, this place really is fantastic! Link to comment Share on other sites More sharing options...
Guest Posted April 5, 2010 Share Posted April 5, 2010 Hi I would like your expertise too, please. My column_left.php has this code: <?php /* $Id: column_left.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ // {{ buySAFE Module if (MODULE_BUYSAFE_BUYSAFE_STATUS == 'True' && tep_not_null(MODULE_BUYSAFE_BUYSAFE_SEAL_AUTHENTICATION_DATA) && MODULE_BUYSAFE_BUYSAFE_SEAL_AUTHENTICATION_DATA != '-- none --' && $buysafe_result['IsBuySafeEnabled'] != 'false' && !$buysafe_result['faultstring']) echo "<!-- buySAFE //-->\n<tr><td align=\"center\"><script src=\"" . MODULE_BUYSAFE_BUYSAFE_ROLLOVER_URL . "\"></script><span id=\"BuySafeSealSpan\"><script type=\"text/javascript\">WriteBuySafeSeal('BuySafeSealSpan', '" . MODULE_BUYSAFE_BUYSAFE_SEAL_TYPE . "', 'HASH=" . urlencode(MODULE_BUYSAFE_BUYSAFE_SEAL_AUTHENTICATION_DATA) . "');</script> </span></td></tr>\n<!-- buySAFE_eof //-->\n"; // }} if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_manufacturers_box(); } else { include(DIR_WS_BOXES . 'manufacturers.php'); } if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_categories_box(); } else { include(DIR_WS_BOXES . 'categories.php'); } <tr> <td align="center"> <?php echo '<img src="images/Paypallogo.jpg ">';?> </td> </tr> require(DIR_WS_BOXES . 'specials.php'); require(DIR_WS_BOXES . 'information.php'); //require(DIR_WS_BOXES . 'whats_new.php'); //require(DIR_WS_BOXES . 'search.php'); ?> I need to put my image between the categories and specials box, can you please tell me what I am doing wrong, so I know for next time aswell. Many thanks Cath Link to comment Share on other sites More sharing options...
germ Posted April 6, 2010 Share Posted April 6, 2010 <?php /* $Id: column_left.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ // {{ buySAFE Module if (MODULE_BUYSAFE_BUYSAFE_STATUS == 'True' && tep_not_null(MODULE_BUYSAFE_BUYSAFE_SEAL_AUTHENTICATION_DATA) && MODULE_BUYSAFE_BUYSAFE_SEAL_AUTHENTICATION_DATA != '-- none --' && $buysafe_result['IsBuySafeEnabled'] != 'false' && !$buysafe_result['faultstring']) echo "<!-- buySAFE //-->\n<tr><td align=\"center\"><script src=\"" . MODULE_BUYSAFE_BUYSAFE_ROLLOVER_URL . "\"></script><span id=\"BuySafeSealSpan\"><script type=\"text/javascript\">WriteBuySafeSeal('BuySafeSealSpan', '" . MODULE_BUYSAFE_BUYSAFE_SEAL_TYPE . "', 'HASH=" . urlencode(MODULE_BUYSAFE_BUYSAFE_SEAL_AUTHENTICATION_DATA) . "');</script> </span></td></tr>\n<!-- buySAFE_eof //-->\n"; // }} if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_manufacturers_box(); } else { include(DIR_WS_BOXES . 'manufacturers.php'); } if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_categories_box(); } else { include(DIR_WS_BOXES . 'categories.php'); } ?> <tr> <td align="center"> <img src="images/Paypallogo.jpg"> </td> </tr> <?php require(DIR_WS_BOXES . 'specials.php'); require(DIR_WS_BOXES . 'information.php'); //require(DIR_WS_BOXES . 'whats_new.php'); //require(DIR_WS_BOXES . 'search.php'); ?> You are incorrectly mixing HTML and PHP code. See the code above for a correct method for doing so. :) 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 > Link to comment Share on other sites More sharing options...
Guest Posted April 7, 2010 Share Posted April 7, 2010 Many thanks, This huge issue for me is so simple for you guys, thank you for sharing it :) Cath Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.