Mod Online to day for Discuz 7.x
แก้ไขล่าสุดโดย Saokim999 เมื่อ 2010-1-3 17:54แก้ไขล่าสุดโดย Saokim999 เมื่อ 2010-1-3 17:52
Author yugiohhh - Discuz Viet Nam
Tested Discuz Version 7.2
Support Discuz Version7.x
Source: http://dz.yugiohhh.com/yumods/memberswhohavevisitedinthelastxhours
Demo: http://traitimyenbai.net/forum
Online Demo: http://thpthuongkhe.vn
http://c.uploadanh.com/upload/2/33/0.4651369_2697_1.png
This adds a simple display of all members who have visited the forum in the last X* hours.
* Option (you can edit in Config Zone)
Step 1: Open include/index_classics.inc.php or index.php (Discuz 7.0) (fixed version)
Find:include template('discuz');Add above (There are some configuration settings you can edit in Config Zone):// Start - yugiohhh's Members who have visited in the last X hours - dz.yugiohhh.com
// Start - Config zone (option)
$yu_lasthours = 24; //last x hours
$yu_maxlastxlist = 1000; // limit number of members listed
$yu_boxtitle = 'Members who have visited in the last '.$yu_lasthours.' hours'; // title of visited box
// End - Config zone (option)
$yu_k = time() - ($yu_lasthours * 3600);
$yu_wholastx = array();
$yu_query = $db->query("SELECT s.uid, s.username, s.groupid, s.lastactivity, u.groupid, u.color FROM {$tablepre}members AS s, {$tablepre}usergroups AS u WHERE lastactivity >= ".$yu_k." AND s.groupid=u.groupid ORDER BY lastactivity DESC LIMIT ".$yu_maxlastxlist);
while($yu_lastx = $db->fetch_array($yu_query)) {
$yu_membercount ++;
$yu_lastx['num'] = $yu_membercount;
$yu_lastx['icon'] = isset($_DCACHE['onlinelist'][$yu_lastx['groupid']]) ? $_DCACHE['onlinelist'][$yu_lastx['groupid']] : $_DCACHE['onlinelist'];
$yu_lastx['lastactivity'] = gmdate("$dateformat $timeformat", $yu_lastx['lastactivity'] + ($timeoffset * 3600));
$yu_wholastx[] = $yu_lastx;
}
// End - yugiohhh's Members who have visited in the last X hoursStep 2: Open discuz.htm of your templates
Find:$pluginhooksAdd above:<!-- Start - yugiohhh's Members who have visited in the last X hours - dz.yugiohhh.com --> <div class="mainbox list" id="online"> <span class="headactions"><img id="forumlinks_img" src="{IMGDIR}/$collapseimg.gif" alt="" onclick="toggle_collapse('yu_lasxlist');" /></span> <h3><strong><a href="http://dz.yugiohhh.com">$yu_boxtitle ({$yu_membercount})</a></strong></h3> <dl id="yu_lasxlist" style="padding: 1em; border-top: 1px solid {COMMONBORDER};"> <dd> <!--{if $yu_wholastx}--> <!--{loop $yu_wholastx $key $yu_lastx}--> <!--{if $yu_lastx['uid']}--> <a href="space.php?uid=$yu_lastx" target="_blank" title="{lang time}: $yu_lastx{LF}"><img src="images/common/$yu_lastx['icon']" border="none"/> <font color=$yu_lastx>$yu_lastx</font></a><!--{if $yu_lastx['num'] < $yu_membercount}-->, <!--{/if}--> <!--{else}--> $yu_lastx <!--{/if}--> <!--{/loop}--> <!--{else}--> Empty <!--{/if}--> </dd> </dl> </div> <!-- End - yugiohhh's Members who have visited in the last X hours - dz.yugiohhh.com -->Final Step: Update cache!
Note: You can give me your Feedback, Comments & Suggestions about my products here
http://traitimyenbai.net/forum/viewthread.php?tid=33295or http://dz.yugiohhh.com/home/contact ขอบคุณครับแต่อ่านยากจัง -.- Thanks for share.
Saokim đã share rồi ah` {:18_765:} ขอบคุณครับแต่อ่านยากจัง -.- please speak english
@11: cuar yu share ko phai cua SK ขอบคุณครับแต่อ่านยากจัง = Thank you. But to hard read
I'm say:
Thank you for shared ขอบคุณครับแต่อ่านยากจัง = Thank you. But to hard read
คือว่ามันแสดง User เดียวติดๆ กันอ่ะคับ แก้ยังไงดี ให้มันเป็น User เดียวอ่าคับ try disable guest online
:D:lol try disable guest online
ต้นฉบับโพสต์โดย Saokim999 เมื่อ 2009-12-26 19:56 http://www.discuzthai.com/images/common/back.gif
Disableบันทัดใหนอ่าครับงงมากๆงมมานานละwww.auengine.org/bbs ตอบกลับ 9# prsp
แก้ไฟล์ include/index_classics.inc.php
ตรง isset($_DCACHE['onlinelist'] เปลี่ยนจาก 7 เป็น 5
หรือ
ปิดไม่ให้โชว์ไอคอนผู้เยี่ยมชม
หน้า:
[1]
2