AL8 Forum
   登錄註冊幫助


標題: [D7.0] 首頁四格+TOP10 for Dz7
 henryplus
 0097277
Rank: 4Rank: 4Rank: 4Rank: 4

頭銜: Lord

帖子: 576

精華: 0

積分: 6200 點

現金: 510 元

存款: 0 元

閱讀權限: 25

註冊: 2008-3-2

狀態: 離線
 
發表於 2008-12-20 14:24  資料  個人空間  短消息  加為好友 
首頁四格+TOP10 for Dz7

原帖:http://www.discuz.net/thread-1121881-1-1.html

插件名稱         首頁四格+今日Top10
適用版本         Discuz!7.0
語言編碼         big 5
插件作者         體無完膚
插件繁化         henryplus
版權所屬         http://www.dishack.com/
支持網站         http://www.dishack.com/
插件簡介         首頁四格+今日Top10

演示:www.efangbbs.com

安裝步驟:

懶人覆蓋安裝:下載附件,將包內文件按照對應目錄上傳覆蓋即可!

手動修改安裝:修改文件index.php和discuz.htm

打開index.php文件,查找:

$newthreads = round(($timestamp - $lastvisit + 600) / 1000) * 1000;


下面加:
//----首頁五格代碼開始
$colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
//新貼
$hack_cut_str = 28; //標題字數
$hack_cut_strauthor = 9;
$new_post_threadlist = array();
$nthread = array();
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.dateline DESC LIMIT 0, 10");
while($nthread = $db->fetch_array($query)) {
$nthread['forumname'] = ereg_replace('<[^>]*>','',$nthread['name']);
$nthread['view_subject'] = cutstr($nthread['subject'],$hack_cut_str);
$nthread['view_author'] = cutstr($nthread['author'],$hack_cut_strauthor);
$nthread['date']= gmdate("$dateformat $timeformat", $nthread['dateline'] + $timeoffset * 3600);
$nthread['lastreplytime']= gmdate("$dateformat $timeformat", $nthread[lastpost] + ($timeoffset * 3600));
if($nthread['highlight']) {
$string = sprintf('%02d', $nthread['highlight']);
$stylestr = sprintf('%03b', $string[0]);
$nthread['highlight'] = 'style="';
$nthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
$nthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
$nthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
$nthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
$nthread['highlight'] .= '"';
} else {
$nthread['highlight'] = '';
}
$new_post_threadlist[] = $nthread;
}

//新回復
$hack_cut_str = 28; //標題字數
$hack_cut_strauthor = 9;
$new_reply_threadlist = array();
$rthread = array();
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.lastpost DESC LIMIT 0, 10");
while($rthread = $db->fetch_array($query)) {
$rthread['forumname'] = ereg_replace('<[^>]*>','',$rthread['name']);
$rthread['view_subject'] = cutstr($rthread['subject'],$hack_cut_str);
$rthread['view_lastposter'] = cutstr($rthread['lastposter'],$hack_cut_strauthor);
$rthread['date']= gmdate("$dateformat $timeformat", $rthread['dateline'] + $timeoffset * 3600);
$rthread['lastreplytime']= gmdate("$dateformat $timeformat", $rthread[lastpost] + ($timeoffset * 3600));
if($rthread['highlight']) {
$string = sprintf('%02d', $rthread['highlight']);
$stylestr = sprintf('%03b', $string[0]);
$rthread['highlight'] = 'style="';
$rthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
$rthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
$rthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
$rthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
$rthread['highlight'] .= '"';
} else {
$rthread['highlight'] = '';
}
$new_reply_threadlist[] = $rthread;
}

//熱帖
$hack_cut_str = 30; //標題字數
$hack_cut_strauthor = 9;
$new_hot_threadlist = array();
$mthread = array();
$ctime=$timestamp-3600*24*7;//最後7是天數為本周
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 AND t.dateline>$ctime AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.replies DESC LIMIT 0, 10");
while($mthread = $db->fetch_array($query)) {
$mthread['forumname'] = ereg_replace('<[^>]*>','',$mthread['name']);
$mthread['view_subject'] = cutstr($mthread['subject'],$hack_cut_str);
$mthread['view_lastposter'] = cutstr($mthread['lastposter'],$hack_cut_strauthor);
$mthread['date']= gmdate("$dateformat $timeformat", $mthread['dateline'] + $timeoffset * 3600);
$mthread['lastreplytime']= gmdate("$dateformat $timeformat", $mthread[lastpost] + ($timeoffset * 3600));
if($mthread['highlight']) {
$string = sprintf('%02d', $mthread['highlight']);
$stylestr = sprintf('%03b', $string[0]);
$mthread['highlight'] = 'style="';
$mthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
$mthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
$mthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
$mthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
$mthread['highlight'] .= '"';
} else {
$mthread['highlight'] = '';
}
$new_hot_threadlist[] = $mthread;
}

