标题:
[收藏]主题列表显示评分标记(显示分数)D4.1版
[打印本页]
作者:
yeego
时间:
2006-7-14 16:03
标题:
[收藏]主题列表显示评分标记(显示分数)D4.1版
适用版本:Discuz! 4.1.0
插件作者:hao123123
技术支持:http://www.hao10.com/bbs
QQ: 511953458
修改文件:forumdisplay.php、forumdisplay模板
安装难易:简
演 示:见附见图片!
提醒:先进行备份,养成良好习惯否则出问题请不要找我
一、修改 forumdisplay.php
查找:
$querysticky = '';
$query = $db->query("SELECT $dotadd1 t.* FROM {$tablepre}threads t $dotadd2
WHERE t.fid='$fid' $filteradd AND $displayorderadd
ORDER BY t.displayorder DESC, t.$orderby $ascdesc
LIMIT ".($filter == 'digest' || $filter == 'type' ? $start_limit : $start_limit - $stickycount).", $tpp");
} else {
$querysticky = $db->query("SELECT $dotadd1 t.* FROM {$tablepre}threads t $dotadd2
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.* FROM {$tablepre}threads t $dotadd2
WHERE t.fid='$fid' $filteradd AND $displayorderadd
ORDER BY displayorder DESC, $orderby $ascdesc
LIMIT ".($tpp - $stickycount + $start_limit));
} else {
$query = '';
复制代码
替换为:
$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 ".($filter == 'digest' || $filter == 'type' ? $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 = '';
复制代码
二,修改forumdisplay.htm
查找并删除
<!--{if $thread['rate'] > 0}--><img src="{IMGDIR}/agree.gif" align="right"><!--{elseif $thread['rate'] < 0}--><img src="{IMGDIR}/disagree.gif" align="right"><!--{/if}-->
复制代码
继续查找
<a href="viewthread.php?tid=$thread[tid]&extra=$extra"$thread[highlight]>$thread[subject]</a>
复制代码
下面加
<!--{if $thread['rate'] > 0}-->[<b><font color=red>+$thread['rate']</font></b>]<!--{elseif $thread['rate'] < 0}-->[<b><font color=red>$thread['rate']</font></b>]<!--{/if}-->
复制代码
欢迎光临 〖嘉城社区网〗 (http://162.218.51.55/)
Powered by Discuz! 7.0.0