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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[修改] 仿19楼评分显示界面---美化

[复制链接]
hhd85 发表于 2011-8-13 09:35:08 | 显示全部楼层 |阅读模式
本帖最后由 hhd85 于 2011-8-13 09:35 编辑

自己用的.发出来.
修改 bbs\template\default\forum\viewthread_node_node.htm
在<!--{if !empty($post['ratelog'])}--> 里替换原来显示模块.
  1. <div id="ratelog_$post[pid]" class="thread_add">
  2. <span class="icon thread_add_head"><span class="icon"> </span></span>
  3. <!--{if !$_G['uid']}-->
  4. <div class="needlogin_rate icon">给分给态度,<a href="member.php?mod=logging&action=login" onclick="showWindow('login', this.href)" class="xi2" showwintitle="登录成功即可评分">登录</a>/<a href="member.php?mod=register" class="xi2" >注册</a>就能评!</div>
  5. <!--{/if}-->
  6. <div class="thread_add_main" id="rate_ul_662235521">
  7. <div class="rate_total">
  8. <ul class="rate_info">
  9. <li>TA共获得:
  10. <!--{loop $post['ratelogextcredits'] $id $score}-->
  11. <!--{if $score > 0}-->
  12. {$_G['setting']['extcredits'][$id][title]} :<strong class="c_orange">+$score</strong>
  13. <!--{else}-->
  14. {$_G['setting']['extcredits'][$id][title]} :<strong class="c_orange">$score</strong>
  15. <!--{/if}-->
  16. <!--{/loop}-->
  17. </li>
  18. <li>评分共<strong class="c_orange"><!--{echo count($postlist[$post[pid]][totalrate]);}--></strong>条
  19. <!--{if count($postlist[$post[pid]][totalrate]) > $_G['setting']['ratelogrecord'] }-->  <a href="forum.php?mod=misc&action=viewratings&tid=$_G[tid]&pid=$post[pid]" onclick="showWindow('viewratings', this.href)" title="{lang rate_view}" class="xi2">{lang rate_view}</a>  
  20. <!--{/if}-->
  21. <a href="http://xxxxx" title="怎样评分?" target="_blank" class="xi2">怎样评分?</a>
  22. </li>
  23. </ul>
  24. </div>
  25. <ul class="rate_scorelist">
  26. <!--{loop $post['ratelog'] $uid $ratelog}-->
  27. <li onMouseOver="this.className='rate_scorelist_active'" onMouseOut= "this.className=''">
  28. <span class="rete_user"><a href="home.php?mod=space&uid=$uid" target="_blank">$ratelog[username]</a></span>
  29. <span class="rete_time">$ratelog[dateline]</span>
  30. <span class="rate_cent">
  31. <!--{loop $post['ratelogextcredits'] $id $score}-->
  32. <!--{if $id==2}-->
  33. <strong class="icon icon_gold"> $ratelog[score][$id] </strong>
  34. <!--{else}-->
  35. <!--{if $ratelog['score'][$id] > 0}-->
  36. <strong class="icon icon_add">$ratelog[score][$id] </strong>
  37. <!--{else}-->
  38. <strong class="icon icon_minus">$ratelog[score][$id] </strong>
  39. <!--{/if}-->
  40. <!--{/if}-->
  41. <!--{/loop}-->
  42. </span>
  43. <span class="rate_msg">$ratelog[reason]</span>
  44. </li>
  45. <!--{/loop}-->
  46. </ul>
  47. </div>
  48. <span class="icon thread_add_foot"><span class="icon"> </span></span>
  49. </div>
复制代码