//今日發貼排行
$tomonth=date(n);
$todate=date(j);
$toyear=date(Y);
$time=mktime(0,0,0,$tomonth,$todate,$toyear);
$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");
while($result=$db->fetch_array($query)){
$poststar.="<a href=space.php?uid=".$result[authorid].">".cutstr($result[author],8)."</a><font color=red>[".$result[num]."]</font>";
}
//----首頁五格代碼結束


打開discuz.htm,查找:

function announcementScrollnext(time) {
$('annbody').scrollTop++;
anncount++;
if(anncount != time) {
  annst = setTimeout('announcementScrollnext(' + time + ')', 10);
} else {
  annrowcount++;
  annst = setTimeout('announcementScroll()', anndelay);
}
}
</script>
<!--{/if}-->
</div>


下面加:


<!-- 首頁五格代碼開始 -->
<div class="mainbox forumlist" style="padding:0;">
<table cellspacing="0" cellpadding="0">
<thead class="category">
<tr>
<td align="center" style="padding:0 1px 0 0"><h3>≡ 論壇圖片 ≡</h3></td>
<td align="center" style="padding:0"><h3>≡ 最新帖子 ≡</h3></td>
<td align="center" style="padding:0 1px 0 1px"><h3>≡ 最新回復 ≡</h3></td>
<td align="center" style="padding:0"><h3>≡ 本周熱門 ≡</h3></td>
<td></td>
</tr>
</thead>
<tr>
<td width="24%">
  <script type="text/javascript" src="pic.php"></script>
</td>
<td width="25%">
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
  <td width="24" style="padding:0;border-top:0px;"><img src="images/list.gif" border="0" /></td>
  <td background="images/listbg.gif" style="line-height:20px;padding:0;border-top:0px;background-repeat: repeat-y" width="100%">
  <!--{loop $new_post_threadlist $nthread}-->
   <!--{if $nthread[replies]}-->
  <div style="overflow: hidden;height: 20px;width: 100%;"><a href="viewthread.php?tid=$nthread[tid]" $nthread['highlight'] title='最新帖子 {LF}所在論壇: $nthread[forumname]{LF}主題標題: $nthread[subject] {LF}主題作者: $nthread[author]{LF}發表時間: $nthread[date]{LF}瀏覽次數: $nthread[views] 次 {LF}回復次數: $nthread[replies] 次{LF}最後回復: $nthread[lastreplytime]{LF}{lang lastpost}: $nthread[lastposter]'>$nthread[view_subject]</a></div>
       <!--{else}-->
  <div style="overflow: hidden;height: 20px;width: 100%;"><a href="viewthread.php?tid=$nthread[tid]" $nthread['highlight'] title='最新帖子 {LF}所在論壇: $nthread[forumname]{LF}主題標題: $nthread[subject] {LF}主題作者: $nthread[author]{LF}發表時間: $nthread[date]{LF}瀏覽次數: $nthread[views] 次 {LF}回復次數: $nthread[replies] 次{LF}最後回復: 暫時沒有回復'>$nthread[view_subject]</a></div>
   <!--{/if}-->
  <!--{/loop}-->
  </td>
</tr>
  </table>
</td>
<td width="25%">
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
  <td width="24" style="padding:0;border-top:0px;"><img src="images/list.gif" border="0" /></td>
  <td background="images/listbg.gif" style="line-height:20px;padding:0;border-top:0px;background-repeat: repeat-y" width="100%">
  <!--{loop $new_reply_threadlist $rthread}-->
   <div style="overflow: hidden;height: 20px;width: 100%;"><a href="viewthread.php?tid=$rthread[tid]" $rthread['highlight'] title='最新回復 {LF}所在論壇: $rthread[forumname]{LF}主題標題: $rthread[subject]{LF}主題作者: $rthread[author]{LF}發表時間: $rthread[date]{LF}瀏覽次數: $rthread[views] 次{LF}回復次數: $rthread[replies] 次{LF}最後回復: $rthread[lastreplytime]{LF}{lang lastpost}: $rthread[lastposter]'>$rthread[view_subject]</a></div>
  <!--{/loop}-->
  </td>
