k2757 โพสต์ 2012-5-17 12:40:58

Avatar online list [X2.5]

แก้ไขครั้งสุดท้าย 2012-5-17 12:44 โดย k2757

แก้ไขครั้งสุดท้าย 2012-5-17 12:42 โดย k2757

จาก
http://forum.discuzthai.com/thread-24093-1-1.html
ของพี่ KOH



เปิดไฟล์ template/เทมเพลทที่คุณใช้/forum/discuz.htm

ค้นหา<!--{if $_G['setting']['whosonlinestatus'] && $detailstatus}-->
                              <dl id="onlinelist" class="bm_c">
                                        <dt class="ptm pbm bbda">$_G</dt>
                                        <!--{if $detailstatus}-->
                                                <dd class="ptm pbm">
                                                <ul class="cl">
                                                <!--{if $whosonline}-->
                                                      <!--{loop $whosonline $key $online}-->
                                                                <li title="{lang time}: $online">
                                                                <img src="{STATICURL}image/common/$online" alt="icon" />
                                                                <!--{if $online['uid']}-->
                                                                        <a href="home.php?mod=space&uid=$online">$online</a>
                                                                <!--{else}-->
                                                                        $online
                                                                <!--{/if}-->
                                                                </li>
                                                      <!--{/loop}-->
                                                <!--{else}-->
                                                      <li style="width: auto">{lang online_only_guests}</li>
                                                <!--{/if}-->
                                                </ul>
                                        </dd>
                                        <!--{/if}-->
                              </dl>
                        <!--{/if}-->
                        </div>
                <!--{/if}-->เปลี่ยนเป็น<script language="JavaScript" type="text/javascript">

var itv = 50;
var step = 10;
var start = 0;
var end = 0;
var currentOpac;

//change the opacity for different browsers
function changeOpac(obj, opacity) {
var object = obj.style;
object.opacity = (opacity / 100);
object.MozOpacity = (opacity / 100);
object.KhtmlOpacity = (opacity / 100);
object.filter = "alpha(opacity=" + opacity + ")";
}

function BeginOpacity(obj, s, e)
{
start = s;
end = e;
currentOpac = s;
theobject=obj;
changing=setInterval("opacityit(theobject)",itv);
}

function EndOpacity(obj, end){
clearInterval(changing);
changeOpac(obj, end);
}

function opacityit(obj){
if(start > end) {
if (currentOpac>end){
   currentOpac = currentOpac - step;
   changeOpac(obj,currentOpac);
}
else if (window.highlighting)
   clearInterval(highlighting);
} else if(start < end) {
if (currentOpac<end){
   currentOpac = currentOpac + step;
   changeOpac(obj,currentOpac);
}
else if (window.changing)
   clearInterval(changing);
}
}
//-->
</script>

                        <!--{if $_G['setting']['whosonlinestatus'] && $detailstatus}-->
                              <dl id="onlinelist" class="bm_c">
                                        <dt class="ptm pbm bbda">$_G</dt>
                                        <!--{if $detailstatus}-->
                                                <dd class="ptm pbm">
                                                <ul class="cl">
<div style="width:924px; margin: 0 auto; overflow:hidden; ">
<div style="width:960px; ">
                                                <!--{if $whosonline}-->
                                                      <!--{loop $whosonline $key $online}-->
                                                                <li title="{lang time}: $online">
                                                                <!--{if $online['uid']}-->
                                                                <div style="float:left;width:54px; height:74px; overflow:hidden; ">
                                                                <div id="show_user_online" style="">
                                                                        <div class="avt">
                                                                              <a href="home.php?mod=space&uid=$online"c="1"><img src="uc_server/avatar.php?uid=$online&amp;size=small]"/></a>
                                                                        </div>
                                                                        <div id="icon_user_online"><img src="{STATICURL}image/common/$online" alt="icon"style="FILTER: alpha(opacity=40);-moz-opacity: 0.4; opacity: 0.4;" onmouseover=BeginOpacity(this,40,100) onmouseout=EndOpacity(this,40) /></div>
                                                                </div>
                                                                        <div><a href="home.php?mod=space&uid=$online">$online</a></div>
                                                                </div>
                                                                <!--{else}-->
                                                                <div style="float:left;width:54px; height:74px; overflow:hidden; ">
                                                                        <div class="avt"><img src="uc_server/images/noavatar_small.gif"/></div>
                                                                        <div>$online</div>
                                                                </div>
                                                                <!--{/if}-->
                                                                </li>
                                                      <!--{/loop}-->
                                                <!--{else}-->
                                                      <li style="width: auto">{lang online_only_guests}</li>
                                                <!--{/if}-->
</div>
</div>
                                                </ul>
                                        </dd>
                                        <!--{/if}-->
                              </dl>
                        <!--{/if}-->
                        </div>
                <!--{/if}-->เปิดไฟล์ template/เทมเพลทที่คุณใช้/common/module.css
ค้นหา.oll li { float: left; overflow: hidden; white-space: nowrap; width: 19.9%; height: 24px; line-height: 24px; }เปลี่ยนเป็น.oll li { float: left; overflow: hidden; white-space: nowrap; width: 58px; height: 84px; line-height: 24px; text-align: center; }
#show_user_online { width:54px; height:54px;overflow: hidden; position:relative; }
#icon_user_online { position:absolute; top:35px; left:0; margin: 0 3px; width:48px; height:48px; text-align: left; }
หน้า: [1]
ดูในรูปแบบกติ: Avatar online list [X2.5]