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
ดู: 2659|ตอบกลับ: 5

[A/M/H6.0] [TOPSTAR]กล่องแสดงอันดับการโพสของสมาชิก

 ปิด [คัดลอกลิงก์]
buachompoox โพสต์ 2007-12-31 01:40:46 |โหมดอ่าน
เหมือนเดิมครับสำรองข้อมูลไฟล์ที่เกี่ยวข้องก่อน

Demo : http://www.bleach-xp.com/index.php

ผมออกตัวไว้ก่อนนะครับว่าไฟล์ที่ให้โหลดยังไม่ได้ทำการแปลเลยแต่ทดสอบแล้วใช้งานได้

Download : http://www.discuz.net/attachment.php?aid=180936

อัพโหลดไฟล์จากที่โหลดมา

Step : 1

Open include/cache.func.php  view
  1. 'medals'        => array('medals'),
คัดลอกไปที่คลิปบอร์ด
In its above plus
  1. 'poststar'        => array('daystar', 'yestodaystar','weekstar', 'monthstar', 'yearstar'),
คัดลอกไปที่คลิปบอร์ด
view
  1. case 'medals':
  2.                         $table = 'medals';
  3.                         $cols = 'medalid, name, image';
  4.                         $conditions = "WHERE available='1'";
  5.                         break;
คัดลอกไปที่คลิปบอร์ด
In its above plus

  1. //===============????BY 33201 ??
  2.                 case 'daystar':
  3.                         $month=date(n);
  4.                         $date=date(j);
  5.                         $year=date(Y);
  6.                         $time=mktime(0,0,0,$month,$date,$year);
  7.                         $table = 'posts p';
  8.                         $cols = 'count(p.pid) as num,p.author,p.authorid,m.uid,m.credits,m.posts,m.digestposts ,me.avatar,m.oltime,me.avatarwidth,me.avatarheight';
  9.                         $conditions = "left join {$tablepre}members m on p.authorid=m.uid  left join {$tablepre}memberfields me on p.authorid=me.uid where p.dateline>$time  group by p.authorid order by num desc limit 0,10";
  10.                         break;
  11.                 case 'yestodaystar':
  12.                         $month=date(n);
  13.                         $date=date(j);
  14.                         $year=date(Y);
  15.                         $time=mktime(0,0,0,$month,$date,$year);
  16.                         $ytime=mktime(0,0,0,$month,$date-1,$year);
  17.                         $table = 'posts p';
  18.                         $cols = 'count(p.pid) as num,p.author,p.authorid,m.uid,m.credits,m.posts,m.digestposts ,me.avatar,m.oltime,me.avatarwidth,me.avatarheight';
  19.                         $conditions = "left join {$tablepre}members m on p.authorid=m.uid  left join cdb_memberfields me on p.authorid=me.uid where p.dateline<=$time and p.dateline>$ytime  group by p.authorid order by num desc limit 0,10";
  20.                         break;
  21.                 case 'weekstar':
  22.                         $month=date(n);
  23.                         $date=date(j);
  24.                         $year=date(Y);
  25.                         $week=date(w);
  26.                         $time=mktime(0,0,0,$month,$date,$year);
  27.                         $weektime=mktime(0,0,0,$month,$date-$week,$year);
  28.                         $table = 'posts p';
  29.                         $cols = 'count(p.pid) as num,p.author,p.authorid,m.uid,m.credits,m.posts,m.digestposts ,me.avatar,m.oltime,me.avatarwidth,me.avatarheight';
  30.                         $conditions = "left join {$tablepre}members m on p.authorid=m.uid  left join {$tablepre}memberfields me on p.authorid=me.uid where p.dateline>=$weektime  group by p.authorid order by num desc limit 0,10";
  31.                         break;
  32.                 case 'monthstar':
  33.                         $month=date(n);
  34.                         $year=date(Y);
  35.                         $monthtime=mktime(0,0,0,$month,1,$year);
  36.                         $table = 'posts p';
  37.                         $cols = 'count(p.pid) as num,p.author,p.authorid,m.uid,m.credits,m.posts,m.digestposts ,me.avatar,m.oltime,me.avatarwidth,me.avatarheight';
  38.                         $conditions = "left join {$tablepre}members m on p.authorid=m.uid  left join {$tablepre}memberfields me on p.authorid=me.uid where p.dateline>=$monthtime  group by p.authorid order by num desc limit 0,10";
  39.                         break;
  40.                
  41.                 case 'yearstar':
  42.                         $year=date(Y);
  43.                         $yeartime=mktime(0,0,0,1,1,$year);
  44.                         $table = 'posts p';
  45.                         $cols = 'count(p.pid) as num,p.author,p.authorid,m.uid,m.credits,m.posts,m.digestposts ,me.avatar,m.oltime,me.avatarwidth,me.avatarheight';
  46.                         $conditions = "left join {$tablepre}members m on p.authorid=m.uid  left join {$tablepre}memberfields me on p.authorid=me.uid where p.dateline>=$yeartime  group by p.authorid order by num desc limit 0,10";
  47.                         break;

  48. //===================????BY 33201 ??