</tr>
  </table>
</td>
<td width="26%">
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
  <td width="24" style="padding:0;border-top:0px;"><img src="images/list.gif" border="0" /></td>
  <td background="images/listbg.gif" style="line-height:20px;padding:0;border-top:0px;background-repeat: repeat-y" width="100%">
  <!--{loop $new_hot_threadlist $mthread}-->
   <div style="overflow: hidden;height: 20px;width: 100%;"><a href="viewthread.php?tid=$mthread[tid]" $mthread['highlight'] title='本周熱門 {LF}所在論壇: $mthread[forumname]{LF}主題標題: $mthread[subject]{LF}主題作者: $mthread[author]{LF}發表時間: $mthread[date]{LF}瀏覽次數: $mthread[views] 次{LF}回復次數: $mthread[replies] 次{LF}最後回復: $mthread[lastreplytime]{LF}{lang lastpost}: $mthread[lastposter]'>$mthread[view_subject]</a></div>
  <!--{/loop}-->
  </td>
</tr>
  </table>
</td>
<td>
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
  <td></td>
  <td>
   
  </td>
</tr>
  </table>
</td>
</tr>
</table>

<table cellspacing="2" cellpadding="2">
<tr>
<td><font color=red><b>Top10: </b></font>$poststar</td>
</tr>
</table>
</div>
<!-- 首頁五格代碼結束 -->


上傳懶人安裝包(除了已修改的file外..其他全部upload)

更新緩存,OK!

演示圖:


QUOTE:
懶人安裝包:
 圖片附件: 遊客無法下載或閱讀圖片附件
除了./templates/default/ 其他模版需自行修改


[ 本帖最後由 henryplus 於 2008-12-20 20:05 編輯 ]



 附件: 您所在的用戶組無法下載或查看附件



 AL8 Forum © All rights reserved.
頂部
 dreamhk
 0109768
Rank: 5Rank: 5Rank: 5Rank: 5Rank: 5
點擊查看 dreamhk 的詳細資料

頭銜: King

帖子: 706

精華: 0

積分: 5805 點

現金: 1173 元

存款: 65 元

閱讀權限: 30

註冊: 2008-10-20

狀態: 在線
 
發表於 2008-12-20 15:23  資料  個人空間  主頁 短消息  加為好友  添加 dreamhk 為MSN好友 通過MSN和 dreamhk 交談
沙發,支持~!




 AL8 Forum © All rights reserved.
頂部
 henryplus
 0097277
Rank: 4Rank: 4Rank: 4Rank: 4

頭銜: Lord

帖子: 576

精華: 0

積分: 6200 點

現金: 510 元

存款: 0 元

閱讀權限: 25

註冊: 2008-3-2

狀態: 離線
 
發表於 2008-12-20 16:37  資料  個人空間  短消息  加為好友 
多謝支持....有未繁化地方歡迎回報




 AL8 Forum © All rights reserved.
頂部
 f00139
 0037815
Rank: 4Rank: 4Rank: 4Rank: 4

頭銜: Lord

帖子: 563

精華: 0

積分: 7786 點

現金: 179 元

存款: 0 元

閱讀權限: 25

註冊: 2005-12-31

狀態: 離線
 
發表於 2008-12-20 21:50  資料  個人空間  短消息  加為好友 
有沒有大大能把此插件繁化

http://www.dishack.com/thread-462-1-1.html


超靚~~~





 AL8 Forum © All rights reserved.
頂部
 無政府☆浪ㄦ
 0094117
Rank: 2Rank: 2

頭銜: Member

帖子: 85

精華: 0

積分: 790 點

現金: 378 元

存款: 0 元

閱讀權限: 15

註冊: 2008-1-6

狀態: 離線
 
發表於 2008-12-20 22:03  資料  個人空間  短消息  加為好友 
純支持!




 AL8 Forum © All rights reserved.
頂部
 henryplus
 0097277
Rank: 4Rank: 4Rank: 4Rank: 4

頭銜: Lord

帖子: 576

精華: 0

積分: 6200 點

現金: 510 元

存款: 0 元

閱讀權限: 25

註冊: 2008-3-2

狀態: 離線
 
發表於 2008-12-22 09:47  資料  個人空間  短消息  加為好友 
回覆 #4 f00139 的帖子

