Discuz教程网

[代码修改] Discuz X2 评分美化

[复制链接]
authicon 主编 发表于 2011-7-8 23:50:30 | 显示全部楼层 |阅读模式
效果如下:
230527ctxx47xtpptt0t5p.jpg

----------------------------------------------------------------------------------------------------------------------------------
1.打开 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. <td class="xg1">$ratelog[reason]</td>
  26. </tr>
  27. <!--{/loop}-->
  28. </tbody>
  29. </table>
  30. <p class="ratc">
  31. {lang rate_total}:
  32. <!--{loop $post['ratelogextcredits'] $id $score}-->
  33. <!--{if $score > 0}-->
  34. <span class="xi1">{$_G['setting']['extcredits'][$id][title]} + $score</span>
  35. <!--{else}-->
  36. <span class="xg1">{$_G['setting']['extcredits'][$id][title]} $score</span>
  37. <!--{/if}-->
  38. <!--{/loop}-->
  39. <a href="forum.php?mod=misc&action=viewratings&tid=$_G[tid]&pid=$post[pid]" title="{lang rate_view}" class="xi2">{lang rate_view}</a>
  40. </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. <br style="clear:both">
  7. <div class="readjiafen">
  8. <div class="readjiafenb">
  9. <!--{loop $post['ratelog'] $uid $ratelog}-->
  10. <div class="readjiafen_a" title="$ratelog[reason]">
  11. <a href="home.php?mod=space&uid=$uid" target="_blank" c="1"><img src="[url=http://center.7cco.com/avatar.php?uid=$uid&size=small]http://center.7cco.com/avatar.php?uid=$uid&size=small[/url]" style="float:left; margin-right:4px; width:36px; height:36px"></a>
  12. <em>$ratelog[dateline]</em>
  13. <a target="_blank" href="home.php?mod=space&uid=$uid">$ratelog[username]</a>   
  14. <font color="#FF6600">
  15. <!--{loop $ratelog['score'] $id $score}-->
  16. <!--{if $score > 0}-->
  17. {$_G['setting']['extcredits'][$id][title]} + $score $_G['setting']['extcredits'][$id][unit]
  18. <!--{else}-->
  19. {$_G['setting']['extcredits'][$id][title]} $score $_G['setting']['extcredits'][$id][unit]
  20. <!--{/if}-->
  21. <!--{/loop}-->
  22. </font>
  23. <br>
  24. <div class="gray pyu">$ratelog[reason]</div>
  25. </div>
  26. <!--{/loop}-->
  27. </div>
  28. </div>
  29. <!--评分美化结束-->
复制代码
2.
打开 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}
复制代码
3.
打开 source\module\forum\forum_viewthread.php 查找


  1. $ratelogs[$ratelog['pid']][$ratelog['uid']]['username'] = $ratelog['username'];
复制代码
在下面添加:



  1. target="_blank"{else} {/if} class="xst" target="_blank">$thread[subject]</a>
复制代码




更新缓存~美化完毕~





上一篇:百度_返回码的含义和建议
下一篇:这个贴内的美化是如何实现的?
authicon dly 发表于 2011-7-9 07:51:38 | 显示全部楼层
好像挺好看的
authicon hehome200 发表于 2011-7-26 00:44:00 | 显示全部楼层
先留个位置,慢慢学
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

1314学习网 ( 浙ICP备10214163号 )

GMT+8, 2024-11-1 07:47

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

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