================================
适用版本:Discuz! 5.5
版权所有:归原作者所有
修改文件:2个
数据升级:无
安装难易:简单
================================
DZ5.0估计也可以使用,具体我没有测试过。
一、修改 forumdisplay.php查找:
- $querysticky = '';
- $query = $db->query("SELECT t.* FROM {$tablepre}threads t
- WHERE t.fid='$fid' $filteradd AND $displayorderadd
- ORDER BY t.displayorder DESC, t.$orderby $ascdesc
- LIMIT ".($filterbool ? $start_limit : $start_limit - $stickycount).", $tpp");
- } else {
- $querysticky = $db->query("SELECT t.* FROM {$tablepre}threads t
- WHERE t.tid IN ($stickytids) AND t.displayorder IN (2, 3)
- ORDER BY displayorder DESC, $orderby $ascdesc
- LIMIT $start_limit, ".($stickycount - $start_limit < $tpp ? $stickycount - $start_limit : $tpp));
- if($tpp - $stickycount + $start_limit > 0) {
- $query = $db->query("SELECT t.* FROM {$tablepre}threads t
- WHERE t.fid='$fid' $filteradd AND $displayorderadd
- ORDER BY displayorder DESC, $orderby $ascdesc
- LIMIT ".($tpp - $stickycount + $start_limit));
- } else {
- $query = '';
复制代码
替换为:
- //============主题列表显示评分数 FOR DZ5.5================//
- $querysticky = '';
- $query = $db->query("SELECT $dotadd1 t.*, p.rate FROM {$tablepre}threads t $dotadd2
- LEFT JOIN {$tablepre}posts p USING(tid, dateline)
- WHERE t.fid='$fid' $filteradd AND $displayorderadd
- ORDER BY t.displayorder DESC, t.$orderby $ascdesc
- LIMIT ".($filterbool ? $start_limit : $start_limit - $stickycount).", $tpp");
- } else {
- $querysticky = $db->query("SELECT $dotadd1 t.*, p.rate FROM {$tablepre}threads t $dotadd2
- LEFT JOIN {$tablepre}posts p USING(tid, dateline)
- WHERE t.tid IN ($stickytids) AND t.displayorder IN (2, 3)
- ORDER BY displayorder DESC, $orderby $ascdesc
- LIMIT $start_limit, ".($stickycount - $start_limit < $tpp ? $stickycount - $start_limit : $tpp));
- if($tpp - $stickycount + $start_limit > 0) {
- $query = $db->query("SELECT $dotadd1 t.*, p.rate FROM {$tablepre}threads t $dotadd2
- LEFT JOIN {$tablepre}posts p USING(tid, dateline)
- WHERE t.fid='$fid' $filteradd AND $displayorderadd
- ORDER BY displayorder DESC, $orderby $ascdesc
- LIMIT ".($tpp - $stickycount + $start_limit));
- } else {
- $query = '';
- //============主题列表显示评分数 FOR DZ5.5================//
复制代码
================================================
如果你已安装使用了主题显示略缩的作者头像 For Discuz 5.5 V1.0
这步forumdisplay.php的修改会有冲突,改为以下替换内容即可解决:
==================================================
- //============主题列表显示评分数 FOR DZ5.5================//
- $querysticky = '';
- $query = $db->query("SELECT $dotadd1 t.* , mf.avatar, p.rate FROM {$tablepre}threads t $dotadd2
- LEFT JOIN {$tablepre}posts p USING(tid, dateline)
- LEFT JOIN {$tablepre}memberfields mf ON(mf.uid = t.authorid)
- WHERE t.fid='$fid' $filteradd AND $displayorderadd
- ORDER BY t.displayorder DESC, t.$orderby $ascdesc
- LIMIT ".($filterbool ? $start_limit : $start_limit - $stickycount).", $tpp");
- } else {
- $querysticky = $db->query("SELECT $dotadd1 t.* , mf.avatar, p.rate FROM {$tablepre}threads t $dotadd2
- LEFT JOIN {$tablepre}posts p USING(tid, dateline)
- LEFT JOIN {$tablepre}memberfields mf ON(mf.uid = t.authorid)
- WHERE t.tid IN ($stickytids) AND t.displayorder IN (2, 3)
- ORDER BY displayorder DESC, $orderby $ascdesc
- LIMIT $start_limit, ".($stickycount - $start_limit < $tpp ? $stickycount - $start_limit : $tpp));
- if($tpp - $stickycount + $start_limit > 0) {
- $query = $db->query("SELECT $dotadd1 t.* , mf.avatar, p.rate FROM {$tablepre}threads t $dotadd2
- LEFT JOIN {$tablepre}posts p USING(tid, dateline)
- LEFT JOIN {$tablepre}memberfields mf ON(mf.uid = t.authorid)
- WHERE t.fid='$fid' $filteradd AND $displayorderadd
- ORDER BY displayorder DESC, $orderby $ascdesc
- LIMIT ".($tpp - $stickycount + $start_limit));
- } else {
- $query = '';
- //============主题列表显示评分数 FOR DZ5.5================//
复制代码
二,修改forumdisplay.htm
查找并删除(如果你想要保留原手指图的可以不删)
- <!--{if $thread['rate'] > 0}-->
- <img src="{IMGDIR}/agree.gif" alt="" />
- <!--{elseif $thread['rate'] < 0}-->
- <img src="{IMGDIR}/disagree.gif" alt="" />
- <!--{/if}-->
复制代码
继续查找:
- <a href="viewthread.php?tid=$thread[tid]&extra=$extra"$thread[highlight]>$thread[subject]</a>
复制代码
下加
- <!============主题列表显示评分数 FOR DZ5.5================>
- <!--{if $thread['rate'] > 0}--><font style="background-color: #FFFF00 ;" color="#000000">+$thread['rate']</font><!--{elseif $thread['rate'] < 0}--><font style="background-color: #0000FF;" color="#FFFFFF">$thread['rate']</font><!--{/if}-->
- <!============主题列表显示评分数 FOR DZ5.5==============>
复制代码
---------------------------------------------修改完毕!!!-------------------------------------------
[ 本帖最后由 肯得基 于 2007-4-23 01:37 编辑 ] |