繁化完..ps..但建議最好唔好用...
用呢個/論壇側欄可能更好




 AL8 Forum © All rights reserved.
頂部
 tonycow
 0041173
Rank: 2Rank: 2

頭銜: Member

帖子: 53

精華: 0

積分: 900 點

現金: 100 元

存款: 0 元

閱讀權限: 15

註冊: 2006-3-6

狀態: 離線
 
發表於 2008-12-22 21:20  資料  個人空間  短消息  加為好友 
如何改成 Top 20 ?

有很多會員希望將最新回帖等增加為 20 個?請問改哪裡呢?

謝謝!!




 AL8 Forum © All rights reserved.
頂部
 f00139
 0037815
Rank: 4Rank: 4Rank: 4Rank: 4

頭銜: Lord

帖子: 563

精華: 0

積分: 7786 點

現金: 179 元

存款: 0 元

閱讀權限: 25

註冊: 2005-12-31

狀態: 離線
 
發表於 2008-12-24 18:20  資料  個人空間  短消息  加為好友 
回覆 #6 henryplus 的帖子

呢個四格既隨機顯示圖片係來自於附件,,,

如何改為外連圖片???





 AL8 Forum © All rights reserved.
頂部
 kuadan
 0109885
Rank: 1

頭銜: Newbie

帖子: 10

精華: 0

積分: 100 點

現金: 100 元

存款: 0 元

閱讀權限: 10

註冊: 2008-10-23

狀態: 離線
 
發表於 2009-1-9 16:52  資料  個人空間  短消息  加為好友 
小弟更新此版後也沒錯誤 但就是圖片不會出現@@ 請問是啥原因呀
http://wishes.idv.tw 有哪位高手能告知 謝謝




 AL8 Forum © All rights reserved.
頂部
 KMz
 0066428
Rank: 1

頭銜: Newbie

帖子: 19

精華: 0

積分: 250 點

現金: 100 元

存款: 0 元

閱讀權限: 10

註冊: 2007-2-5

狀態: 離線
 
發表於 2009-1-13 16:58  資料  個人空間  短消息  加為好友 
QUOTE:
原帖由 henryplus 於 2008-12-20 16:37 發表
多謝支持....有未繁化地方歡迎回報

有未繁化地方

http://blackcat.oxyhost.com/index.php?styleid=14




 AL8 Forum © All rights reserved.
頂部
 taz999
 0113561
Rank: 1

頭銜: Newbie

帖子: 5

精華: 0

積分: 50 點

現金: 100 元

存款: 0 元

閱讀權限: 10

註冊: 2009-1-13

狀態: 離線
 
發表於 2009-1-15 22:34  資料  個人空間  短消息  加為好友 
回覆 #9 kuadan 的帖子

你好, 我也有你遇到圖片顯示的問題, 但我見你的論壇己解決了, 請問要修改那裡呢?




 AL8 Forum © All rights reserved.
頂部
 chantak
 0096230
Rank: 2Rank: 2

頭銜: Member

帖子: 65

精華: 0

積分: 990 點

現金: 100 元

存款: 0 元

閱讀權限: 15

註冊: 2008-2-13

狀態: 離線
 
發表於 2009-1-19 19:35  資料  個人空間  短消息  加為好友 
可唔可選擇邊d版面 顯示
邊d版面唔顯示?

[ 本帖最後由 chantak 於 2009-1-22 02:46 編輯 ]




 AL8 Forum © All rights reserved.
頂部
 chantak
 0096230
Rank: 2Rank: 2

頭銜: Member

帖子: 65

精華: 0

積分: 990 點

現金: 100 元

存款: 0 元

閱讀權限: 15

註冊: 2008-2-13

狀態: 離線
 
發表於 2009-1-22 16:44  資料  個人空間  短消息  加為好友 
推一推
請問而款4格
可唔可以選擇邊D版面不顯示
請各位高人指點
先謝~




 AL8 Forum © All rights reserved.
頂部
 kyho819
 0097409
Rank: 2Rank: 2

頭銜: Member

帖子: 70

精華: 0

積分: 600 點

現金: 100 元

存款: 0 元

閱讀權限: 15

註冊: 2008-3-4

來自: HK

狀態: 離線
 
發表於 2009-1-22 22:35  資料  個人空間  短消息  加為好友 
QUOTE:
原帖由 chantak 於 2009-1-22 16:44 發表
推一推
請問而款4格
可唔可以選擇邊D版面不顯示
請各位高人指點
先謝~

