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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[修改] X2.5 评分美化(更新for14/3/12 17:11)

  [复制链接]
64243354 发表于 2012-3-15 16:59:56 | 显示全部楼层 |阅读模式
本帖最后由 64243354 于 2013-7-2 17:16 编辑

演示:



打开 template/default/forum/viewthread_node_body.htm 查找(如不是默认模版请先查看你现在使用的模版有否此模版)
  1. <table class="ratl">
  2. <tr>
  3. <th class="xw1" width="120"><a href="forum.php?mod=misc&action=viewratings&tid=$_G[tid]&pid=$post[pid]" title="{lang rate_view}">{lang have} <span class="xi1"><!--{echo count($postlist[$post[pid]][totalrate]);}--></span> {lang people_score}</a></th>
  4. <!--{loop $post['ratelogextcredits'] $id $score}-->
  5. <th width="50"><i>{$_G['setting']['extcredits'][$id][title]}</i></th>
  6. <!--{/loop}-->
  7. <th>
  8. <a href="javascript:;" class="y xi2 op"><!--{if !empty($_G['cookie']['ratecollapse'])}-->{lang open}<!--{else}-->{lang pack}<!--{/if}--></a>
  9. <i>{lang reason}</i>
  10. </th>
  11. </tr>
  12. <tbody class="ratl_l">
  13. <!--{loop $post['ratelog'] $uid $ratelog}-->
  14. <tr id="rate_{$post[pid]}_{$uid}">
  15. <td>
  16. <a href="home.php?mod=space&uid=$uid" target="_blank" c="1"><!--{echo avatar($uid, 'small');}--></a> <a href="home.php?mod=space&uid=$uid" target="_blank">$ratelog[username]</a>
  17. </td>
  18. <!--{loop $post['ratelogextcredits'] $id $score}-->
  19. <!--{if $ratelog['score'][$id] > 0}-->
  20. <td class="xi1"> + $ratelog[score][$id]</td>
  21. <!--{else}-->
  22. <td class="xg1">$ratelog[score][$id]</td>
  23. <!--{/if}-->
  24. <!--{/loop}-->
  25. </tr>
  26. <!--{/loop}-->
  27. </tbody>
  28. </table>
  29. <p class="ratc">
  30. {lang rate_total}:
  31. <!--{loop $post['ratelogextcredits'] $id $score}-->
  32. <!--{if $score > 0}-->
  33. <span class="xi1">{$_G['setting']['extcredits'][$id][title]} + $score</span>
  34. <!--{else}-->
  35. <span class="xg1">{$_G['setting']['extcredits'][$id][title]} $score</span>
  36. <!--{/if}-->
  37. <!--{/loop}-->
  38. <a href="forum.php?mod=misc&action=viewratings&tid=$_G[tid]&pid=$post[pid]" title="{lang rate_view}" class="xi2">{lang rate_view}</a>
  39. </p>
复制代码
替换成:
  1. <!--评分美化开始-->
  2. <div class="pjia_a">
  3. <a class="pfenico"></a>本帖评分记录: 共<!--{echo count($postlist[$post[pid]][totalrate]);}-->条 [总计: <!--{loop $post['ratelogextcredits'] $id $score}--><!--{if $score > 0}-->{$_G['setting']['extcredits'][$id][title]} + $score<!--{else}-->{$_G['setting']['extcredits'][$id][title]} $score<!--{/if}--><!--{/loop}-->]
  4. [<a href="forum.php?mod=misc&action=viewratings&tid=$_G[tid]&pid=$post[pid]" title="{lang rate_view}">查看全部评分记录</a>]
  5. </div>
  6. <div class="readjiafen">
  7. <div class="readjiafenb">
  8. <!--{loop $post['ratelog'] $uid $ratelog}-->
  9. <div class="readjiafen_a" title="$ratelog[reason]">
  10. <a href="home.php?mod=space&uid=$uid" target="_blank" c="1"><img src="http://xiaoyao-heroes.cn/uc/avatar.php?uid=$uid&size=small" style="float:left; margin-right:4px; width:36px; height:36px"></a>
  11. <em>$ratelog[dateline]</em>
  12. <a target="_blank" href="home.php?mod=space&uid=$uid">$ratelog[username]</a>   
  13. <font color="#FF6600">
  14. <!--{loop $ratelog['score'] $id $score}-->
  15. <!--{if $score > 0}-->
  16. {$_G['setting']['extcredits'][$id][title]} + $score $_G['setting']['extcredits'][$id][unit]
  17. <!--{else}-->
  18. {$_G['setting']['extcredits'][$id][title]} $score $_G['setting']['extcredits'][$id][unit]
  19. <!--{/if}-->
  20. <!--{/loop}-->
  21. </font>
  22. <em><a href="home.php?mod=spacecp&ac=pm&op=showmsg&handlekey=showmsg_$uid&touid=$uid&pmid=0&daterange=2" onclick="hideMenu('userinfo1298');showWindow('sendpm', this.href)" title="发短消息" class="pfenico2">发送短信</a></em>
  23. <div class="gray pyu">$ratelog[reason]</div>
  24. </div>
  25. <!--{/loop}-->
  26. </div>
  27. </div>
  28. <!--评分美化结束-->
