首頁四格,首頁五格For6.0(GBK)(UTF-8)[12種組合][9-18][版主安裝測試通過]
更新時(shí)間:2007年09月24日 11:40:50 作者:
下載萬次的首頁四格,首頁五格For6.0(GBK)(UTF-8)[12種組合][9-18][版主安裝測試通過]
引用:
本插件由版主sakurakawaii于07年9月8日15:30分
在Windows XP Discuz!6.0.0標(biāo)準(zhǔn)模版 IE6 Mysql4.1下測試安裝無錯(cuò)
本測試僅代表此插件安裝無錯(cuò),不包括今后長期使用中可能出現(xiàn)的問題引用:
聲明:本程序引用了部分5.0四格的代碼,若是源碼作者有意見請短信我,一定刪除發(fā)布!
經(jīng)過大量修改和flash設(shè)置增加了好多自定義設(shè)置,此插件可以說是壇內(nèi)功能最全,美觀最好的一個(gè)!慶祝本插件通過版主測試!
更新列表及插件優(yōu)點(diǎn):
9-18:應(yīng)朋友要求增加首頁六格(圖+新帖+回復(fù)+本周熱門+本月精華+今日排行)請到附件包最下面下載
9-15:更新了有少數(shù)朋友服務(wù)器不支持<?=$show?>導(dǎo)致圖片不顯示的問題。(直接下載包然后覆蓋pic.php就可以了)
9-13:應(yīng)壇友要求加入四格帶建站天數(shù)不帶圖片的調(diào)用組合?。ㄑ菔疽姼郊钕旅妫?
9-10:加入壇內(nèi)很少有的 UTF-8 版四格和五格,請大家下載使用!(見附件最下面)
9-9 8:00 更新:
引用:
修正了所有組合中的當(dāng)屏幕分辨率小或開啟分欄時(shí)帖子標(biāo)題換行的問題!
9-8 14:00
應(yīng)有朋友要求,新改四格風(fēng)格,目前共有七種調(diào)用方法(見附件)。
應(yīng)大家要求新加了下面兩種組合(已發(fā)布)
1,圖片,新帖,最新回復(fù),本周熱門,今日發(fā)帖排行(首頁五格)
2,新帖,最新回復(fù),本周熱門,精華帖
9-7:解決了敏感詞語過濾后仍在四格顯示的問題!
9-6:突破:一改以往flash樣式,改變文字在下的不美觀,并解決好多朋友提出的圖片卡,flash 調(diào)用問題!現(xiàn)在速度飛快,而且可以自行定制flash 中按鍵,文字,背景顏色以及背景透明度。真正人性化,滿足你配套論壇風(fēng)格色彩的要求!
9-6:特別更新:當(dāng)論壇開通了主題回收站時(shí),不再出現(xiàn)帖子放到主題回收站后仍在首頁四格顯示的情況!
關(guān)于各種可以自行設(shè)置的參數(shù)注釋 (鑒于有很多朋友不知道設(shè)置方法,現(xiàn)將可以設(shè)置的內(nèi)容全部寫在下面,以供大家使用)
1/3: pic.php 中
$shownums = 5;//演示個(gè)數(shù) 6以內(nèi)
$searchnums = 50;//搜索總數(shù).
$cachelife = 1800;//緩存時(shí)間.
$orderby = 'dateline';//搜索順序:按日期dateline.按瀏覽次數(shù)downloads.隨機(jī)rand.
$cachename = 'showpic';//緩存名.若與何插件沖突請修改,只要不沖突不會(huì)影響使用.
$searchfid = '';//搜索fid范圍.不限制留空.請用逗號相隔,如'1,2,3'.
var config='5|0xffffff|0x0099ff|50|0xffffff|0x0099ff|0x000000'
//-- config 參數(shù) -- 自動(dòng)播放時(shí)間(秒)|文字顏色|文字背景色|文字背景透明度|按鍵數(shù)字顏色|當(dāng)前按鍵顏色|普通按鍵色彩
var swf_width=255 設(shè)置flash 寬
var swf_height=175 設(shè)置flash 高2/3
index.php中
$hack_cut_str = 26; //標(biāo)題字?jǐn)?shù)
DESC LIMIT 0, 10" //設(shè)置顯示條數(shù)
如果不想調(diào)用某個(gè)版或某個(gè)區(qū)或者某些版的帖子可在index.php預(yù)留給大家的位置增加:(共三處)
and f.fid not in (0)
增加為:
and f.fid not in (1,2,3)其中123為 不想調(diào)用的 fid,
或者只想調(diào)用 1 2 3 改為:and f.fid in (1,2,3)3/3: discuz.htm 中引用:
如果想把最新回復(fù)中的鏈接打開時(shí)指向最后回復(fù)此帖的位置,只需將discuz.htm 中的:
<a href="viewthread.php?tid=$rthread[tid]"
改為:
<a href="redirect.php?tid=$rthread[tid]&goto=lastpost#lastpost"
需要像官方一樣每個(gè)區(qū)加入伸縮點(diǎn)擊功能的請?jiān)赿iscuz.htm 中改寫(五格的,如果是四格就根據(jù)<h3>≡ 本周熱門 ≡</h3>
<td align="center" style="padding:0 0 0 1px"><h3>今日發(fā)帖</h3></td>
</tr>
</thead>
<tr>
為:
<span class="headactions">
<img id="toplist_img" src="images/default/collapsed_no.gif" title="收起/展開" alt="收起/展開" onclick="toggle_collapse('toplist');" />
</span>
<h3>今日發(fā)帖</h3>
</td>
</tr>
</thead>
<tr id="toplist">
演示圖:(根據(jù)要求新寫的風(fēng)格,使得在官方的六種風(fēng)格中更加配套完善。。。)

使用本插件需要增加的文件有:
pic.php //調(diào)用論壇圖片數(shù)據(jù),
list.gif 和listbg.gif //標(biāo)題處的圖片
focus.swf //調(diào)用圖片的flash [此swf 與以往的大不相同,個(gè)人覺得更不錯(cuò)]
需修改的文件有:
index.php
discuz.htm
======================= 開始增加和修改 ============================
步驟:共分4步
將pic.php / list.gif / listbg.gif / focus.swf 按下載到的附件結(jié)構(gòu)傳到FTP(網(wǎng)站)
其中:pic.php 在論壇根目錄
list.gif / listbg.gif / focus.swf 在images文件夾下
打開 index.php
查找:
$rsshead = $rssstatus
在之上加:
//----首頁四格代碼開始
$colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
//新貼
$hack_cut_str = 26; //標(biāo)題字?jǐn)?shù)
$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;
}
//新回復(fù)
$hack_cut_str = 26; //標(biāo)題字?jǐn)?shù)
$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 = 26; //標(biāo)題字?jǐn)?shù)
$hack_cut_strauthor = 9;
$new_hot_threadlist = array();
$mthread = array();
$ctime=$timestamp-3600*24*7;//最后7是天數(shù)為本周
$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;
}
//----首頁四格代碼結(jié)束
打開 templates/default/discuz.htm
查找:
<div id="ad_text"></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>≡ 最新回復(fù) ≡</h3></td>
<td align="center" style="padding:0"><h3>≡ 本周熱門 ≡</h3></td>
</tr>
</thead>
<tr>
<td width="25%">
<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}主題標(biāo)題: $nthread[subject] {LF}主題作者: $nthread[author]{LF}發(fā)表時(shí)間: $nthread[date]{LF}瀏覽次數(shù): $nthread[views] 次 {LF}回復(fù)次數(shù): $nthread[replies] 次{LF}最后回復(fù): $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}主題標(biāo)題: $nthread[subject] {LF}主題作者: $nthread[author]{LF}發(fā)表時(shí)間: $nthread[date]{LF}瀏覽次數(shù): $nthread[views] 次 {LF}回復(fù)次數(shù): $nthread[replies] 次{LF}最后回復(fù): 暫時(shí)沒有回復(fù)'>$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='最新回復(fù) {LF}所在論壇: $rthread[forumname]{LF}主題標(biāo)題: $rthread[subject]{LF}主題作者: $rthread[author]{LF}發(fā)表時(shí)間: $rthread[date]{LF}瀏覽次數(shù): $rthread[views] 次{LF}回復(fù)次數(shù): $rthread[replies] 次{LF}最后回復(fù): $rthread[lastreplytime]{LF}{lang lastpost}: $rthread[lastposter]'>$rthread[view_subject]</a></div>
<!--{/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_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}主題標(biāo)題: $mthread[subject]{LF}主題作者: $mthread[author]{LF}發(fā)表時(shí)間: $mthread[date]{LF}瀏覽次數(shù): $mthread[views] 次{LF}回復(fù)次數(shù): $mthread[replies] 次{LF}最后回復(fù): $mthread[lastreplytime]{LF}{lang lastpost}: $mthread[lastposter]'>$mthread[view_subject]</a></div>
<!--{/loop}-->
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!-- 首頁四格代碼結(jié)束 -->
上傳剛才修改過的 index.php 及 discuz.htm
==========================================================================
如果你沒有修改過這兩個(gè)文件可以下載附件(請注意為:0904最新6.0.0正式版)直接覆蓋就可以了!
==========================================================================
附件中的每個(gè)包都是獨(dú)立的,請根據(jù)喜愛及版本區(qū)別下載直接上傳就可以使用了,不需要任何數(shù)據(jù)庫設(shè)置!
最后:請記得每次覆蓋或改寫文件后一定要更新緩存!
請大家支持一下我的另一個(gè)原創(chuàng)插件:論壇音樂區(qū)所有歌曲連播[圖]
請安裝好的朋友留下您的網(wǎng)站地址!可以話請?jiān)u分一下哦!謝謝!
希望大家喜歡!
暈,更新后,下載次數(shù)被我刪除了,原先已有5000次左右!
所有文件打包
引用:
本插件由版主sakurakawaii于07年9月8日15:30分
在Windows XP Discuz!6.0.0標(biāo)準(zhǔn)模版 IE6 Mysql4.1下測試安裝無錯(cuò)
本測試僅代表此插件安裝無錯(cuò),不包括今后長期使用中可能出現(xiàn)的問題引用:
聲明:本程序引用了部分5.0四格的代碼,若是源碼作者有意見請短信我,一定刪除發(fā)布!
經(jīng)過大量修改和flash設(shè)置增加了好多自定義設(shè)置,此插件可以說是壇內(nèi)功能最全,美觀最好的一個(gè)!慶祝本插件通過版主測試!
更新列表及插件優(yōu)點(diǎn):
9-18:應(yīng)朋友要求增加首頁六格(圖+新帖+回復(fù)+本周熱門+本月精華+今日排行)請到附件包最下面下載
9-15:更新了有少數(shù)朋友服務(wù)器不支持<?=$show?>導(dǎo)致圖片不顯示的問題。(直接下載包然后覆蓋pic.php就可以了)
9-13:應(yīng)壇友要求加入四格帶建站天數(shù)不帶圖片的調(diào)用組合?。ㄑ菔疽姼郊钕旅妫?
9-10:加入壇內(nèi)很少有的 UTF-8 版四格和五格,請大家下載使用!(見附件最下面)
9-9 8:00 更新:
引用:
修正了所有組合中的當(dāng)屏幕分辨率小或開啟分欄時(shí)帖子標(biāo)題換行的問題!
9-8 14:00
應(yīng)有朋友要求,新改四格風(fēng)格,目前共有七種調(diào)用方法(見附件)。
應(yīng)大家要求新加了下面兩種組合(已發(fā)布)
1,圖片,新帖,最新回復(fù),本周熱門,今日發(fā)帖排行(首頁五格)
2,新帖,最新回復(fù),本周熱門,精華帖
9-7:解決了敏感詞語過濾后仍在四格顯示的問題!
9-6:突破:一改以往flash樣式,改變文字在下的不美觀,并解決好多朋友提出的圖片卡,flash 調(diào)用問題!現(xiàn)在速度飛快,而且可以自行定制flash 中按鍵,文字,背景顏色以及背景透明度。真正人性化,滿足你配套論壇風(fēng)格色彩的要求!
9-6:特別更新:當(dāng)論壇開通了主題回收站時(shí),不再出現(xiàn)帖子放到主題回收站后仍在首頁四格顯示的情況!
關(guān)于各種可以自行設(shè)置的參數(shù)注釋 (鑒于有很多朋友不知道設(shè)置方法,現(xiàn)將可以設(shè)置的內(nèi)容全部寫在下面,以供大家使用)
1/3: pic.php 中
復(fù)制代碼 代碼如下:
$shownums = 5;//演示個(gè)數(shù) 6以內(nèi)
$searchnums = 50;//搜索總數(shù).
$cachelife = 1800;//緩存時(shí)間.
$orderby = 'dateline';//搜索順序:按日期dateline.按瀏覽次數(shù)downloads.隨機(jī)rand.
$cachename = 'showpic';//緩存名.若與何插件沖突請修改,只要不沖突不會(huì)影響使用.
$searchfid = '';//搜索fid范圍.不限制留空.請用逗號相隔,如'1,2,3'.
var config='5|0xffffff|0x0099ff|50|0xffffff|0x0099ff|0x000000'
//-- config 參數(shù) -- 自動(dòng)播放時(shí)間(秒)|文字顏色|文字背景色|文字背景透明度|按鍵數(shù)字顏色|當(dāng)前按鍵顏色|普通按鍵色彩
var swf_width=255 設(shè)置flash 寬
var swf_height=175 設(shè)置flash 高2/3
index.php中
復(fù)制代碼 代碼如下:
$hack_cut_str = 26; //標(biāo)題字?jǐn)?shù)
DESC LIMIT 0, 10" //設(shè)置顯示條數(shù)
如果不想調(diào)用某個(gè)版或某個(gè)區(qū)或者某些版的帖子可在index.php預(yù)留給大家的位置增加:(共三處)
and f.fid not in (0)
增加為:
and f.fid not in (1,2,3)其中123為 不想調(diào)用的 fid,
或者只想調(diào)用 1 2 3 改為:and f.fid in (1,2,3)3/3: discuz.htm 中引用:
如果想把最新回復(fù)中的鏈接打開時(shí)指向最后回復(fù)此帖的位置,只需將discuz.htm 中的:
復(fù)制代碼 代碼如下:
<a href="viewthread.php?tid=$rthread[tid]"
改為:
復(fù)制代碼 代碼如下:
<a href="redirect.php?tid=$rthread[tid]&goto=lastpost#lastpost"
需要像官方一樣每個(gè)區(qū)加入伸縮點(diǎn)擊功能的請?jiān)赿iscuz.htm 中改寫(五格的,如果是四格就根據(jù)<h3>≡ 本周熱門 ≡</h3>
復(fù)制代碼 代碼如下:
<td align="center" style="padding:0 0 0 1px"><h3>今日發(fā)帖</h3></td>
</tr>
</thead>
<tr>
為:
復(fù)制代碼 代碼如下:
<span class="headactions">
<img id="toplist_img" src="images/default/collapsed_no.gif" title="收起/展開" alt="收起/展開" onclick="toggle_collapse('toplist');" />
</span>
<h3>今日發(fā)帖</h3>
</td>
</tr>
</thead>
<tr id="toplist">
演示圖:(根據(jù)要求新寫的風(fēng)格,使得在官方的六種風(fēng)格中更加配套完善。。。)

使用本插件需要增加的文件有:
pic.php //調(diào)用論壇圖片數(shù)據(jù),
list.gif 和listbg.gif //標(biāo)題處的圖片
focus.swf //調(diào)用圖片的flash [此swf 與以往的大不相同,個(gè)人覺得更不錯(cuò)]
需修改的文件有:
index.php
discuz.htm
======================= 開始增加和修改 ============================
步驟:共分4步
將pic.php / list.gif / listbg.gif / focus.swf 按下載到的附件結(jié)構(gòu)傳到FTP(網(wǎng)站)
其中:pic.php 在論壇根目錄
list.gif / listbg.gif / focus.swf 在images文件夾下
打開 index.php
查找:
復(fù)制代碼 代碼如下:
$rsshead = $rssstatus
在之上加:
復(fù)制代碼 代碼如下:
//----首頁四格代碼開始
$colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
//新貼
$hack_cut_str = 26; //標(biāo)題字?jǐn)?shù)
$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;
}
//新回復(fù)
$hack_cut_str = 26; //標(biāo)題字?jǐn)?shù)
$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 = 26; //標(biāo)題字?jǐn)?shù)
$hack_cut_strauthor = 9;
$new_hot_threadlist = array();
$mthread = array();
$ctime=$timestamp-3600*24*7;//最后7是天數(shù)為本周
$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;
}
//----首頁四格代碼結(jié)束
打開 templates/default/discuz.htm
查找:
復(fù)制代碼 代碼如下:
<div id="ad_text"></div>
復(fù)制代碼 代碼如下:
<!-- 首頁四格代碼開始 -->
<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>≡ 最新回復(fù) ≡</h3></td>
<td align="center" style="padding:0"><h3>≡ 本周熱門 ≡</h3></td>
</tr>
</thead>
<tr>
<td width="25%">
<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}主題標(biāo)題: $nthread[subject] {LF}主題作者: $nthread[author]{LF}發(fā)表時(shí)間: $nthread[date]{LF}瀏覽次數(shù): $nthread[views] 次 {LF}回復(fù)次數(shù): $nthread[replies] 次{LF}最后回復(fù): $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}主題標(biāo)題: $nthread[subject] {LF}主題作者: $nthread[author]{LF}發(fā)表時(shí)間: $nthread[date]{LF}瀏覽次數(shù): $nthread[views] 次 {LF}回復(fù)次數(shù): $nthread[replies] 次{LF}最后回復(fù): 暫時(shí)沒有回復(fù)'>$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='最新回復(fù) {LF}所在論壇: $rthread[forumname]{LF}主題標(biāo)題: $rthread[subject]{LF}主題作者: $rthread[author]{LF}發(fā)表時(shí)間: $rthread[date]{LF}瀏覽次數(shù): $rthread[views] 次{LF}回復(fù)次數(shù): $rthread[replies] 次{LF}最后回復(fù): $rthread[lastreplytime]{LF}{lang lastpost}: $rthread[lastposter]'>$rthread[view_subject]</a></div>
<!--{/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_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}主題標(biāo)題: $mthread[subject]{LF}主題作者: $mthread[author]{LF}發(fā)表時(shí)間: $mthread[date]{LF}瀏覽次數(shù): $mthread[views] 次{LF}回復(fù)次數(shù): $mthread[replies] 次{LF}最后回復(fù): $mthread[lastreplytime]{LF}{lang lastpost}: $mthread[lastposter]'>$mthread[view_subject]</a></div>
<!--{/loop}-->
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!-- 首頁四格代碼結(jié)束 -->
上傳剛才修改過的 index.php 及 discuz.htm
==========================================================================
如果你沒有修改過這兩個(gè)文件可以下載附件(請注意為:0904最新6.0.0正式版)直接覆蓋就可以了!
==========================================================================
附件中的每個(gè)包都是獨(dú)立的,請根據(jù)喜愛及版本區(qū)別下載直接上傳就可以使用了,不需要任何數(shù)據(jù)庫設(shè)置!
最后:請記得每次覆蓋或改寫文件后一定要更新緩存!
請大家支持一下我的另一個(gè)原創(chuàng)插件:論壇音樂區(qū)所有歌曲連播[圖]
請安裝好的朋友留下您的網(wǎng)站地址!可以話請?jiān)u分一下哦!謝謝!
希望大家喜歡!
暈,更新后,下載次數(shù)被我刪除了,原先已有5000次左右!
所有文件打包
您可能感興趣的文章:
- Python實(shí)現(xiàn)把utf-8格式的文件轉(zhuǎn)換成gbk格式的文件
- 趣談Unicode、Ascii、utf-8、GB2312、GBK等編碼知識
- Shell腳本把文件從GBK轉(zhuǎn)為UTF-8編碼
- PHP 正則判斷中文UTF-8或GBK的思路及具體實(shí)現(xiàn)
- 字符編碼詳解及由來(UNICODE,UTF-8,GBK) 比較詳細(xì)
- UTF-8 GBK UTF8 GB2312 之間的區(qū)別和關(guān)系介紹
- unicode utf-8 gb18030 gb2312 gbk各種編碼對比
- 常用字符集編碼詳解(ASCII GB2312 GBK GB18030 unicode UTF-8)
- MySQL GBK→UTF-8編碼轉(zhuǎn)換
- Java gbk轉(zhuǎn)utf-8
相關(guān)文章
PHP結(jié)合jQuery插件ajaxFileUpload實(shí)現(xiàn)異步上傳文件實(shí)例
這篇文章主要介紹了PHP結(jié)合jQuery插件ajaxFileUpload實(shí)現(xiàn)異步上傳文件實(shí)例,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2015-11-11彈出模態(tài)框modal的實(shí)現(xiàn)方法及實(shí)例
這篇文章主要介紹了彈出模態(tài)框modal的實(shí)現(xiàn)方法及實(shí)例的相關(guān)資料,希望通過本文能幫助到大家,需要的朋友可以參考下2017-09-09ajax完美實(shí)現(xiàn)兩個(gè)網(wǎng)頁 分頁功能的實(shí)例代碼
ajax完美實(shí)現(xiàn)兩個(gè)網(wǎng)頁 分頁功能的實(shí)例代碼,需要的朋友可以參考一下2013-04-04