• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

toilatoi10

New Member
Code chatt xtgem có cookie lưu tên nick rất tiện lợi.
demo
hướng dẫn:
1. Tạo thư mục chat
2. Tạo file index trong thư mục chat dán code này vào.
Code:
<!--parser:xtscript-->
var $name = call cookie::get $name=name; $default=<xt:browser detail="2" />
<!--/parser:xtscript-->
<style>
#chatt_form {
display: none;
}
</style>
<!--parser:xtscript-->
print {{<a href="cai-dat">Cài đặt</a><br/><form action="" method="post">
<input type="hidden" name="input" value="1"/>
<input type="hidden" name="nick" value="$name"/>
<b>Vui lòng vào cài đặt để chọn tên nick.</b><br/>
Nội dung: <input type="text" name="msg" value="$quot"/><br/>
<input type="submit" value="Gửi"/></form></div>}}
print <xt:widget id="chatt" type="default" custom_key="default" count="10" />
<!--/parser:xtscript-->
3. Tạo file cai-dat trong thư mục chat dán code này vào.
Code:
<!--parser:xtscript-->
get nick
if $nick
print Thay đổi thành công
endif
if not $nick
assign $nick=<xt:browser detail="2" />
endif
call cookie::set $name=name;$val=$nick;$expire=31556926;$path=/chat;
var $name = call cookie::get $name=name;$default=<xt:browser detail="2" />
print {{
<a href="index">Về chat</a><br/><form action="" method="post">
- Tên bạn: <input type="text" name="nick" value="$nick"/><br/>
<input type="submit" value="Thay đổi"/><br/>
</form>
}}
<!--/parser:xtscript-->
Nguồn: http://dpcantho.wap.sh
 

Facebook Comments

New posts New threads New resources

Back
Top