Trong ego mặc định là cái Thăm dò ý kiến. Cái này làm bằng shoutbox nên có hiện tên thành viên và xóa bình chọn.
Tạo shoutbox history
Ô 1:
TWIG
{%set binhchon%}Bạn thích mẫu người yêu như thế nào?;Xấu;Đẹp;Khó ưa;Vui tính;Hòa đồng{%endset%}{%set bc=binhchon|split(';')%}{%set lk=''%}{%set iu=''%} {%set msg=message_list|split('[-msS-]')%}{%set dautien%}{%if msg|length==1%}Hãy là người đầu tiên bình chọn<br/>{%endif%}{%endset%}{%set sobc%}{{msg|length-1==0?'Chưa có bình chọn':('Có '~(msg|length-1)~' lượt bình chọn')}}{%endset%}{%set dk%}{%if api.user_id in 'msS'~msg|join('')%}1{%else%}0{%endif%}{%endset%} {%macro getbc(msg,j,n)%}{%set yy=''%}{%set y=0%}{%set cvb%}{%for i in 0..msg|length%}{%set ix=msg[i]|split('|')%}{%if ix[1]==j%}{%set y=y+1%}<a href="user_info.php?uid={{ix[0]}}">{{api.u.get(ix[0]).nick}}</a>{%if ix[0]==api.user_id%}{%set yy=(ix[2]|split('</div>')[1]|split('</form><div class="center">')[0]~'</form><br/>')|replace({'[X]':'Xóa bình chọn','<div class="center">':'<div class="left">'})|raw%}{%endif%}, {%endif%}{%endfor%}{%endset%}{%set cvb=cvb|reverse|slice(2)|reverse%}{%if n==0%}{{cvb|raw}}{%elseif n==1%}{{y/(msg|length-1)*100}}{%elseif n==2%}{{yy|raw}}{%endif%}{%endmacro%}{%import _self as cnvt%} <div class="left"> {{dautien|raw}} <b>{{bc[0]|raw}}</b><br/> <form method="post" action="{{dk=='0'?form_url:''}}"> {%for j in 1..bc|length-1%} {{j}}.{%if dk=='0'%}<input type="radio" name="text" value="{{j}}"/>{%endif%} {{bc[j]}} {%if dk=='1'%}{{cnvt.getbc(msg,j,0)}} ({{cnvt.getbc(msg,j,1)}} %){%set iu=cnvt.getbc(msg,j,2)|raw%}{%if iu|length>5%}{%set lk=iu%}{%endif%}{%endif%}<br/> {%endfor%} {%if dk=='0'%}<input type="submit" value="Bình chọn"/>{%endif%} </form> {{lk|raw}} {{sobc|raw}} </div>
Ô 2:
TWIG
{{nick|slice(27,8)}}|{{message}}|{{delete_post_button}}[-msS-]
Hướng dẫn:
Thay Bạn thích mẫu người yêu như thế nào?;Xấu;Đẹp;Khó ưa;Vui tính;Hòa đồng thành từ khóa bình chọn bạn muốn, cách nhau dấu chấm phẩy (;)
Demo: http://shoutboxgenerator.wap.m ... 13988
Nguồn: http://chonguoivotinh.wap.mu