index.php 將 "0" 字 (紅色) 改為唔想顯示的版塊數字, 多過一個就用 "," (逗號) 分隔...... 某位大大教的
QUOTE:
//----首頁五格代碼開始
$colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
//新貼
$hack_cut_str = 28; //標題字數
$hack_cut_strauthor = 9;
$new_post_threadlist = array();
$nthread = array();
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.dateline DESC LIMIT 0, 10");
while($nthread = $db->fetch_array($query)) {
$nthread['forumname'] = ereg_replace('<[^>]*>','',$nthread['name']);
$nthread['view_subject'] = cutstr($nthread['subject'],$hack_cut_str);
$nthread['view_author'] = cutstr($nthread['author'],$hack_cut_strauthor);
$nthread['date']= gmdate("$dateformat $timeformat", $nthread['dateline'] + $timeoffset * 3600);
$nthread['lastreplytime']= gmdate("$dateformat $timeformat", $nthread[lastpost] + ($timeoffset * 3600));
if($nthread['highlight']) {
$string = sprintf('%02d', $nthread['highlight']);
$stylestr = sprintf('%03b', $string[0]);
$nthread['highlight'] = 'style="';
$nthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
$nthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
$nthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
$nthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
$nthread['highlight'] .= '"';
} else {
$nthread['highlight'] = '';
}
$new_post_threadlist[] = $nthread;
}

//新回復
$hack_cut_str = 28; //標題字數
$hack_cut_strauthor = 9;
$new_reply_threadlist = array();
$rthread = array();
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.lastpost DESC LIMIT 0, 10");
while($rthread = $db->fetch_array($query)) {
$rthread['forumname'] = ereg_replace('<[^>]*>','',$rthread['name']);
$rthread['view_subject'] = cutstr($rthread['subject'],$hack_cut_str);
$rthread['view_lastposter'] = cutstr($rthread['lastposter'],$hack_cut_strauthor);
$rthread['date']= gmdate("$dateformat $timeformat", $rthread['dateline'] + $timeoffset * 3600);
$rthread['lastreplytime']= gmdate("$dateformat $timeformat", $rthread[lastpost] + ($timeoffset * 3600));
if($rthread['highlight']) {
$string = sprintf('%02d', $rthread['highlight']);
$stylestr = sprintf('%03b', $string[0]);
$rthread['highlight'] = 'style="';
$rthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
$rthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
$rthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
$rthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
$rthread['highlight'] .= '"';
} else {
$rthread['highlight'] = '';
}
$new_reply_threadlist[] = $rthread;
}

//熱帖
$hack_cut_str = 30; //標題字數
$hack_cut_strauthor = 9;
$new_hot_threadlist = array();
$mthread = array();
$ctime=$timestamp-3600*24*7;//最後7是天數為本周
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 AND t.dateline>$ctime AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.replies DESC LIMIT 0, 10");
while($mthread = $db->fetch_array($query)) {
$mthread['forumname'] = ereg_replace('<[^>]*>','',$mthread['name']);
$mthread['view_subject'] = cutstr($mthread['subject'],$hack_cut_str);
$mthread['view_lastposter'] = cutstr($mthread['lastposter'],$hack_cut_strauthor);
$mthread['date']= gmdate("$dateformat $timeformat", $mthread['dateline'] + $timeoffset * 3600);
$mthread['lastreplytime']= gmdate("$dateformat $timeformat", $mthread[lastpost] + ($timeoffset * 3600));
if($mthread['highlight']) {
$string = sprintf('%02d', $mthread['highlight']);
$stylestr = sprintf('%03b', $string[0]);
$mthread['highlight'] = 'style="';
$mthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
$mthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
$mthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
$mthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
$mthread['highlight'] .= '"';
} else {
$mthread['highlight'] = '';
}
$new_hot_threadlist[] = $mthread;
}

//今日發貼排行
$tomonth=date(n);
$todate=date(j);
$toyear=date(Y);
$time=mktime(0,0,0,$tomonth,$todate,$toyear);
$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");
while($result=$db->fetch_array($query)){
$poststar.="<a href=space.php?uid=".$result[authorid].">".cutstr($result[author],8)."</a><font color=red>[".$result[num]."]</font>";
}
//----首頁五格代碼結束




 AL8 Forum © All rights reserved.
