Bubun
Is there any way to add select skin option in my xtgem site ashamania.mobie.in ?
XTMEDIA
Bubun Add code to your _headtags in your wapsite XTGEM exp:
<!--parser:xtscript-->
get skin
if not $skin
assign $skin = call cookie::get $name=skin;$default=none;force_current=1
else
call cookie::set $name=skin; $val=$skin; $expire=31556926;force_current=1
endif
print <link rel="stylesheet" type="text/css" href="/foder/$skin.css" media="all,handheld"/>
<!--/parser:xtscript-->
Copy code
and your body add code:
<!--parser:xtscript-->
# set the selected value for the menu
assign $sel = selected="selected"
if $skin == css1
assign $opt1 = $sel
elseif $skin == css2
assign $opt2 = $sel
elseif $skin == css3
assign $opt3 = $sel
elseif $skin == css4
assign $opt4 = $sel
elseif $skin == none
assign $opt0 = $sel
endif
#print the form
print {{
<form action=" " method="post">
<select name="skin">
<option value="none" $opt0>Default</option>
<option value="css1" $opt1>namecss1</option>
<option value="css2" $opt2>namecss2</option>
<option value="css3" $opt3>namecss3</option>
<option value="css4" $opt4>namecss4</option></select>
<input class="xt_button" type="submit" value="Skin">
</form>
}}
<!--/parser:xtscript-->
Copy code
first your creat name css
none.css to default css
Bubun
Graham Yes i have done but after chenging skins it not viewing skins options properly! Every time "standred" option displaying!
View it~
http://ashamania.mobie.in
I have used this code:
<!--parser:xtscript-->
# set the selected value for the menu
assign $sel = selected="selected"
if $skin == red
assign $opt1 = $sel
elseif $skin == green
assign $opt2 = $sel
elseif $skin == blue
assign $opt3 = $sel
elseif $skin == yellow
assign $opt4 = $sel
elseif $skin == none
assign $opt5 = $sel
elseif $skin == black
assign $opt6 = $sel
endif $skin == standard
assign $opt7 = $sel
endif
#print the form
print {{
<form action=" " method="post">
<select name="skin">
<option value="red" $opt1>Red</option>
<option value="green" $opt2>Green</option>
<option value="blue" $opt3>Blue</option>
<option value="yellow" $opt4>Yellow</option>
<option value="black" $opt6>Night Style</option>
<option value="standard" $opt7>Standard</option>
<option value="none" $opt5>Predef</option>
</select>
<input type="submit" value="select">
</form>
}}
<!--/parser:xtscript-->
Copy code
plz tell me how to solb the problem.