คัดลอกไปที่คลิปบอร์ด
view

  1. case 'settings':
  2.             while($setting = $db->fetch_array($query)) {
  3.                 if($setting['variable'] == 'extcredits') {
คัดลอกไปที่คลิปบอร์ด
In its above plus

  1. //===================????BY 33201 ??
  2.                 case 'daystar':
  3.                         while($toppost = $db->fetch_array($query)) {
  4.                                 $toppost['author'] = $toppost['author'] ? $toppost['author'] : '??';
  5.                                 $toppost['authorid'] = $toppost['authorid'] ? $toppost['authorid'] : '??';
  6.                                 $toppost['avatar'] = $toppost['avatar'] ? $toppost['avatar'] : 'images/nopic.gif';
  7.                                 $toppost['avatarwidth'] = $toppost['avatarwidth'] ? $toppost['avatarwidth'] : '80';
  8.                                 $toppost['avatarheight'] = $toppost['avatarheight'] ? $toppost['avatarheight'] : '80';
  9.                                 $data[] = $toppost;
  10.                         }
  11.                         break;
  12.                 case 'yestodaystar':
  13.                         while($toppost = $db->fetch_array($query)) {
  14.                                 $toppost['author'] = $toppost['author'] ? $toppost['author'] : '??';
  15.                                 $toppost['authorid'] = $toppost['authorid'] ? $toppost['authorid'] : '??';
  16.                                 $toppost['avatar'] = $toppost['avatar'] ? $toppost['avatar'] : 'images/nopic.gif';
  17.                                 $toppost['avatarwidth'] = $toppost['avatarwidth'] ? $toppost['avatarwidth'] : '80';
  18.                                 $toppost['avatarheight'] = $toppost['avatarheight'] ? $toppost['avatarheight'] : '80';
  19.                                 $data[] = $toppost;
  20.                         }
  21.                         break;
  22.                 case 'weekstar':
  23.                         while($toppost = $db->fetch_array($query)) {
  24.                                 $toppost['author'] = $toppost['author'] ? $toppost['author'] : '??';
  25.                                 $toppost['authorid'] = $toppost['authorid'] ? $toppost['authorid'] : '??';
  26.                                 $toppost['avatar'] = $toppost['avatar'] ? $toppost['avatar'] : 'images/nopic.gif';
  27.                                 $toppost['avatarwidth'] = $toppost['avatarwidth'] ? $toppost['avatarwidth'] : '80';
  28.                                 $toppost['avatarheight'] = $toppost['avatarheight'] ? $toppost['avatarheight'] : '80';
  29.                                 $data[] = $toppost;
  30.                         }
  31.                         break;
  32.                 case 'monthstar':
  33.                         while($toppost = $db->fetch_array($query)) {
  34.                                 $toppost['author'] = $toppost['author'] ? $toppost['author'] : '??';
  35.                                 $toppost['authorid'] = $toppost['authorid'] ? $toppost['authorid'] : '??';
  36.                                 $toppost['avatar'] = $toppost['avatar'] ? $toppost['avatar'] : 'images/nopic.gif';
  37.                                 $toppost['avatarwidth'] = $toppost['avatarwidth'] ? $toppost['avatarwidth'] : '80';
  38.                                 $toppost['avatarheight'] = $toppost['avatarheight'] ? $toppost['avatarheight'] : '80';
  39.                                 $data[] = $toppost;
  40.                         }
  41.                         break;
  42.                 case 'yearstar':
  43.                         while($toppost = $db->fetch_array($query)) {
  44.                                 $toppost['author'] = $toppost['author'] ? $toppost['author'] : '??';
  45.                                 $toppost['authorid'] = $toppost['authorid'] ? $toppost['authorid'] : '??';
  46.                                 $toppost['avatar'] = $toppost['avatar'] ? $toppost['avatar'] : 'images/nopic.gif';
  47.                                 $toppost['avatarwidth'] = $toppost['avatarwidth'] ? $toppost['avatarwidth'] : '80';
  48.                                 $toppost['avatarheight'] = $toppost['avatarheight'] ? $toppost['avatarheight'] : '80';
  49.                                 $data[] = $toppost;
  50.                         }
  51.                         break;

  52. //=====================????BY 33201 ??
คัดลอกไปที่คลิปบอร์ด
Step 2 : Edit documents include / newthread.inc.php  view

  1. updatepostcredits('+', $discuz_uid, $postcredits);
คัดลอกไปที่คลิปบอร์ด
Below increase in its

  1. require_once DISCUZ_ROOT.'./include/cache.func.php';
  2.                 updatecache('daystar');
คัดลอกไปที่คลิปบอร์ด
Step 3 : Edit documents include / newreply.inc.php  view

  1. updatepostcredits('+', $discuz_uid, $replycredits);
คัดลอกไปที่คลิปบอร์ด
Below increase in its

  1. require_once DISCUZ_ROOT.'./include/cache.func.php';
  2.                 updatecache('daystar');
คัดลอกไปที่คลิปบอร์ด
Step 4 : Edit documents topicadmin.php view

  1. showmessage((isset($resultarray['message']) ? $resultarray['message'] : 'admin_succeed'), $resultarray['redirect']);
คัดลอกไปที่คลิปบอร์ด
In its above plus

  1. require_once DISCUZ_ROOT.'./include/cache.func.php';
  2.                 updatecache('daystar');
คัดลอกไปที่คลิปบอร์ด
Step 5 : Edit documents index.php view

  1. require_once DISCUZ_ROOT.'./include/forum.func.php';
คัดลอกไปที่คลิปบอร์ด
Below added:

  1. require_once DISCUZ_ROOT.'./forumdata/cache/cache_poststar.php';
  2. $month=date(n);
  3. $year=date(Y);
คัดลอกไปที่คลิปบอร์ด
view

  1. unset($_DCACHE['announcements']);
คัดลอกไปที่คลิปบอร์ด
Below added:

  1. //========== ????BY 33201 ??
  2. $nopoststar ='<td width=17%>???<font color=red><b> ????!</b></font>
  3. UID  ?<b>?</b>
  4. ????
  5. ????
  6. ??????
  7. ??????
  8. ??????
  9. </td><td width=16% align=center class=altbg1><img src=images/nopic.gif width=80 height=80 align=center></td>';
  10.     if($_DCACHE['daystar']) {
  11.                 foreach($_DCACHE['daystar'] as $key => $dstar) {
  12.             if ($key<3){
  13.                 $daystars .="<td width=17%>???<b>".$dstar[author]."</b>
  14. UID  ?<b>".$dstar[authorid]."</b>
  15. ???".$dstar[credits]."
  16. ???".$dstar[digestposts]." ?
  17. <font color=red><b>??</b></font>???<font color=red><b>".$dstar[num]."</b></font> ?
  18. ?????".$dstar[posts]." ?
  19. ?????".$dstar[oltime]." ??
  20. </td><td width=16% align=center class=altbg1><img src=".$dstar[avatar]." width=".$dstar[avatarwidth]." height=".$dstar[avatarheight]." align=center></td>";$n=$key;
  21. }
  22.                 }
  23. if($n==0){$nostar .=$nopoststar.$nopoststar;}elseif($n==1){$nostar .=$nopoststar;}
  24.         }
  25.     if($_DCACHE['weekstar']) {
  26.                 foreach($_DCACHE['weekstar'] as $key => $wstar) {
  27.             if ($key<3){
  28.                 $weekstars .="<td width=17%>???<b>".$wstar[author]."</b>
  29. UID  ?<b>".$wstar[authorid]."</b>
  30. ???".$wstar[credits]."
  31. ???".$wstar[digestposts]." ?
  32. <font color=red><b>??</b></font>???<font color=red><b>".$wstar[num]."</b></font> ?
  33. ?????".$wstar[posts]." ?
  34. ?????".$wstar[oltime]." ??
  35. </td><td width=16% align=center class=altbg1><img src=".$wstar[avatar]." width=".$wstar[avatarwidth]." height=".$wstar[avatarheight]." align=center></td>";$weeknum=$key;
  36.             }
  37.                 }
  38. if($weeknum==0){$noweekstar .=$nopoststar.$nopoststar;}elseif($weeknum==1){$noweekstar .=$nopoststar;}
  39.         }
  40.     if($_DCACHE['monthstar']) {
  41.                 foreach($_DCACHE['monthstar'] as $key => $mstar) {
  42.             if ($key<3){
  43.                 $monthstars .="<td width=17%>???<b>".$mstar[author]."</b>
  44. UID  ?<b>".$mstar[authorid]."</b>
  45. ???".$mstar[credits]."
  46. ???".$mstar[digestposts]." ?
  47. <font color=red><b>".$month."?</b></font>???<font color=red><b>".$mstar[num]."</b></font> ?
  48. ?????".$mstar[posts]." ?
  49. ?????".$mstar[oltime]." ??
  50. </td><td width=16% align=center class=altbg1><img src=".$mstar[avatar]." width=".$mstar[avatarwidth]." height=".$mstar[avatarheight]." align=center></td>";
  51.             }
  52.                 }
  53.         }
  54.     if($_DCACHE['yearstar']) {
  55.                 foreach($_DCACHE['yearstar'] as $key => $ystar) {
  56.             if ($key<3){
  57.                 $yearstars .="<td width=17%>???<b>".$ystar[author]."</b>
  58. UID  ?<b>".$ystar[authorid]."</b>
  59. ???".$ystar[credits]."
  60. ???".$ystar[digestposts]." ?
  61. <font color=red><b>".$year."?</b></font>???<font color=red><b>".$ystar[num]."</b></font> ?
  62. ?????".$ystar[posts]." ?
  63. ?????".$ystar[oltime]." ??
  64. </td><td width=16% align=center class=altbg1><img src=".$ystar[avatar]." width=".$ystar[avatarwidth]." height=".$ystar[avatarheight]." align=center></td>";
  65.             }
  66.                 }
  67.         }
  68. //==========????BY 33201 ??   
คัดลอกไปที่คลิปบอร์ด
Step 6 : Edit templates discuz.htm view
  1. <!--{if $_DCACHE['forumlinks']}-->
คัดลอกไปที่คลิปบอร์ด
In the above plus:
  1. {template show_poststar}
คัดลอกไปที่คลิปบอร์ด
ไฟล์ templatse ที่อัพโหลดอย่าลืม CHMOD 777 ตามด้วยอัพเดทแคชนะครับ

[ แก้ไขล่าสุด buachompoox เมื่อ 2007-12-31 01:43 ]

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

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

x
ssveess โพสต์ 2007-12-31 09:21:43
เข้าท่าดีนะครับ  แสดงตรง index ดูเท่นะนี่  
ปล.ขอบคุณครับเดี๋ยวลองใช้ก่อง  จะทำได้ไม๊น้า
Fanmanutd โพสต์ 2007-12-31 14:39:05
ผมลงแล้วมันขึ้นเปนภาษา ??? อ่ะคับ คือจิงๆ มานเปนภาษาจีนใช่ป่ะคับ แล้วผมจะแก้เป็นภาษาไทยว่าอะไรดีอ่ะคับ ผมอ่านภาษาจีนมะออกหงะ
enjoy_cs โพสต์ 2008-1-4 00:56:32
ขอบคุณมาก ๆ เลยครับผม
BabyURO โพสต์ 2008-1-6 23:32:16
ขอบคุณครับ
dreamwork2008 โพสต์ 2008-1-20 14:59:32
ขอบคุณมากครับ
ขออภัย! คุณไม่ได้รับสิทธิ์ในการดำเนินการในส่วนนี้ กรุณาเลือกอย่างใดอย่างหนึ่ง ลงชื่อเข้าใช้ | สมัครสมาชิก

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

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

GMT+7, 2024-5-18 10:32

Powered by Discuz! X3.4, Rev.66

Copyright © 2001-2021 Tencent Cloud. Licensed

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