12
Quote:
irmtfan wrote:
domecc and the others:
i still cant understand your problem with smarty variable.
it can be done eaily in xlanguage 3 and you have selected languages as "Links" ,"images" , ... anywhere you like.
this problem you mentioned is the one i mentioned 1 month ago and phppp solve it by define the smarty var.
see this topic in xoopsforge.com:
xlanguage: how to hard code "select languages" in theme?
Just like #6 said:
le="color: #000000"><?php <a href="xxxx"><img src="<{$xoops_imageurl}>images/english.gif"></a> <a href="yyyy"><img src="<{$xoops_imageurl}>images/schinese.gif"></a>
I just need ability to difine xxx and yyy, but not the whole links code. Thus, it would be more flexible in theme design.
If you visit my website,
http://www.malan.com.cn, you may understand what I want.
And now, I use this solution:
le="color: #000000"><?php <{php}> /** * code by: scottlai * mailto: scottlai1983 at hotmail dot com */ global $xoopsTpl; $url = "http://".$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']; $query_string_arg = array(); if (count($_GET) > 0) { if (isset($_GET['lang'])) unset($_GET['lang']); foreach ($_GET as $key => $val) { $query_string_arg[$key] = "$key=$val"; } $query_string = implode("&", $query_string_arg)."&"; } $query_string .= "lang="; $url .= "?".$query_string; //echo $url; $xoopsTpl->assign("url", $url); <{/php}> <a href="<{$url}>english">English</a> <a href="<{$url}>schinese">简体中文</a> <a href="<{$url}>tchinese">繁體中文</a> <a href="<{$url}>UTF-8">UTF-8</a>
XoopsChina Webmaster