- สิทธิ์ในการอ่าน
- 200
- UID
- 1
- เครดิต
- 5018
- จิตพิศัย
- 5018
- Money
- 26596
- Gold
- 6307
- โพสต์
- 4517
- กระทู้
- 83
- ลงทะเบียนเมื่อ
- 2007-10-2
- ลงชื่อเข้าใช้ล่าสุด
- 2012-5-24
  
- สิทธิ์ในการอ่าน
- 200
- UID
- 1
- เครดิต
- 5018
- จิตพิศัย
- 5018
- Money
- 26596
- Gold
- 6307
- โพสต์
- 4517
- กระทู้
- 83
- ลงทะเบียนเมื่อ
- 2007-10-2
- ลงชื่อเข้าใช้ล่าสุด
- 2012-5-24
|
รายละเอียด : แสดงรายชื่อสมาชิกลงทะเบียนล่าสุด 20 อันดับ
เจ้าของ : lokyiuyau
สำหรับ : Discuz 6.0
ไฟลล์ที่ต้องแก้ไข :
DISCUZ/include/cache.func.php
register.php
index.php
DISCUZ/templates/default/discuz.htm
ตัวอย่าง :
Original & Special Thank
http://www.alan888.com/Discuz/thread-124856-1-16.html
1. เปิดไฟลล์ DISCUZ/include/cache.func.php
ค้นหา- ('announcements', 'onlinelist', 'forumlinks', 'advs_index', 'supe_updateusers', 'supe_updateitems', 'tags_index'
คัดลอกไปที่คลิปบอร์ด เพิ่มโค๊ดต่อท้ายค้นหา- case 'magics':
- $table = 'magics';
- $cols = 'magicid, available, identifier, name, description, weight, price';
- break;
คัดลอกไปที่คลิปบอร์ด เพิ่มบรรทัดต่อไป- //โค๊ดแสดง 20 สมาชิกลงทะเบียนล่าสุด - START
- case 'new20member':
- $table = 'members';
- $cols = 'username, regdate, lastvisit, regip, posts';
- $conditions = "ORDER BY regdate DESC LIMIT 0,30";
- break;
- //โค๊ดแสดง 20 สมาชิกลงทะเบียนล่าสุด - END
คัดลอกไปที่คลิปบอร์ด 2. เปิดไฟลล์ register.php
ค้นหา- $styleid = $styleid ? $styleid : $_DCACHE['settings']['styleid'];
คัดลอกไปที่คลิปบอร์ด เพิ่มบรรทัดต่อไป- //โค๊ดแสดง 20 สมาชิกลงทะเบียนล่าสุด - START
- require DISCUZ_ROOT.'./include/cache.func.php';
- updatecache('new20member');
- //โค๊ดแสดง 20 สมาชิกลงทะเบียนล่าสุด - END
คัดลอกไปที่คลิปบอร์ด 3. เปิดไฟลล์ index.php
ค้นหาเพิ่มในบรรทัดต่อไป- //โค๊ดแสดง 20 สมาชิกลงทะเบียนล่าสุด - START
- require_once DISCUZ_ROOT.'./include/misc.func.php';
- $mem_home = convertip($onlineip, $datadir = "./");
- //โค๊ดแสดง 20 สมาชิกลงทะเบียนล่าสุด - END
คัดลอกไปที่คลิปบอร์ด ค้นหา- foreach(array('forumlinks', 'birthdays', 'supe_updateusers'
คัดลอกไปที่คลิปบอร์ด เพิ่มโค๊ดนี้ต่อท้ายค้นหา- if($discuz_uid && $newpm) {
- require_once DISCUZ_ROOT.'./include/pmprompt.inc.php';
- }
คัดลอกไปที่คลิปบอร์ด เพิ่มในบรรทัดต่อไป- //โค๊ดแสดง 20 สมาชิกลงทะเบียนล่าสุด - START
- $new20member = array();
- foreach($_DCACHE['new20member'] as $newmem)
- {
- $newmem['regdate'] = gmdate("$dateformat $timeformat", $newmem[regdate]+ ($timeoffset * 3600));
- $newmem['lastvisit'] = gmdate("$dateformat $timeformat", $newmem[lastvisit]+ ($timeoffset * 3600));
- if($discuz_uid && $adminid)
- {
- $newmem['iplocation'] = convertip($newmem['regip']);
- }
- $new20member[] = $newmem;
- }
- //โค๊ดแสดง 20 สมาชิกลงทะเบียนล่าสุด - END
คัดลอกไปที่คลิปบอร์ด 4. DISCUZ/templates/default/discuz.htm
ค้นหา- <div class="legend">
- <label><img src="{IMGDIR}/forum_new.gif" alt="{lang forum_newposts}" />{lang forum_newposts}</label>
- <label><img src="{IMGDIR}/forum.gif" alt="{lang forum_nonewpost}" />{lang forum_nonewpost}</label>
- </div>
คัดลอกไปที่คลิปบอร์ด เพิ่มในบรรทัดต่อไปบันทึกทั้งหมด
5. โหลดไฟลล์ขึ้นไปวางตามตำแหน่งต้นฉบับ
ปล. หากพบเออเร่อ- Warning: Invalid argument supplied for foreach() in /home/public_html/discuz/index.php on line xxx
คัดลอกไปที่คลิปบอร์ด ให้ทำการเคลียร์แคชแล้วลองใหม่ครับ
เรียบร้อยครับ |
ขออภัย! โพสต์นี้มีไฟล์แนบหรือรูปภาพที่ไม่ได้รับอนุญาตให้คุณเข้าถึง
คุณจำเป็นต้องลงชื่อเข้าใช้ก่อน หลังจากนั้นจะสามารถดูและดาวน์โหลดไฟล์แนบได้ หากยังไม่มีบัญชีสมาชิก กรุณาสมัครสมาชิก
|