Discuz Thai

 ลืมรหัสผ่าน
 สมัครสมาชิก

ข้อตกลงการใช้งานกระดานข่าวดิสคัสไทย DiscuzThai Agreement (English Version) ประกาศดิสคัสไทย - ทำเนียบดิสคัสภาษาไทย

Discuz! X3.5 Thai R20231001 Rev.8 (NEW) [วิดีโอช่วยสอน] อัปเกรด Discuz! X3.4 เป็น X3.5 Discord ของ Discuz! Thai Community อย่างเป็นทางการ

Discuz! X3.4 Thai R20220811 (REV.75) สิ้นสุดการสนับสนุน Discuz! X3.4 ภาษาไทยตั้งแต่วันนี้เป็นต้นไป (ขอแนะนำให้อัปเกรดเป็น X3.5 แทน)

ค้นหา
แท็กยอดนิยม: ดิสคัสภาษาไทย Discuz Thai
ดู: 5325|ตอบกลับ: 18

Mod Online to day for Discuz 7.x

  [คัดลอกลิงก์]
Saokim999 โพสต์ 2009-12-26 13:10:11 |โหมดอ่าน
แก้ไขล่าสุดโดย Saokim999 เมื่อ 2010-1-3 17:54

แก้ไขล่าสุดโดย Saokim999 เมื่อ 2010-1-3 17:52

Author     yugiohhh   - Discuz Viet Nam
Tested Discuz Version 7.2  
Support Discuz Version  7.x  
Source: http://dz.yugiohhh.com/yumods/me ... itedinthelastxhours
Demo: http://traitimyenbai.net/forum
Online Demo: http://thpthuongkhe.vn



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:
  1. include template('discuz');
คัดลอกไปที่คลิปบอร์ด
Add above (There are some configuration settings you can edit in Config Zone):
  1. // Start - yugiohhh's Members who have visited in the last X hours - dz.yugiohhh.com
  2. // Start - Config zone (option)
  3. $yu_lasthours = 24; //last x hours
  4. $yu_maxlastxlist = 1000; // limit number of members listed
  5. $yu_boxtitle = 'Members who have visited in the last '.$yu_lasthours.' hours'; // title of visited box
  6. // End - Config zone (option)

  7. $yu_k = time() - ($yu_lasthours * 3600);
  8. $yu_wholastx = array();
  9. $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);
  10. while($yu_lastx = $db->fetch_array($yu_query)) {
  11. $yu_membercount ++;
  12. $yu_lastx['num'] = $yu_membercount;
  13. $yu_lastx['icon'] = isset($_DCACHE['onlinelist'][$yu_lastx['groupid']]) ? $_DCACHE['onlinelist'][$yu_lastx['groupid']] : $_DCACHE['onlinelist'][0];
  14. $yu_lastx['lastactivity'] = gmdate("$dateformat $timeformat", $yu_lastx['lastactivity'] + ($timeoffset * 3600));
  15. $yu_wholastx[] = $yu_lastx;
  16. }
  17. // End - yugiohhh's Members who have visited in the last X hours
คัดลอกไปที่คลิปบอร์ด
Step 2: Open discuz.htm of your templates
Find:
  1. $pluginhooks[index_bottom]
คัดลอกไปที่คลิปบอร์ด
Add above:
  1. <!-- 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[forumlinks].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[uid]" target="_blank" title="{lang time}: $yu_lastx[lastactivity]{LF}"><img src="images/common/$yu_lastx['icon']" border="none"/> <font color=$yu_lastx[color]>$yu_lastx[username]</font></a><!--{if $yu_lastx['num'] < $yu_membercount}-->, <!--{/if}--> <!--{else}--> $yu_lastx[username] <!--{/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=33295  or http://dz.yugiohhh.com/home/contact

คะแนน

จำนวนผู้เข้าร่วม 2จิตพิศัย +2 Money +1 ย่อ เหตุผล
suthida + 1 + 1 Good
prsp + 1

ดูบันทึกคะแนน

prsp โพสต์ 2009-12-26 13:18:24
ขอบคุณครับแต่อ่านยากจัง -.-
11pascal โพสต์ 2009-12-26 13:35:28
Thanks for share.
Saokim đã share rồi ah` {:18_765:}
 เจ้าของ| Saokim999 โพสต์ 2009-12-26 13:38:18
ขอบคุณครับแต่อ่านยากจัง -.- please speak english

@11: cuar yu share ko phai cua SK
arezapper โพสต์ 2009-12-26 14:01:10
ขอบคุณครับแต่อ่านยากจัง = Thank you. But to hard read

I'm say:
Thank you for shared
freedom2010 โพสต์ 2009-12-26 15:06:00
ขอบคุณครับแต่อ่านยากจัง = Thank you. But to hard read
prsp โพสต์ 2009-12-26 16:40:56



คือว่ามันแสดง User เดียวติดๆ กันอ่ะคับ แก้ยังไงดี ให้มันเป็น User เดียวอ่าคับ

ขออภัย! โพสต์นี้มีไฟล์แนบหรือรูปภาพที่ไม่ได้รับอนุญาตให้คุณเข้าถึง

คุณจำเป็นต้อง ลงชื่อเข้าใช้ เพื่อดาวน์โหลดหรือดูไฟล์แนบนี้ คุณยังไม่มีบัญชีใช่ไหม? สมัครสมาชิก

x
 เจ้าของ| Saokim999 โพสต์ 2009-12-26 19:56:09
try disable guest online
prsp โพสต์ 2009-12-26 22:43:49
try disable guest online
ต้นฉบับโพสต์โดย Saokim999 เมื่อ 2009-12-26 19:56



    Disableบันทัดใหนอ่าครับงงมากๆงมมานานละ
  1. www.auengine.org/bbs
คัดลอกไปที่คลิปบอร์ด
phoomkub โพสต์ 2009-12-28 21:14:07
ตอบกลับ 9# prsp

แก้ไฟล์ include/index_classics.inc.php

ตรง isset($_DCACHE['onlinelist'][7] เปลี่ยนจาก 7 เป็น 5

หรือ

ปิดไม่ให้โชว์ไอคอนผู้เยี่ยมชม
ขออภัย! คุณไม่ได้รับสิทธิ์ในการดำเนินการในส่วนนี้ กรุณาเลือกอย่างใดอย่างหนึ่ง ลงชื่อเข้าใช้ | สมัครสมาชิก

รายละเอียดเครดิต

รายชื่อผู้กระทำผิด|Archiver|ดิสคัส ไทย Follow us: Become a fan on facebook. Follow us on Twitter.

GMT+7, 2024-4-28 14:43

Powered by Discuz! X3.4, Rev.66

Copyright © 2001-2021 Tencent Cloud. Licensed

ตอบกระทู้ ขึ้นไปด้านบน ไปที่หน้ารายการกระทู้