Snack's 1967
Share Code Shoutbox Nhóm Nội Dung | Wapego | Góc wap/webmaster -
Hi, Phòng khách!
Gợi ý : Hãy * Đăng nhập Hoặc Đăng ký tài khoản để sử dụng hết chức năng của diễn đàn !

Share Code Shoutbox Nhóm Nội Dung Share Code Shoutbox Nhóm Nội Dung


Đánh giá: 100%
tcm
100/ 100 100 bình chọn
Bài viết 21-09-2015
* KhanhSociu
Cấp bậc: mem
Shoutbox này nó gom comment của 1 người thành 1 và hiện time ở comment cuối. Có phân chia nam nữ.
Demo: http://shoutboxgenerator.wap.mu/main.php?f=3410080
Ô 1 shoutbox
{%macro mauchu(stext,start)%}{%if start==0%}{%set start="now"|date("s")%}{%endif%}{%set stext=stext|replace({"ờ":'ờ',"ừ":'ừ',"ò":'ò',"ề":'ề',"è":'è',"à":'à',"ù":'ù',"ầ":'ầ',"ì":'ì',"ạ":'ạ',"ị":'ị',"ệ":'ệ',"ọ":'ọ',"ế":'ế',"í":'í',"á":'á',"ấ":'ấ',"ố":'ố',"ẳ":'ẳ',"ủ":'ủ'})%}{%set mau=["f00","f30","f60","f90","fc0","ff0","cf0","9f0","6f0","3f0","0f0","0f3","0f6","0f9","0fc","0ff","0cf","09f","06f","03f","00f","30f","60f","90f","c0f","f0f","f0c","f09","f06","f03"]%} {%set l=stext|length%} {%set giatri=""%} {%for i in 0..l%} {%set giatri=giatri~'<font style="color:#'~mau[(i+start)%(mau|length)]~'">'~stext|slice(i,1)~'</font>'%} {%endfor%}{{giatri|raw}}{%endmacro%}{%macro noidungx(user,msg,next,date,dk)%}{%import _self as thaian2009%}
<div style="clear:both;margin-top:3px"></div><div class="gt{{user.sex}}">{%if dk==1%}
    <table width="100%%" cellpadding="0" cellspacing="1" {%if user.sex==2%}style="float:right"{%endif%}><tbody>
      <tr valign="top">{%if user.sex==1%}<td width="35px"><img src="{{user.profilephotourl(5,true)}}" class="xhinh"/></td><td>{%if api.user_id!=user.uid%}<script type="text/javascript">
        frend=online_users.search(escape('{{user.uid}}'));if(frend < 0){document.write('<img src="/files/1049801/schop.gif"/>')}else{document.write('<img src="/files/1049801/xchop.gif"/>')};</script>{%endif%}<a href="user_info.php?uid={{user.uid}}" class="level{{user.level}}">{{user.nick}}</a>
{{thaian2009.mauchu("Xu: "~user.plus,0)}}{%if api.user_id!=user.uid%}
<a href="pm.php?id=new&to={{user.uid}}">[PM]</a>{%endif%}</td>{%else%}<td><a href="user_info.php?uid={{user.uid}}" class="level{{user.level}}">{{user.nick}}</a>{%if api.user_id!=user.uid%}<script type="text/javascript">
        frend=online_users.search(escape('{{user.uid}}'));if(frend < 0){document.write('<img src="/files/1049801/schop.gif"/>')}else{document.write('<img src="/files/1049801/xchop.gif"/>')};</script>{%endif%}
{{thaian2009.mauchu("Xu: "~user.plus,0)}}{%if api.user_id!=user.uid%}
<a href="pm.php?id=new&to={{user.uid}}">[PM]</a>{%endif%}</td><td width="35px"><img src="{{user.profilephotourl(5,true)}}" class="xhinh"/></td>{%endif%}</tr></tbody></table>
  {%endif%}
