Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

[发布] 主题列表显示评分完美版+永诚版主已阅图片美化版for DZ!6.0/6.1

[复制链接]
fucenyuan 发表于 2008-5-10 16:06:35 | 显示全部楼层 |阅读模式
主题列表显示评分完美版+永诚版主已阅图片美化版for DZ!6.0/6.1
-------------------------------------------------------------------------------------
插件名称:主题列表显示评分完美版for DZ!6.0/6.1(一楼)
                 永诚版主已阅图片美化版for DZ!6.0/6.1(二楼)
插件原作者:未知
插件修订者:fucenyuan
版 权 所有:深圳永诚娱乐社区(www.ycdgxt.cn
其 他 说明:通过DZ6.0/6.1正式版测试
演 示 地址:(DZ6.1)http://www.ycsmvod.cn/bbs5/forum-2-1.html
                     (DZ6.0)http://www.ycdgxt.cn
---------------------------------------------------------------------------------------
主题列表显示评分标记for DZ!6.0/6.1

附:DZ6.1的演示地址:
http://www.ycsmvod.cn/bbs5/forum-2-1.html

打开:forumdisplay.php
查找
  1. $querysticky = '';
  2. $query = $db->query("SELECT t.* FROM {$tablepre}threads t
  3.   WHERE t.fid='$fid' $filteradd AND $displayorderadd
  4.   ORDER BY t.displayorder DESC, t.$orderby $ascdesc
  5.   LIMIT ".($filterbool ? $start_limit : $start_limit - $stickycount).", $tpp");
  6. } else {
  7. $querysticky = $db->query("SELECT t.* FROM {$tablepre}threads t
  8.   WHERE t.tid IN ($stickytids) AND t.displayorder IN (2, 3)
  9.   ORDER BY displayorder DESC, $orderby $ascdesc
  10.   LIMIT $start_limit, ".($stickycount - $start_limit < $tpp ? $stickycount - $start_limit : $tpp));
  11. if($tpp - $stickycount + $start_limit > 0) {
  12.   $query = $db->query("SELECT t.* FROM {$tablepre}threads t
  13.    WHERE t.fid='$fid' $filteradd AND $displayorderadd
  14.    ORDER BY displayorder DESC, $orderby $ascdesc
  15.    LIMIT ".($tpp - $stickycount + $start_limit));
  16. } else {
  17.   $query = '';
复制代码
替换成:
  1. $querysticky = '';
  2.         $query = $db->query("SELECT t.*, p.rate, p.pid FROM {$tablepre}threads t
  3.                 LEFT JOIN {$tablepre}posts p USING(tid, dateline)
  4.                 WHERE t.fid='$fid' $filteradd AND $displayorderadd
  5.                 ORDER BY t.displayorder DESC, t.$orderby $ascdesc
  6.                 LIMIT ".($filterbool ? $start_limit : $start_limit - $stickycount).", $tpp");

  7. } else {

  8.         $querysticky = $db->query("SELECT t.*, p.rate,p.pid FROM {$tablepre}threads t
  9.                 LEFT JOIN {$tablepre}posts p USING(tid, dateline)
  10.                 WHERE t.tid IN ($stickytids) AND t.displayorder IN (2, 3)
  11.                 ORDER BY displayorder DESC, $orderby $ascdesc
  12.                 LIMIT $start_limit, ".($stickycount - $start_limit < $tpp ? $stickycount - $start_limit : $tpp));

  13.         if($tpp - $stickycount + $start_limit > 0) {
  14.                 $query = $db->query("SELECT t.*, p.rate,p.pid FROM {$tablepre}threads t
  15.                       LEFT JOIN {$tablepre}posts p USING(tid, dateline)
  16.                         WHERE t.fid='$fid' $filteradd AND $displayorderadd
  17.                         ORDER BY displayorder DESC, $orderby $ascdesc
  18.                         LIMIT ".($tpp - $stickycount + $start_limit));
  19.         } else {
  20.                 $query = '';
复制代码
继续查找
  1. $threadlist[] = $thread;
复制代码
在下面一行加
  1. $tpids[] = $thread['pid'];
复制代码
查找:
  1. $separatepos = $separatepos ? $separatepos + 1 : ($announcement ? 1 : 0);
复制代码
上面加上:
  1. if (is_array($tpids) && count($tpids)>0){
  2.         $tpids = array_filter($tpids,create_function('$_','return is_numeric($_);'));
  3.         @$pids = implode(",",$tpids);
  4.         if ($pids) {
  5.          @$detail_query = $db->query("SELECT * FROM {$tablepre}ratelog WHERE pid IN ($pids)");
  6.          if ($detail_query){
  7.           while ($row = $db->fetch_array($detail_query)){
  8.                   $detail_rate[$row['pid']][$row['extcredits']] += $row['score'];
  9.           }
  10.          } else {
  11.            $detail_rate = array();
  12.          }
  13.         }
  14. }
复制代码
修改forumdisplay.htm

查找:
  1.                 <!--{if $thread['rate'] > 0}-->
  2.                         <img src="{IMGDIR}/agree.gif" alt="" />
  3.                 <!--{elseif $thread['rate'] < 0}-->
  4.                         <img src="{IMGDIR}/disagree.gif" alt="" />
  5.                 <!--{/if}-->
复制代码
将这段代码改为:
  1.                                         <!--{if $thread['rate']}-->
  2.             <!--{loop $detail_rate[$thread[pid]] $k $v}-->
  3.                 [<font color=#00FF00> $extcredits[$k][title]
  4.                 <!--{eval echo sprintf("%+d",$v);}--> </font>]
  5.             <!--{/loop}-->
  6.                     <!--{/if}-->
复制代码
这样,评分的详细会显示在列表右边,如果你不想显示详细的评分,只想显示“[+多少分]”这样的,则将这段代码删除即可!
再查找:
  1. <span id="thread_$thread[tid]"><a href="viewthread.php?tid=$thread[tid]&extra=$extra"$thread[highlight]>$thread[subject]</a></span>
复制代码
  1. <a href="viewthread.php?tid=$thread[tid]&extra=$extra"$thread[highlight]>$thread[subject]</a>
复制代码
后面(即</span>前面)插入:
  1. <!--{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}-->
复制代码
完成.
记得更新缓存··!

[ 本帖最后由 fucenyuan 于 2008-5-13 02:21 编辑 ]
回复

使用道具 举报

 楼主| fucenyuan 发表于 2008-5-10 16:07:41 | 显示全部楼层

永诚版主已阅图片美化版for DZ!6.0/6.1

看到有朋友喜欢我的社区里面的“版主已阅”,实际上通过一些小小的修改便可实现,且体方法如下:

首先安装好我发布的“版主已阅”:

DZ6.0版:https://discuz.dismall.com/thread-894014-1-1.html

DZ6.1版:https://discuz.dismall.com/thread-913643-1-1.html

安装到第五步时,即:
第五步:修改你所使用风格模板中的forumdisplay.htm
将这一步里面的
  1. <!--{if $thread['markread']}-->
  2.   <span alt='{lang moderator}: $thread['markread'][1]{LF}{lang time}: $thread['markread'][2]'>
  3.   [$thread['markread'][1]
  4.   <!--{if ($thread['markread'][0] - 1) <> $thread['replies']}-->
  5.   已阅至: $thread['markreadpage'] $thread['markread'][0] 楼]
  6.   <!--{else}-->
  7.   已阅]
  8.   <!--{/if}-->
  9.   </span>
  10.   <!--{/if}-->
复制代码
改成:
  1. <!--{if $thread['markread']}-->
  2.   <span alt='{lang moderator}: $thread['markread'][1]{LF}{lang time}: $thread['markread'][2]'>
  3.   [$thread['markread'][1]
  4.   <!--{if ($thread['markread'][0] - 1) <> $thread['replies']}-->
  5.   <img src=images/yiyue.gif align="absmiddle"> 至: $thread['markreadpage'] $thread['markread'][0] 楼]
  6.   <!--{else}-->
  7.   <img src=images/yiyue.gif align="absmiddle"> ]
  8.   <!--{/if}-->
  9.   </span>
  10.   <!--{/if}-->
复制代码
然后将附件里面的图片存到论坛的images目录即可!

[ 本帖最后由 fucenyuan 于 2008-5-10 16:11 编辑 ]
yiyue.gif
回复

使用道具 举报

 楼主| fucenyuan 发表于 2008-5-10 16:08:33 | 显示全部楼层
演示图:
永诚版主已阅图片美化版
888888888.gif

主题列表显示评分完美版
999999.gif

[ 本帖最后由 fucenyuan 于 2008-5-10 16:18 编辑 ]
回复

使用道具 举报

 楼主| fucenyuan 发表于 2008-5-10 16:13:05 | 显示全部楼层
占楼更新
回复

使用道具 举报

lhxhryx 发表于 2008-5-10 16:15:47 | 显示全部楼层
沙发一个......
回复

使用道具 举报

bad6622019 发表于 2008-5-10 16:25:44 | 显示全部楼层
后面的3个代码怎么修改?
1个是再查找:  1一个在 1个是后面加上:
什么意思?
回复

使用道具 举报

 楼主| fucenyuan 发表于 2008-5-10 16:28:30 | 显示全部楼层
原帖由 bad6622019 于 2008-5-10 16:25 发表
后面的3个代码怎么修改?
1个是再查找:  1一个在 1个是后面加上:
什么意思?


意思是说在
<span id="thread_$thread[tid]"><a href="viewthread.php?tid=$thread[tid]&extra=$extra"$thread[highlight]>$thread[subject]</a></span>
这段代码里面的
<a href="viewthread.php?tid=$thread[tid]&extra=$extra"$thread[highlight]>$thread[subject]</a>后面
即</span>前面插入
<!--{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}-->
代码
回复

使用道具 举报

风流一刀 发表于 2008-5-11 21:49:24 | 显示全部楼层
留名,闪人,好贴
回复

使用道具 举报

lhole 发表于 2008-5-11 22:13:48 | 显示全部楼层
如果一个帖子同时加了几种积分,是否都能显示呢?
回复

使用道具 举报

zzjqq 发表于 2008-5-12 16:22:27 | 显示全部楼层
收藏了。楼主网站打开好慢啊。。。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-11-22 09:38 , Processed in 0.112646 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表