Jump to content
Sign in to follow this  
engelleo

Sts Index.php.html Image Loading Problem

Recommended Posts

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!!

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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,


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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://forums.oscommerce.com/index.php?s=&...t&p=1102939

 

This way all STS Users can benefit. Thank you. :thumbsup: :thumbsup:


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×