Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Dimka19

Pages: [1]
1
Hello People need your advice
4image has a quite sistem of switching between langages it is possible to use it on a custom template?
 
Code: [Select]

for examle i ve created a new template "about me"
http://www.mysite.com/home/index.php?template=aboutme


lets say the info is in english and also translated in  several langages
Code: [Select]

about_en.inc  -info in english
about_de.inc  -info in deutsch
about_jp.inc   -info in japaneese

thats what i've put in the body this only when the template is set in english by default

Code: [Select]

<?
if ($template== aboutme) { include "{template_url}/incl/about_en.inc"; }
elseif ($l== english) { include "{template_url}/incl/about_en.inc"; }
elseif ($l== deutsch) { include "{template_url}/incl/about_de.inc"; }
elseif ($l== japanese) { include "{template_url}/incl/about_jp.inc"; }
 ?>


i ve added javascript that will switch the langages
Code: [Select]

function go1(){
if (document.selecter1.select1.options[document.selecter1.select1.selectedIndex].value != "none") {
location = document.selecter1.select1.options[document.selecter1.select1.selectedIndex].value
}
}
//-->
</script>
                <script language="JavaScript" type="text/javascript">
<!--
document.write('<form name="selecter1"><select name="select1" size=1>');
document.write('<option value=none>Select your language');
document.write('<option value=none>--------------------');
document.write('<option value="{current_address}?l=deutsch">deutsch');
document.write('<option value="{current_address}?l=english">english');
document.write('</select>');
document.write('<input type="button" value="Go" onclick="go1()">');
document.write('</form>');


but it always turns me to an index.php?l=(chousen language)

..i am not sure if this correct thou  {current_address}?l=deutsch

What i want is when i link on the page ?template=aboutme i se my text in english ,when i select deutsch it will ad variable $l ==deutsch so that script will include a deutsch text ito my template.


Or maybe it is easyer to add more varibls to a language files for eq enlish
$lang['about_en'] = "text here";

and then put it on the template? somehow ... {lang_about_en}??


Any Advices are welcome
Thanks :wink:

2
Templates & Styles (Requests & Discussions) / Please help a newble !
« on: June 15, 2003, 01:50:30 AM »
Hi
I ve just,found this perfect solution for my photo album-)
But i am newble to php,so i was wondering if some one maybe gave me an advise how to make it through,the deal is. How to place a my own link on this galery ,next to all other links so that by presing content of the page will cange and the site will remain the same,i know how to do this in a regullar php file simply <include ..> these bits that you don't want to change,but on this galery you use templates i  was't able to understand how to deal with them.

I found an example of what i want to do http://www.the1theme.com/4images/

When you pres on link "resource" content will cange

http://www.the1theme.com/4images/resource.php
even sent an e-mail to owner but  got no respond,
I will apeciate if anybody will answer my question
Thanks

Pages: [1]