添加bbs\template\default\common\common.css
最后面添加以下样式


  1. /* ------------------------------------------------------------------------ 自定义样式 */
  2. /** 评分 **/
  3. .icon {background-image: url({IMGDIR}/icon.png);background-repeat: no-repeat;}
  4. .thread_add {position:relative;margin-top:10px;width:760px;overflow:hidden;z-index:0;}
  5. .thread_add_head span, .thread_add_foot span {float:right;width:5px;height:5px;overflow:hidden;}
  6. .thread_add .thread_add_head {background-position:-5px -170px;}
  7. .thread_add .thread_add_head span {background-position:0 -170px;}
  8. .thread_add .thread_add_foot {margin-top:-5px;background-position:-5px -165px;}
  9. .thread_add .thread_add_foot span {background-position:0 -165px;}
  10. .thread_add_main {width:758px;border:1px solid #D9E6BB;background:#FFF;overflow:hidden;}
  11. .thread_add_head, .thread_add_foot {position:absolute;display:block;width:760px;height:5px;overflow:hidden;z-index:0;}


  12. .thread_add_main .rate_scorelist {padding:5px 0 5px 0;}
  13. .thread_add_main .rate_scorelist li {padding:0 10px;cursor:pointer;float:left;width:738px;height:21px;line-height:21px;overflow:hidden;}
  14. .thread_add_main .rate_scorelist_active {background-color:#E7F1D4;}
  15. .thread_add_main .rate_scorelist span {float:left;height:21px;overflow:hidden;}
  16. .rete_user {width:110px;}
  17. .rete_user A{color:#0657B2;}
  18. .rete_time {width:70px;}
  19. .rate_cent {text-indent:18px;}
  20. .rate_cent strong {float:left;font-weight:400;}
  21. .icon_add {color:#FC6D02;background-position:0 -36px;}
  22. .icon_minus {color:#62910A;background-position:0 -72px;}
  23. .icon_gold {color:#E2AA14;background-position:0 -108px;}

  24. .rate_total {background:url({IMGDIR}/bg_repeat.png) repeat-x;}
  25. .rate_total {padding-left:5px;width:753px;height:24px;background-position:0 0;color: #334F67;}
  26. .rate_info {margin-right:3px;height:22px;background:none;overflow:hidden;}
  27. .rate_info li {background:url({IMGDIR}/icon.png) no-repeat 0 0;}
  28. .rate_info li {float:left;margin-left:-2px;padding:0 7px;height:24px;line-height:26px;background-position:0 -130px;overflow:hidden;}
  29. .rate_info li .c_orange{color:#FC6D02;}

  30. .needlogin_rate {font-size:12px;position:absolute;right:5px;top:5px;width:235px;z-index:5;
  31. margin-bottom:10px;padding:3px 15px 0;height:27px;line-height:27px;text-indent:30px;border-width:1px;border-style:solid;font-size:14px;
  32. overflow:hidden;background-position: 10px -179px;border-color:#EDDDAB;background-color:#FFFCE9;}
复制代码
修改 增加评分时的日期显示 bbs\source\module\forum\forum_viewthread.php
在以下代码后添加
if($_G['forum_ratelogpid']) {
$query = DB::query("SELECT * FROM ".DB::table('forum_ratelog')." WHERE pid IN (".$_G['forum_ratelogpid'].") ORDER BY dateline DESC");
while($ratelog = DB::fetch($query)) {
  if(count($postlist[$ratelog['pid']]['ratelog']) < $_G['setting']['ratelogrecord']) {
   $ratelogs[$ratelog['pid']][$ratelog['uid']]['username'] = $ratelog['username'];

  1. $ratelogs[$ratelog['pid']][$ratelog['uid']]['dateline'] = dgmdate($ratelog['dateline'], 'd');
复制代码
所用到图形存放在 bbs\static\image\common
icon.png
bg_repeat.png

效果如下



本帖子中包含更多资源

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

x

评分

1

查看全部评分

saz1978 发表于 2011-8-13 09:53:59 | 显示全部楼层
沙发坐坐
回复

使用道具 举报

无效楼层,该帖已经被删除
nimeilai 发表于 2011-8-13 10:00:52 | 显示全部楼层
挺好看的
回复

使用道具 举报

a475305268 发表于 2011-8-13 10:54:54 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

fylt 发表于 2011-8-13 11:22:41 | 显示全部楼层
好东西。不错。。
回复

使用道具 举报

忘事随风 发表于 2011-8-13 11:23:36 | 显示全部楼层

本帖最后由 忘事随风 于 2011-8-13 11:23 编辑

没有椅子坐 www.lookqu.com
回复

使用道具 举报

408904199 发表于 2011-8-13 11:31:46 | 显示全部楼层
不粗哦
回复

使用道具 举报

xhnet 发表于 2011-8-13 12:04:09 | 显示全部楼层
好东西,支持 了
回复

使用道具 举报

xhnet 发表于 2011-8-13 12:09:23 | 显示全部楼层
修改 bbs\template\default\forum\viewthread_node_node.htm
这个文件找不到
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-6-19 04:32 , Processed in 0.103705 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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