engelleo Posted June 8, 2007 Share Posted June 8, 2007 Thanks god, we have STS, it let us modify the osC easily, but now i met a big problem! I wanna change the image in the page when I change language, I put the following code in the table, <a href="<?php echo tep_href_link(FILENAME_DEFAULT)?>"><img src="<?php echo DIR_WS_LANGUAGES . $language . '/images/buttons/';?>m1.jpg" border="0" alt="" width="105" height="47"></a> the link works perfectly, but the image cant not loading, is there something wrong in my code of path or kind of STS problem?? search the whole forum, didnt find the useful infomation... could somebody be so kind to give me some advice?? thanks!! Quote Link to comment Share on other sites More sharing options...
engelleo Posted June 8, 2007 Author Share Posted June 8, 2007 Thanks god, we have STS, it let us modify the osC easily, but now i met a big problem! I wanna change the image in the page when I change language, I put the following code in the table, <a href="<?php echo tep_href_link(FILENAME_DEFAULT)?>"><img src="<?php echo DIR_WS_LANGUAGES . $language . '/images/buttons/';?>m1.jpg" border="0" alt="" width="105" height="47"></a> the link works perfectly, but the image cant not loading, is there something wrong in my code of path or kind of STS problem?? search the whole forum, didnt find the useful infomation... could somebody be so kind to give me some advice?? thanks!! the unloaded pic in the browser can find the link...but .$language. doesnt work, dont know why... http://localhost/PHP/CT/includes/languages.../buttons/m1.jpg Quote Link to comment Share on other sites More sharing options...
bkellum Posted June 8, 2007 Share Posted June 8, 2007 the unloaded pic in the browser can find the link...but .$language. doesnt work, dont know why... http://localhost/PHP/CT/includes/languages.../buttons/m1.jpg Add the following code to your includes/modules/sts_inc/general.php file: $sts->template['langid'] = $languages_id; Then create your images: m1.jpg, m2.jpg, etc, depending on the languages being used, and save them in your images folder. The number for the LangID will come from your particular osC implementation. To find the language ID, go to your Admin, Localization, then select each language and view the ID in the URL. Now add the following into your STS Template where you want the button: <img border="0" src="images/m$langid.gif"> Where $langid will be replaced dynamically by the correct language id number. For example: english is ID=1 in my shop so the URL would be dynamically changed to "images/m1.gif" if the user select the language "english" in my shop. Hope this got you on your way, Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
engelleo Posted June 8, 2007 Author Share Posted June 8, 2007 Add the following code to your includes/modules/sts_inc/general.php file: $sts->template['langid'] = $languages_id; Then create your images: m1.jpg, m2.jpg, etc, depending on the languages being used, and save them in your images folder. The number for the LangID will come from your particular osC implementation. To find the language ID, go to your Admin, Localization, then select each language and view the ID in the URL. Now add the following into your STS Template where you want the button: <img border="0" src="images/m$langid.gif"> Where $langid will be replaced dynamically by the correct language id number. For example: english is ID=1 in my shop so the URL would be dynamically changed to "images/m1.gif" if the user select the language "english" in my shop. Hope this got you on your way, Thx a lot, bkellum, tutor of STS , It works perfectly! Quote Link to comment Share on other sites More sharing options...
bkellum Posted July 10, 2007 Share Posted July 10, 2007 Add the following code to your includes/modules/sts_inc/general.php file: $sts->template['langid'] = $languages_id; Then create your images: m1.jpg, m2.jpg, etc, depending on the languages being used, and save them in your images folder. The number for the LangID will come from your particular osC implementation. To find the language ID, go to your Admin, Localization, then select each language and view the ID in the URL. Now add the following into your STS Template where you want the button: <img border="0" src="images/m$langid.gif"> Where $langid will be replaced dynamically by the correct language id number. For example: english is ID=1 in my shop so the URL would be dynamically changed to "images/m1.gif" if the user select the language "english" in my shop. Hope this got you on your way, If anyone would like to comment on the above or have any questions related to STS, Please post all replies to the STSv4 Thread found here: http://www.oscommerce.com/forums/index.php?s=&...t&p=1102939 This way all STS Users can benefit. Thank you. :thumbsup: :thumbsup: Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
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.