graphicman Posted November 2, 2010 Posted November 2, 2010 Hi i would like to link the main index image to the specials page, can someone help with this please. I think that this is the code i need to change <tr> <td class="main2" valign="top"><img src="images/indeximage.png" alt="Fancy Dress Leeds" border="0" height="375" width="500"></td> </tr> The website is www.fancydressbonanza.co.uk and the image is the xmas on in the middle Thanks in advance Mark ****************************************** ** Aspire To Inspire Before You Retire Or Expire! ** ******************************************
multimixer Posted November 2, 2010 Posted November 2, 2010 A image link to the specials page would look like this <?php echo '<a href="' . tep_href_link(FILENAME_SPECIALS) . '">' . tep_image(DIR_WS_IMAGES . 'my_image.jpg', 'my image title') . '</a>'; ?> You can place this into any html structure (<table><tr><td><div> etc etc) My community profile | Template system for osCommerce - New: Responsive | Feedback channel
graphicman Posted November 2, 2010 Author Posted November 2, 2010 A image link to the specials page would look like this <?php echo '<a href="' . tep_href_link(FILENAME_SPECIALS) . '">' . tep_image(DIR_WS_IMAGES . 'my_image.jpg', 'my image title') . '</a>'; ?> You can place this into any html structure (<table><tr><td><div> etc etc) Thanks George for your reply. I played aroung with the code you gave me but no luck. Could you please tell me where i need to put this code for it to work. Cheers Mark ****************************************** ** Aspire To Inspire Before You Retire Or Expire! ** ******************************************
multimixer Posted November 3, 2010 Posted November 3, 2010 The "code" I gave you is a simple link to the specials page. You can place it anywhere and it will display an image, where you click and it goes to specials.php. If you want to replace the christmas image you have now, then go to your file index.php, find where it says <tr><td class="main2" valign="top"><img src="images/indeximage.png" border="0" alt="" width="500" height="375"></td></td> and replace it with <tr><td class="main2" valign="top"><?php echo '<a href="' . tep_href_link(FILENAME_SPECIALS) . '">' . tep_image(DIR_WS_IMAGES . 'indeximage.png', 'Fancy Christmas') . '</a>'; ?></td></tr> What exactly didn't work when you tried? My community profile | Template system for osCommerce - New: Responsive | Feedback channel
graphicman Posted November 3, 2010 Author Posted November 3, 2010 The "code" I gave you is a simple link to the specials page. You can place it anywhere and it will display an image, where you click and it goes to specials.php. If you want to replace the christmas image you have now, then go to your file index.php, find where it says <tr><td class="main2" valign="top"><img src="images/indeximage.png" border="0" alt="" width="500" height="375"></td></td> and replace it with <tr><td class="main2" valign="top"><?php echo '<a href="' . tep_href_link(FILENAME_SPECIALS) . '">' . tep_image(DIR_WS_IMAGES . 'indeximage.png', 'Fancy Christmas') . '</a>'; ?></td></tr> What exactly didn't work when you tried? Hello again George thanks for you reply, right, i've replaced that line in public_html/includes/index.php but it did not even change the image. To change the image George i had to alter this line define('TEXT_MAIN', '<table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main2" valign="top">' . tep_image(DIR_WS_IMAGES . 'indeximage.png') . '</td>'); in /public_html/includes/languages/english/index.php. So that seems to be the line that alters that image, i just dont know how to make it link to specials. In public_html/index.php the line you spoke about does not even exist. So my friend i am now banging my head against the wall lol Thanks again for any help you can give me Mark ****************************************** ** Aspire To Inspire Before You Retire Or Expire! ** ******************************************
multimixer Posted November 3, 2010 Posted November 3, 2010 thanks for you reply, right, i've replaced that line in public_html/includes/index.php but it did not even change the image. To change the image George i had to alter this line define('TEXT_MAIN', '<table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main2" valign="top">' . tep_image(DIR_WS_IMAGES . 'indeximage.png') . '</td>'); in /public_html/includes/languages/english/index.php. So that seems to be the line that alters that image, i just dont know how to make it link to specials. In public_html/index.php the line you spoke about does not even exist. Well, ok, the usual place to add the image would not be the language file, for me. Anyway, now, in file includes/languages/english/index.php, the place you found the image, just change the line you have with following define('TEXT_MAIN', '<table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main2" valign="top">' . '<a href="' . tep_href_link(FILENAME_SPECIALS) . '">' . tep_image(DIR_WS_IMAGES . 'indeximage.png', 'Fancy Christmas') . '</a>' . '</td>'); Any reason why the closing </tr> is missing? My community profile | Template system for osCommerce - New: Responsive | Feedback channel
graphicman Posted November 3, 2010 Author Posted November 3, 2010 Thank you so much for your time on this George, as you can see that has worked fine. your a good man Thanks Mark ****************************************** ** Aspire To Inspire Before You Retire Or Expire! ** ******************************************
Recommended Posts
Archived
This topic is now archived and is closed to further replies.