复制代码
保存前请搜索
  1. http://xiaoyao-heroes.cn/uc/
复制代码
更改为你的uc位址


打开 template/default/common/common.css 在底部添加(如不是默认模版请先查看你现在使用的模版有否此模版)
  1. /*评分美化*/
  2. .pjia_a { padding:0 5px; margin-left:10px; background:#FFF1D6; border:1px solid #F9C89A; color:#DA4901; margin-bottom:6px; float:left;_margin-left:5px;}
  3. .pjia_a a{ color:#DA4901}
  4. .pjia_a a:hover{ text-decoration:none}
  5. .readjiafen { width:732px;margin-left:10px; overflow:hidden; padding-bottom:5px}
  6. .readjiafenb { width:746px;cursor: default}
  7. .readjiafen_a { border:1px dotted #bebebe;_border:1px dashed #bebebe;background:#f8f8f8; width:356px; float:left; margin-right:6px; padding:2px; margin-bottom:6px; }
  8. .readjiafen_a em{ font-style:normal; float:right; font-size:10px; color:#999; padding-right:1px}
  9. .readjiafen_a:hover{ background:#fff;}
  10. .pfenico {background:url(static/image/common/pfen.png) no-repeat; height:14px; width:14px; display:block; float:left; margin:2px 4px 0 0}
  11. .pfenico2 {background:url(static/image/common/pmto.gif) no-repeat; height:14px; width:60px; display:block; float:left; margin:2px 4px 0 0;text-align:right;}
复制代码
打开 source\module\forum\forum_viewthread.php 查找
  1. $postlist, $postcache, $_G['setting']['ratelogrecord']);
复制代码
在下添加
  1. $ratelogs[$ratelog['pid']][$ratelog['uid']]['dateline'] = dgmdate($ratelog['dateline'],"u");
复制代码
(重要)进后台 界面 --> 界面设置 --> 帖子内容页 --> 是否在页面上显示评分理由 选择是!保存,并且更新缓存及更新css
最后上传附件    图片命名为 pfen.png 上传到 static/image/common/ 目录

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x

评分

6

查看全部评分

北北″ 发表于 2012-3-15 17:00:32 | 显示全部楼层
沙发啊!!!!!

评分

2

查看全部评分

回复

使用道具 举报

idong 发表于 2012-3-15 17:00:46 | 显示全部楼层
回复

使用道具 举报

ARCHY` 发表于 2012-3-15 17:01:00 | 显示全部楼层
沙发支持  带个转载地址

评分

2

查看全部评分

回复

使用道具 举报

你在哪里 发表于 2012-3-15 17:01:49 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

花到飞靡 发表于 2012-3-15 17:02:04 | 显示全部楼层
ARCHY` 发表于 2012-3-15 17:01
沙发支持  带个转载地址

你从沙发上掉下来了~~~

评分

1

查看全部评分

回复

使用道具 举报

babyfacer 发表于 2012-3-15 17:05:10 | 显示全部楼层
支持 6
回复

使用道具 举报

非一般感觉 发表于 2012-3-15 17:09:44 | 显示全部楼层
很不错的啊 、
回复

使用道具 举报

腐朽的木头 发表于 2012-3-15 17:10:43 | 显示全部楼层
收藏下 呵呵
回复

使用道具 举报

liqu12511 发表于 2012-3-15 17:12:39 | 显示全部楼层
很棒的教程啊
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-18 19:59 , Processed in 0.107252 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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