XtGem Forum catalog
03-09-2016#
admin offline * LeYTi (Sáng Lập!)
Level MAX  Like 0
Xu 0  TN 0
VnMaster

Vào Thẳng Vấn Đề :3
Demo : Đây (đang để head pc vs mobile giống nhau :yao:)

B1: Dán code sau vào _header
<!--parser:xtscript-->

var $default = <xt:get_device_template />

var $style = call cookie::get $name=style;$default=$default;

if $style == web

Print {{Bạn đang xem style web ở header}}

else

Print {{Bạn đang xem style wap ở header}}

endif

<!--/parser:xtscript-->

Copy code


B2: Vào _footer dán code này
<!--parser:xtscript-->

var $default = <xt:get_device_template />

var $style = call cookie::get $name=style;$default=$default;

if $style == web

Print {{Bạn đang xem style web ở footer}}

Print <a href="/style?style=mobile">WapVersion</a>

else

Print {{Bạn đang xem style wap ở footer}}

Print <a href="/style?style=web">Web Version</a>

endif

<!--/parser:xtscript-->

Copy code


B3: Tạo file style ngang với index và chèn code này vào
<!--parser:xtscript-->

get style

if $style

call cookie::set $name=style; $val=$style; $expire=31556926;

else

call cookie::set $name=style; $val=mobile; $expire=31556926;

endif

<!--/parser:xtscript-->

<div class="phdr">Đổi giao diện</div><div class="list1">

<font color="green">Đang tải giao diện....


<meta http-equiv=refresh content="0; URL=<xt id="referer" local="y" default="http://viptruyen.mobie.in">">

  Nếu trang không tự tải lại xin <a href="<xt id="referer" local="y" default="http://viptruyen.mobie.in">">Click vào đây.</a></font>

</div>

Copy code

Sửa link lại nhé

B4: Vào các file đã tạo sữa nội dung, chỉ sử dụng HTML cho các file trong mục auto. File nào và công dụng thì nhìn tên file là biết rồi nha :D

Chúc các bạn thành công.

Nguồn : VipTruyen
Online
» Có 0 thành viên1 khách đang trực tuyến.
Stats
TOP
Facebook - Thanks to XTgem™ Sitemap - Nội quy
© 2015-2017 VnMaster.Yn.Lt
-->