AGAMES 討論區

 找回密碼
 快速註冊
搜索
查看: 1501|回復: 0
打印 上一主題 下一主題

非常簡單的今日發帖排行前10位 [複製鏈接]

七級帝王會員

☆Prince★}+}|電腦王子

Rank: 7Rank: 7Rank: 7

帖子
3799
EXP
6040 點
金幣
4990 個
好友
0
註冊時間
2008-3-27

友誼之星勳章

跳轉到指定樓層
樓主
發表於 2008-12-1 19:09:01 |只看該作者 |倒序瀏覽
打開index.php

查找:
  1. $newthreads = round(($timestamp - $lastvisit + 600) / 1000) * 1000;
複製代碼

後面加:

  1. $tomonth=date(n);
  2. $todate=date(j);
  3. $toyear=date(Y);
  4. $time=mktime(0,0,0,$tomonth,$todate,$toyear);
  5. $query=$db->query("select count(pid) as num,authorid,author from $tablepre"."posts where dateline>=$time group by authorid order by num desc limit 0,10");
  6. while($result=$db->fetch_array($query)){
  7.         $poststar.="<a href=space.php?uid=".$result[authorid].">".cutstr($result[author],10)."</a> <font color=red>[".$result[num]."]</font>  ";
  8. }
複製代碼

discuz.htm

查找:
  1. <!--{if empty($gid) && $announcements}-->
複製代碼

上面添加:
  1. <div class="box"><h4>今日發貼排行榜:$poststar</h4></div>
複製代碼
Alta Multimedia - OnlineGames:http://www.alta.hk
您需要登錄後才可以回帖 登錄 | 快速註冊

Archiver|手機版|AGAMES 討論區

GMT+8, 2024-9-20 18:28 , Processed in 0.041312 second(s), 10 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回頂部