discuz 首页四格:最新话题+最新回复+热门话题+精华文章插件

2019-04-11 00:41:34王旭

        }
        $new_digest_threadlist[] = $dthread;
}
//精华帖//

如果要修改调用的显示条数,则修改以下代码位置(有4处要修改)

$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid ORDER BY t.dateline DESC LIMIT 0, [b][color=red]8[/color][/b]");

把8修改成你要的数目就可以了.

2./templates/default/discuz.htm
找到

<!--{if !empty($advlist['text'])}-->
        <div style="clear: both; margin-top: 5px;">
        <div class="spaceborder" style="width: {TABLEWIDTH}">
        <table cellspacing="1" border="0" cellpadding="{TABLESPACE}" width="100%" style="background: {BGBORDER}">$advlist[text]</table>
        </div><br></div>
<!--{/if}-->

下面添加:

<!--{if !empty($advlist['text'])}-->
        <div style="clear: both; margin-top: 5px;">
        <div class="spaceborder" style="width: {TABLEWIDTH}">
        <table cellspacing="1" border="0" cellpadding="{TABLESPACE}" width="100%" style="background: {BGBORDER}">$advlist[text]</table>
        </div><br></div>
<!--{/if}-->
<!--{if empty($catlist)}--><div class="maintable"><!--{/if}-->
<table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="{TABLEWIDTH}" align="center" class="tableborder">
        <tr class="header">
    <td class="header" width=25% align=center><b>≡最新话题≡</b></td>
    <td class="header" width=25% align=center><b>≡最新回复≡</b></td>
    <td class="header" width=25% align=center><b>≡热门话题≡</b></td>
    <td class="header" width=25% align=center><b>≡精华文章≡</b></td>
    </tr>
        <tr>
        <td class="altbg1">
相关文章 大家在看