[TOPSTAR]กล่องแสดงอันดับการโพสของสมาชิก
เหมือนเดิมครับสำรองข้อมูลไฟล์ที่เกี่ยวข้องก่อนDemo : http://www.bleach-xp.com/index.php
ผมออกตัวไว้ก่อนนะครับว่าไฟล์ที่ให้โหลดยังไม่ได้ทำการแปลเลยแต่ทดสอบแล้วใช้งานได้
Download : http://www.discuz.net/attachment.php?aid=180936
อัพโหลดไฟล์จากที่โหลดมา
Step : 1
Open include/cache.func.phpview'medals' => array('medals'),In its above plus'poststar' => array('daystar', 'yestodaystar','weekstar', 'monthstar', 'yearstar'),viewcase 'medals':
$table = 'medals';
$cols = 'medalid, name, image';
$conditions = "WHERE available='1'";
break;In its above plus
//===============????BY 33201 ??
case 'daystar':
$month=date(n);
$date=date(j);
$year=date(Y);
$time=mktime(0,0,0,$month,$date,$year);
$table = 'posts p';
$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';
$conditions = "left join {$tablepre}members m on p.authorid=m.uidleft join {$tablepre}memberfields me on p.authorid=me.uid where p.dateline>$timegroup by p.authorid order by num desc limit 0,10";
break;
case 'yestodaystar':
$month=date(n);
$date=date(j);
$year=date(Y);
$time=mktime(0,0,0,$month,$date,$year);
$ytime=mktime(0,0,0,$month,$date-1,$year);
$table = 'posts p';
$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';
$conditions = "left join {$tablepre}members m on p.authorid=m.uidleft join cdb_memberfields me on p.authorid=me.uid where p.dateline<=$time and p.dateline>$ytimegroup by p.authorid order by num desc limit 0,10";
break;
case 'weekstar':
$month=date(n);
$date=date(j);
$year=date(Y);
$week=date(w);
$time=mktime(0,0,0,$month,$date,$year);
$weektime=mktime(0,0,0,$month,$date-$week,$year);
$table = 'posts p';
$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';
$conditions = "left join {$tablepre}members m on p.authorid=m.uidleft join {$tablepre}memberfields me on p.authorid=me.uid where p.dateline>=$weektimegroup by p.authorid order by num desc limit 0,10";
break;
case 'monthstar':
$month=date(n);
$year=date(Y);
$monthtime=mktime(0,0,0,$month,1,$year);
$table = 'posts p';
$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';
$conditions = "left join {$tablepre}members m on p.authorid=m.uidleft join {$tablepre}memberfields me on p.authorid=me.uid where p.dateline>=$monthtimegroup by p.authorid order by num desc limit 0,10";
break;
case 'yearstar':
$year=date(Y);
$yeartime=mktime(0,0,0,1,1,$year);
$table = 'posts p';
$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';
$conditions = "left join {$tablepre}members m on p.authorid=m.uidleft join {$tablepre}memberfields me on p.authorid=me.uid where p.dateline>=$yeartimegroup by p.authorid order by num desc limit 0,10";
break;
//===================????BY 33201 ??view
case 'settings':
while($setting = $db->fetch_array($query)) {
if($setting['variable'] == 'extcredits') { In its above plus
//===================????BY 33201 ??
case 'daystar':
while($toppost = $db->fetch_array($query)) {
$toppost['author'] = $toppost['author'] ? $toppost['author'] : '??';
$toppost['authorid'] = $toppost['authorid'] ? $toppost['authorid'] : '??';
$toppost['avatar'] = $toppost['avatar'] ? $toppost['avatar'] : 'images/nopic.gif';
$toppost['avatarwidth'] = $toppost['avatarwidth'] ? $toppost['avatarwidth'] : '80';
$toppost['avatarheight'] = $toppost['avatarheight'] ? $toppost['avatarheight'] : '80';
$data[] = $toppost;
}
break;
case 'yestodaystar':
while($toppost = $db->fetch_array($query)) {
$toppost['author'] = $toppost['author'] ? $toppost['author'] : '??';
$toppost['authorid'] = $toppost['authorid'] ? $toppost['authorid'] : '??';
$toppost['avatar'] = $toppost['avatar'] ? $toppost['avatar'] : 'images/nopic.gif';
$toppost['avatarwidth'] = $toppost['avatarwidth'] ? $toppost['avatarwidth'] : '80';
$toppost['avatarheight'] = $toppost['avatarheight'] ? $toppost['avatarheight'] : '80';
$data[] = $toppost;
}
break;
case 'weekstar':
while($toppost = $db->fetch_array($query)) {
$toppost['author'] = $toppost['author'] ? $toppost['author'] : '??';
$toppost['authorid'] = $toppost['authorid'] ? $toppost['authorid'] : '??';
$toppost['avatar'] = $toppost['avatar'] ? $toppost['avatar'] : 'images/nopic.gif';
$toppost['avatarwidth'] = $toppost['avatarwidth'] ? $toppost['avatarwidth'] : '80';
$toppost['avatarheight'] = $toppost['avatarheight'] ? $toppost['avatarheight'] : '80';
$data[] = $toppost;
}
break;
case 'monthstar':
while($toppost = $db->fetch_array($query)) {
$toppost['author'] = $toppost['author'] ? $toppost['author'] : '??';
$toppost['authorid'] = $toppost['authorid'] ? $toppost['authorid'] : '??';
$toppost['avatar'] = $toppost['avatar'] ? $toppost['avatar'] : 'images/nopic.gif';
$toppost['avatarwidth'] = $toppost['avatarwidth'] ? $toppost['avatarwidth'] : '80';
$toppost['avatarheight'] = $toppost['avatarheight'] ? $toppost['avatarheight'] : '80';
$data[] = $toppost;
}
break;
case 'yearstar':
while($toppost = $db->fetch_array($query)) {
$toppost['author'] = $toppost['author'] ? $toppost['author'] : '??';
$toppost['authorid'] = $toppost['authorid'] ? $toppost['authorid'] : '??';
$toppost['avatar'] = $toppost['avatar'] ? $toppost['avatar'] : 'images/nopic.gif';
$toppost['avatarwidth'] = $toppost['avatarwidth'] ? $toppost['avatarwidth'] : '80';
$toppost['avatarheight'] = $toppost['avatarheight'] ? $toppost['avatarheight'] : '80';
$data[] = $toppost;
}
break;
//=====================????BY 33201 ??Step 2 : Edit documents include / newthread.inc.phpview
updatepostcredits('+', $discuz_uid, $postcredits);Below increase in its
require_once DISCUZ_ROOT.'./include/cache.func.php';
updatecache('daystar');Step 3 : Edit documents include / newreply.inc.phpview
updatepostcredits('+', $discuz_uid, $replycredits);Below increase in its
require_once DISCUZ_ROOT.'./include/cache.func.php';
updatecache('daystar');Step 4 : Edit documents topicadmin.php view
showmessage((isset($resultarray['message']) ? $resultarray['message'] : 'admin_succeed'), $resultarray['redirect']);In its above plus
require_once DISCUZ_ROOT.'./include/cache.func.php';
updatecache('daystar');Step 5 : Edit documents index.php view
require_once DISCUZ_ROOT.'./include/forum.func.php';Below added:
require_once DISCUZ_ROOT.'./forumdata/cache/cache_poststar.php';
$month=date(n);
$year=date(Y);view
unset($_DCACHE['announcements']);Below added:
//========== ????BY 33201 ??
$nopoststar ='<td width=17%>???<font color=red><b> ????!</b></font>
UID?<b>?</b>
????
????
??????
??????
??????
</td><td width=16% align=center class=altbg1><img src=images/nopic.gif width=80 height=80 align=center></td>';
if($_DCACHE['daystar']) {
foreach($_DCACHE['daystar'] as $key => $dstar) {
if ($key<3){
$daystars .="<td width=17%>???<b>".$dstar."</b>
UID?<b>".$dstar."</b>
???".$dstar."
???".$dstar." ?
<font color=red><b>??</b></font>???<font color=red><b>".$dstar."</b></font> ?
?????".$dstar." ?
?????".$dstar." ??
</td><td width=16% align=center class=altbg1><img src=".$dstar." width=".$dstar." height=".$dstar." align=center></td>";$n=$key;
}
}
if($n==0){$nostar .=$nopoststar.$nopoststar;}elseif($n==1){$nostar .=$nopoststar;}
}
if($_DCACHE['weekstar']) {
foreach($_DCACHE['weekstar'] as $key => $wstar) {
if ($key<3){
$weekstars .="<td width=17%>???<b>".$wstar."</b>
UID?<b>".$wstar."</b>
???".$wstar."
???".$wstar." ?
<font color=red><b>??</b></font>???<font color=red><b>".$wstar."</b></font> ?
?????".$wstar." ?
?????".$wstar." ??
</td><td width=16% align=center class=altbg1><img src=".$wstar." width=".$wstar." height=".$wstar." align=center></td>";$weeknum=$key;
}
}
if($weeknum==0){$noweekstar .=$nopoststar.$nopoststar;}elseif($weeknum==1){$noweekstar .=$nopoststar;}
}
if($_DCACHE['monthstar']) {
foreach($_DCACHE['monthstar'] as $key => $mstar) {
if ($key<3){
$monthstars .="<td width=17%>???<b>".$mstar."</b>
UID?<b>".$mstar."</b>
???".$mstar."
???".$mstar." ?
<font color=red><b>".$month."?</b></font>???<font color=red><b>".$mstar."</b></font> ?
?????".$mstar." ?
?????".$mstar." ??
</td><td width=16% align=center class=altbg1><img src=".$mstar." width=".$mstar." height=".$mstar." align=center></td>";
}
}
}
if($_DCACHE['yearstar']) {
foreach($_DCACHE['yearstar'] as $key => $ystar) {
if ($key<3){
$yearstars .="<td width=17%>???<b>".$ystar."</b>
UID?<b>".$ystar."</b>
???".$ystar."
???".$ystar." ?
<font color=red><b>".$year."?</b></font>???<font color=red><b>".$ystar."</b></font> ?
?????".$ystar." ?
?????".$ystar." ??
</td><td width=16% align=center class=altbg1><img src=".$ystar." width=".$ystar." height=".$ystar." align=center></td>";
}
}
}
//==========????BY 33201 ?? Step 6 : Edit templates discuz.htm view<!--{if $_DCACHE['forumlinks']}--> In the above plus:{template show_poststar}ไฟล์ templatse ที่อัพโหลดอย่าลืม CHMOD 777 ตามด้วยอัพเดทแคชนะครับ
[ แก้ไขล่าสุด buachompoox เมื่อ 2007-12-31 01:43 ] เข้าท่าดีนะครับแสดงตรง index ดูเท่นะนี่
ปล.ขอบคุณครับเดี๋ยวลองใช้ก่องจะทำได้ไม๊น้า :loveliness: ผมลงแล้วมันขึ้นเปนภาษา ??? อ่ะคับ คือจิงๆ มานเปนภาษาจีนใช่ป่ะคับ แล้วผมจะแก้เป็นภาษาไทยว่าอะไรดีอ่ะคับ ผมอ่านภาษาจีนมะออกหงะ ขอบคุณมาก ๆ เลยครับผม ขอบคุณครับ ขอบคุณมากครับ
หน้า:
[1]