頂部
 +_.偉仔
 0035332
Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6

頭銜: Forum Legend

帖子: 2429

精華: 0

積分: 21210 點

現金: 372 元

存款: 682 元

閱讀權限: 70

註冊: 2005-11-20

狀態: 離線
 
發表於 2009-1-22 22:45  資料  個人空間  短消息  加為好友 
演示死圖了............




 AL8 Forum © All rights reserved.
頂部
 墮龍
 0025992
Rank: 4Rank: 4Rank: 4Rank: 4
點擊查看 墮龍 的詳細資料

頭銜: Lord

帖子: 435

精華: 0

積分: 4710 點

現金: 0 元

存款: 316 元

閱讀權限: 25

註冊: 2005-7-11

狀態: 離線
 
發表於 2009-1-23 00:23  資料  個人空間  主頁 短消息  加為好友 
冇演示睇...
等我試下先




 AL8 Forum © All rights reserved.
頂部
 bungee
 0068626
Rank: 1

頭銜: Newbie

帖子: 23

精華: 0

積分: 290 點

現金: 100 元

存款: 0 元

閱讀權限: 10

註冊: 2007-2-28

狀態: 離線
 
發表於 2009-1-23 14:38  資料  個人空間  短消息  加為好友 
QUOTE:
原帖由 tonycow 於 2008-12-22 21:20 發表
有很多會員希望將最新回帖等增加為 20 個?請問改哪裡呢?
謝謝!!


期望中




 AL8 Forum © All rights reserved.
頂部
 chantak
 0096230
Rank: 2Rank: 2

頭銜: Member

帖子: 65

精華: 0

積分: 990 點

現金: 100 元

存款: 0 元

閱讀權限: 15

註冊: 2008-2-13

狀態: 離線
 
發表於 2009-1-25 20:00  資料  個人空間  短消息  加為好友 
正如樓上所講
可唔可以改圖片為自訂位置
唔係隨機既附件圖片?
先謝~




 AL8 Forum © All rights reserved.
頂部
 nii
 0114042
Rank: 1

頭銜: Newbie

帖子: 21

精華: 0

積分: 250 點

現金: 100 元

存款: 0 元

閱讀權限: 10

註冊: 2009-1-25

狀態: 離線
 
發表於 2009-1-25 20:29  資料  個人空間  短消息  加為好友 
QUOTE:
原帖由 chantak 於 2009-1-25 20:00 發表
正如樓上所講
可唔可以改圖片為自訂位置
唔係隨機既附件圖片?
先謝~

小弟自行修改了...dl後請開啟pic.php...跟著指示修改項目...

另...此修改小弟未測試...請先備份原pic.php...後上傳...若失敗則上傳備份檔...資料流失後果自負

若成功的話...請回覆...待其他人拿來用...thx~



 附件: 您所在的用戶組無法下載或查看附件



 AL8 Forum © All rights reserved.
頂部
 nii
 0114042
Rank: 1

頭銜: Newbie

帖子: 21

精華: 0

積分: 250 點

現金: 100 元

存款: 0 元

閱讀權限: 10

註冊: 2009-1-25

狀態: 離線
 
發表於 2009-1-25 20:37  資料  個人空間  短消息  加為好友 
QUOTE:
原帖由 tonycow 於 2008-12-22 21:20 發表
有很多會員希望將最新回帖等增加為 20 個?請問改哪裡呢?
謝謝!!

當然是改index.php

附件含被修改的index (已改為新帖及回帖均為20...得回帖係20好樣=.=)

或自行修改:
找:
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.dateline DESC LIMIT 0, [color=Blue]10[/color]");

改為:
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.dateline DESC LIMIT 0, [color=Red]20[/color]");

找:
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid  AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.lastpost DESC LIMIT 0, [color=Blue]10[/color]");

改為:
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid  AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.lastpost DESC LIMIT 0, [color=Red]20[/color]");


同上...以上未經測試...資料流失等後果自負



 附件: 您所在的用戶組無法下載或查看附件



 AL8 Forum © All rights reserved.
頂部
聯繫我們 - AL8 Forum - 網頁空間由 I-SERVICES 提供 - Archiver - WAP
清除 Cookies, 當前時區 GMT+8, 現在時間是 2010-9-3 15:30
Processed in 0.038347 second(s), 9 queries , Gzip enabled
Powered by Discuz! 5.5.0  © 2001-2007 Comsenz Inc.