alexismya Posted August 2, 2010 Posted August 2, 2010 This is my 3rd post so I really hope someone can help me add the Twitter and Facebook logos to my website. Quote
germ Posted August 2, 2010 Posted August 2, 2010 Twitter box help Although if all you want to add is pics the code required is much simpler. Quote 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 >
alexismya Posted August 2, 2010 Author Posted August 2, 2010 How do I add the pics with links? That is all I need to do. Quote
germ Posted August 2, 2010 Posted August 2, 2010 At the end of /catalog/includes/column_left.php or /catalog/includes/column_right.php BEFORE THE CLOSING PHP TAG add this code: echo '<tr><td>'; $mainpage_title = "Twitter"; $mainpage_info = '<a href="http://twitter.com" title="Twitter"><img src="images/twitter.gif"></a>'; $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => $mainpage_title ); new infoBoxHeading($info_box_contents, true, true); $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => $mainpage_info); new infoBox($info_box_contents); echo '</td></tr>'; The parts you need to change are: http://twitter.com - change that to the exact link you need ot use. images/twitter.gif - the path and image you want to use. I tested this and it works, but you should backup the file before you edit it. To make facebook link copy the code and change what you need to use for facebook. Quote 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 >
alexismya Posted August 3, 2010 Author Posted August 3, 2010 Thank you so much, but apparently I have a custom template. I added the code to the right file and nothing still shows up. Thank you for your help Quote
germ Posted August 4, 2010 Posted August 4, 2010 From your page source: <!-- right_navigation //--> <br /> <b>Warning</b>: Unterminated comment starting line 2 in <b>/home/handma9/public_html/includes/column_right.php</b> on line <b>2</b><br /> <!-- right_navigation_eof //--> Quote 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 >
alexismya Posted August 4, 2010 Author Posted August 4, 2010 What are you trying to tell me and how do I fix it? Here is the code currently in the column_right.php file <?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 */ echo '<tr><td>'; $mainpage_title = "Twitter"; $mainpage_info = '<a href="http://twitter.com" title="Twitter"><img src="images/twitter.gif"></a>'; $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => $mainpage_title ); new infoBoxHeading($info_box_contents, true, true); $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => $mainpage_info); new infoBox($info_box_contents); echo '</td></tr>'; ?> Quote
germ Posted August 4, 2010 Posted August 4, 2010 The error is gone now but for some reason the page doesn't display the code. If you put the code in column_left it will. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.