<div class="nhom"><span class="noidungz nd{{user.sex}}"><i class="arrow ar{{user.sex}}"></i><div class="xkhunga"></div><div class="xkhungb"></div><div class="xkhungc"></div><div class="xkhungchus">{{msg|replace({"[imgs]":'<center><img class="swat" style="border:1px solid#ddd;padding:1px" src="',"[/imgs]":'"/></center>',"[center]":'<center>',"[/center]":'</center>',"[tim]":'<b style="background-image:url(/files/1049801/saoroi.gif);color:#F0F; font-size:22px;font-style: italic;">',"[/tim]":'</b>',"wapego":'',"waplux":''})|raw}}{%if user.uid!=next%}
<span style="color:gray">({%set ngay=date|date("d-m-Y H:i:s")%}{%set b="now"|date("d-m-Y H:i:s")%}{% set c = date( b ).diff(date( ngay ))%}{%if c.h==0 and c.i==0 and c.s<=3%}Vừa xong.{%elseif c.h==0 and c.i==0%}{{c.s}} giây trước.{%elseif c.h==0 and c.i>=0%}{{c.i}} phút trước.{%else%}{{c.h}} giờ trước.{%endif%})</span>{%endif%}</div><div class="xkhungc"></div><div class="xkhungb"></div><div class="xkhunga"></div></span></div><div style="clear:both"></div></div>
{%endmacro%}{%import _self as thaian2009%}
<div class="center"><font color="#0044aa"> <a href="/main.php?f=3384985"><font color="#0099FF">Smiles</font></a> | <a href="main.php?f=3325896"><font color="#FF0099">BB Codes</font></a> | <a href="main.php?[ses]&a=[time]#chatne"><font color="#ff0000">Làm Mới</font></a> | <a href="/main.php?f=3379196&style=Mobile"><font color="#ff0000">ADM</font></a></font></div>
<div class="center" style="text-align:center!important"><center>
<div class="shoutbox"><font color="#0044aa"><font color="#0044aa">
  <form action="{{form_url}}" method="post"> <textarea rows="2" cols="35" name="text" style="width:auto" class="nhapchu">{%if api.r.get("ten")>4%}@[{{api.r.get("ten")|raw}}] {%endif%}{{api.r.get("icon")}}</textarea>
 
    <input type="submit" value="Đăng" class="nutbam"/></form>
  </font></font></div></center>
  {%set msg=message_list|split("[-msSthaian2009-]")%}{%if msg[0]|length < 1%}<center><b style="color:gray">Chưa có dữ liệu, xin post vài comment ^^</b></center>{%else%}
  {%set thutu=msg[0]|split("[-zdata-]")[1]|split("[-zdate-]")[0]%}{%set dk=1%}
  <div class="cachx">{%for i in 0..msg|length-2%}{%set user=api.u.get(msg[i]|split("[-zdata-]")[1]|split("[-zdate-]")[0])%}
      {%if user.uid==thutu%}{%set date=msg[i]|split("[-zdate-]")[1]%}
    {{thaian2009.noidungx(user,msg[i]|split("[-zdata-]")[0],msg[i+1]|split("[-zdata-]")[1],date,dk)}}
  {%else%}
  {%set thutu=msg[i+1]|split("[-zdata-]")[1]%}{%set dk=0%}
  {%endif%}
    {%set dk=dk+1%}{%if dk==1%}
    {{thaian2009.noidungx(user,msg[i]|split("[-zdata-]")[0],msg[i+1]|split("[-zdata-]")[1],date,dk)}}
    {%endif%}
    {%endfor%}</div>{%endif%}
</div>
<center>{{paging_def}}</center>
Copy code


Ô 2 shoutbox
{{message}}[-zdata-]{{nick|slice(27,8)}}[-zdate-]{{message_date}}[-msSthaian2009-]
Copy code

- Để số tin nhắn là 10
Nguồn: cobethoitiet
Share Code Shoutbox Nhóm Nội Dung Tổng số: 1
Chia sẻ:Google Plus Twitter Facebook
BBCode:

Link:
Từ khóa: Shoutbox , Code , Dung , Nhóm , Shoutbox , Share
Trực tuyến
- BOT , 1 khách ghé thăm