Ovrune Posted March 9, 2004 Share Posted March 9, 2004 Hi all, I want put img links in index, but I want add osCsid in href. How can I do it? How can I print osCsid? Thxs. Link to comment Share on other sites More sharing options...
Ovrune Posted March 9, 2004 Author Share Posted March 9, 2004 osCsid = session id of user reg :S Link to comment Share on other sites More sharing options...
burt Posted March 9, 2004 Share Posted March 9, 2004 tep_image function Link to comment Share on other sites More sharing options...
Ovrune Posted March 9, 2004 Author Share Posted March 9, 2004 I want add this: define('TEXT_MAIN', '<table align="center"> <tr align="center"> <td><a href="http://localhost/shop/index.php?cPath=8"><img src="/shop/images/index/aparatologia.jpg" border="0"><br><center>Aparatolog?a</center></a></td> <td><a href="http://localhost/shop/index.php?cPath=11"><img src="/shop/images/index/complementos.jpg" border="0"><br><center>Complementos</center></a></td> </tr> <tr align="center"> <td><a href="http://localhost/shop/index.php?cPath=7"><img src="/shop/images/index/estetica.jpg" border="0"><br><center>Est?tica</center></a></td> <td><a href="http://localhost/shop/index.php?cPath=1"><img src="/shop/images/index/peluqueria.jpg" border="0"><br><center>Peluquer?a</center></a></td> <td><a href="http://localhost/shop/index.php?cPath=12"><img src="/shop/images/index/solarium.jpg" border="0"><br><center>Solarium</center></a></td> </tr> </table>'); I want put this img link at my categories, but I can't add osCsid :\ ?It's posible? Link to comment Share on other sites More sharing options...
Guest Posted March 11, 2004 Share Posted March 11, 2004 I, too, would like to know how this is done. Hope someone can help. When I create a link (image or text) , it does not have the seession ID (oscID) attatched to it. so if a person is logged in before clicking the link, that person will no longer be logged in because the link does not have the a seession ID attached to it, therefore when the it is clicked, the site loses the current session and creates a new one. Any help would be appreciated. Link to comment Share on other sites More sharing options...
burt Posted March 11, 2004 Share Posted March 11, 2004 Use the... tep_image function :rolleyes: Link to comment Share on other sites More sharing options...
Guest Posted March 11, 2004 Share Posted March 11, 2004 burt, Thanks. I saw your post but I have a problem understanding what you mean (as I feel the starter of this thread does, too). What do you mean by "tep_image function"? Where do you put that code? I tried inserting it in the link somehow but was unsuccessful. If you or anyone could elaborate on this for a newbie, I am sure I and the starter of this thread would appreciate it. Again, thanks. Link to comment Share on other sites More sharing options...
burt Posted March 12, 2004 Share Posted March 12, 2004 Example, taken from header.php: echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>'; Here you are using two functions: 1/ tep_href_link - this should be used for EVERY link within your Store, as this is what will maintain your SID and 2/ tep_image - this writes HTML to allow you to place an image. Mix them up and you can place an image inside a <a> as shown in the code above. So, a text only link example: <a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> Creates a link to "logoff.php" with the text "logout" An image link example: echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>'; This creates a link to "account.php" using an image named "header_account.gif". Link to comment Share on other sites More sharing options...
Guest Posted March 15, 2004 Share Posted March 15, 2004 Thank you very much for taking th etime to explain. Very helpful. Got my links to display the SID. Thanks a bunch. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.