tinkerbell46325 Posted January 10, 2009 Share Posted January 10, 2009 Happy New YeArs to EveryOne! Hope is better than last ;) iS IT posible to link a picture to a page ? Anybody know the code for this? i'm confused is it Html code i should be looking for? Link to comment Share on other sites More sharing options...
myshipper Posted January 10, 2009 Share Posted January 10, 2009 Happy New YeArs to EveryOne! Hope is better than last ;)iS IT posible to link a picture to a page ? Anybody know the code for this? i'm confused is it Html code i should be looking for? <a href="the page you want the link to go to here" target="_blank"> <img src="your image link here" width="size" height="size" border="2" alt="your alt meta tag here" /> </a> Link to comment Share on other sites More sharing options...
germ Posted January 10, 2009 Share Posted January 10, 2009 Doing it with HTML is the way to go for "off site" links. Linking to other pages within your site should be done with the proper PHP code, lest you lose the session ID, dump the cart, and log the shopper out... :o 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...
tinkerbell46325 Posted January 11, 2009 Author Share Posted January 11, 2009 Doing it with HTML is the way to go for "off site" links. Linking to other pages within your site should be done with the proper PHP code, lest you lose the session ID, dump the cart, and log the shopper out... :o OKAY i have this code just added the Url http://www.sample.com/index.php?cPath=35, that links to the page i want and it Works even loggin! But is this okay? or what is the php code? Link to comment Share on other sites More sharing options...
germ Posted January 11, 2009 Share Posted January 11, 2009 <?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT,'cPath=35') . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce') . '</a>'; ?> Replace oscommerce.gif with the name of your image. Replace osCommerce with your mouseover text. 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...
tinkerbell46325 Posted January 11, 2009 Author Share Posted January 11, 2009 <?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT,'cPath=35') . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce') . '</a>'; ?> Replace oscommerce.gif with the name of your image. Replace osCommerce with your mouseover text. i have this in includes/language/english/index.php <?php /* $Id: index.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2007 osCommerce Released under the GNU General Public License */ define('TEXT_MAIN', '<br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top"></td></b><br></td></tr></table><br><font color="#604943"><b><td> <tbody> <tr><td><p align="center"> <a href="http://www.sample.com/index.php?cPath=35" target="_blank"> <img src="images/ImageVALENTINE.jpg" width="598" height="477" border="2" alt="Valentines" /> </a></p>'); Then replace it with this One but is Not Working, am i missing something? i might be wrong here! [code]<?php /* $Id: index.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2007 osCommerce Released under the GNU General Public License */ define('TEXT_MAIN', '<br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top"></td></b><br></td></tr></table><br><font color="#604943"><b><td> <tbody> <tr><td><p align="center"> <?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT,'cPath=35') . '">' . tep_image(DIR_WS_IMAGES . 'ImageVALENTINE.jpg', 'Valentines') . '</a>'; ?> Link to comment Share on other sites More sharing options...
germ Posted January 11, 2009 Share Posted January 11, 2009 It needs to be different doing it in that file. Can you post the whole contents of your define for TEXT_MAIN? :unsure: If not, PM it to me. 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...
tinkerbell46325 Posted January 11, 2009 Author Share Posted January 11, 2009 okay one sec Link to comment Share on other sites More sharing options...
germ Posted January 11, 2009 Share Posted January 11, 2009 define('TEXT_MAIN', '<br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top"></td></b><br></td></tr></table><br><font color="#604943"><b><td> <tbody> <tr><td><p align="center"><a href="' . tep_href_link(FILENAME_DEFAULT,'cPath=35') . '">' . tep_image(DIR_WS_IMAGES . 'ImageVALENTINE.jpg', 'Valentines') . '</a></p>'); Put the link in TEXT_MAIN like that. 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...
tinkerbell46325 Posted January 11, 2009 Author Share Posted January 11, 2009 define('TEXT_MAIN', '<br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top"></td></b><br></td></tr></table><br><font color="#604943"><b><td> <tbody> <tr><td><p align="center"><a href="' . tep_href_link(FILENAME_DEFAULT,'cPath=35') . '">' . tep_image(DIR_WS_IMAGES . 'ImageVALENTINE.jpg', 'Valentines') . '</a></p>'); Put the link in TEXT_MAIN like that. Great Thanks !! check it out www.theweddingstorela.com Link to comment Share on other sites More sharing options...
tinkerbell46325 Posted January 11, 2009 Author Share Posted January 11, 2009 If anybody has other Wed Sites, with other flowers , favors, cakes... I can Add a Links to my store PM me Link to comment Share on other sites More sharing options...
tinkerbell46325 Posted April 10, 2009 Author Share Posted April 10, 2009 define('TEXT_MAIN', '<br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top"></td></b><br></td></tr></table><br><font color="#604943"><b><td> <tbody> <tr><td><p align="center"><a href="' . tep_href_link(FILENAME_DEFAULT,'cPath=35') . '">' . tep_image(DIR_WS_IMAGES . 'ImageVALENTINE.jpg', 'Valentines') . '</a></p>'); Put the link in TEXT_MAIN like that. Have a question , i want 3 diffent pics to link differnt pages, then it can not be only one image like i have posted correct? and what is the php Code if i want em placeone top, bottom and on the right side like i have it now? And Thank You for your Help! Link to comment Share on other sites More sharing options...
germ Posted April 10, 2009 Share Posted April 10, 2009 In your main index.php your code looks like this: <tr> <td class="main"><?php echo TEXT_MAIN; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td align="center"> ******** TOP IMAGE LINK CODE GOES HERE ********</td> </tr> <tr> <td align="center"> ******** 2ND IMAGE LINK CODE GOES HERE ********</td> <td align="center"> ******** 3RD IMAGE LINK CODE GOES HERE ********</td> </tr> BACKUP THE FILE BEFORE MAKING ANY EDITS. You break it - You bought it. :blush: 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...
tinkerbell46325 Posted April 11, 2009 Author Share Posted April 11, 2009 In your main index.php your code looks like this: <tr> <td class="main"><?php echo TEXT_MAIN; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td align="center"> ******** TOP IMAGE LINK CODE GOES HERE ********</td> </tr> <tr> <td align="center"> ******** 2ND IMAGE LINK CODE GOES HERE ********</td> <td align="center"> ******** 3RD IMAGE LINK CODE GOES HERE ********</td> </tr> BACKUP THE FILE BEFORE MAKING ANY EDITS. You break it - You bought it. :blush: I got errors i most not be pasting the code right, but this is the code now, when i delete this i get error,then i paste it on the main index and only see the code on the siteis difficult need more of your help here, also the shipping i would like it link to Payment and sales if it's possible' Thanks Jim* <tbody> <tr><td><p align="center"><a href="' . tep_href_link(FILENAME_DEFAULT,'cPath=35') . '">' . tep_image(DIR_WS_IMAGES . 'ImageTOPNAME3.jpg', 'Favors') . ' <tr><td><p align="center"><a href="' . tep_href_link(FILENAME_DEFAULT,'cPath=3&sort=2a&page=2') . '">' . tep_image(DIR_WS_IMAGES . 'ImageTOPNAMELEFT.jpg', 'Favors') . ' <a href="' . tep_href_link(FILENAME_DEFAULT,'cPath=2') . '">' . tep_image(DIR_WS_IMAGES . 'ImageTOPNAMERIGHT.jpg', 'Favors') . '</a></p>'); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.