本帖最后由 hhd85 于 2011-8-13 09:35 编辑
自己用的.发出来.
修改 bbs\template\default\forum\viewthread_node_node.htm
在<!--{if !empty($post['ratelog'])}--> 里替换原来显示模块.
- <div id="ratelog_$post[pid]" class="thread_add">
- <span class="icon thread_add_head"><span class="icon"> </span></span>
- <!--{if !$_G['uid']}-->
- <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>
- <!--{/if}-->
- <div class="thread_add_main" id="rate_ul_662235521">
- <div class="rate_total">
- <ul class="rate_info">
- <li>TA共获得:
- <!--{loop $post['ratelogextcredits'] $id $score}-->
- <!--{if $score > 0}-->
- {$_G['setting']['extcredits'][$id][title]} :<strong class="c_orange">+$score</strong>
- <!--{else}-->
- {$_G['setting']['extcredits'][$id][title]} :<strong class="c_orange">$score</strong>
- <!--{/if}-->
- <!--{/loop}-->
- </li>
- <li>评分共<strong class="c_orange"><!--{echo count($postlist[$post[pid]][totalrate]);}--></strong>条
- <!--{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>
- <!--{/if}-->
- <a href="http://xxxxx" title="怎样评分?" target="_blank" class="xi2">怎样评分?</a>
- </li>
- </ul>
- </div>
- <ul class="rate_scorelist">
- <!--{loop $post['ratelog'] $uid $ratelog}-->
- <li onMouseOver="this.className='rate_scorelist_active'" onMouseOut= "this.className=''">
- <span class="rete_user"><a href="home.php?mod=space&uid=$uid" target="_blank">$ratelog[username]</a></span>
- <span class="rete_time">$ratelog[dateline]</span>
- <span class="rate_cent">
- <!--{loop $post['ratelogextcredits'] $id $score}-->
- <!--{if $id==2}-->
- <strong class="icon icon_gold"> $ratelog[score][$id] </strong>
- <!--{else}-->
- <!--{if $ratelog['score'][$id] > 0}-->
- <strong class="icon icon_add">$ratelog[score][$id] </strong>
- <!--{else}-->
- <strong class="icon icon_minus">$ratelog[score][$id] </strong>
- <!--{/if}-->
- <!--{/if}-->
- <!--{/loop}-->
- </span>
- <span class="rate_msg">$ratelog[reason]</span>
- </li>
- <!--{/loop}-->
- </ul>
- </div>
- <span class="icon thread_add_foot"><span class="icon"> </span></span>
- </div>
复制代码
添加bbs\template\default\common\common.css
最后面添加以下样式
- /* ------------------------------------------------------------------------ 自定义样式 */
- /** 评分 **/
- .icon {background-image: url({IMGDIR}/icon.png);background-repeat: no-repeat;}
- .thread_add {position:relative;margin-top:10px;width:760px;overflow:hidden;z-index:0;}
- .thread_add_head span, .thread_add_foot span {float:right;width:5px;height:5px;overflow:hidden;}
- .thread_add .thread_add_head {background-position:-5px -170px;}
- .thread_add .thread_add_head span {background-position:0 -170px;}
- .thread_add .thread_add_foot {margin-top:-5px;background-position:-5px -165px;}
- .thread_add .thread_add_foot span {background-position:0 -165px;}
- .thread_add_main {width:758px;border:1px solid #D9E6BB;background:#FFF;overflow:hidden;}
- .thread_add_head, .thread_add_foot {position:absolute;display:block;width:760px;height:5px;overflow:hidden;z-index:0;}
- .thread_add_main .rate_scorelist {padding:5px 0 5px 0;}
- .thread_add_main .rate_scorelist li {padding:0 10px;cursor:pointer;float:left;width:738px;height:21px;line-height:21px;overflow:hidden;}
- .thread_add_main .rate_scorelist_active {background-color:#E7F1D4;}
- .thread_add_main .rate_scorelist span {float:left;height:21px;overflow:hidden;}
- .rete_user {width:110px;}
- .rete_user A{color:#0657B2;}
- .rete_time {width:70px;}
- .rate_cent {text-indent:18px;}
- .rate_cent strong {float:left;font-weight:400;}
- .icon_add {color:#FC6D02;background-position:0 -36px;}
- .icon_minus {color:#62910A;background-position:0 -72px;}
- .icon_gold {color:#E2AA14;background-position:0 -108px;}
- .rate_total {background:url({IMGDIR}/bg_repeat.png) repeat-x;}
- .rate_total {padding-left:5px;width:753px;height:24px;background-position:0 0;color: #334F67;}
- .rate_info {margin-right:3px;height:22px;background:none;overflow:hidden;}
- .rate_info li {background:url({IMGDIR}/icon.png) no-repeat 0 0;}
- .rate_info li {float:left;margin-left:-2px;padding:0 7px;height:24px;line-height:26px;background-position:0 -130px;overflow:hidden;}
- .rate_info li .c_orange{color:#FC6D02;}
- .needlogin_rate {font-size:12px;position:absolute;right:5px;top:5px;width:235px;z-index:5;
- margin-bottom:10px;padding:3px 15px 0;height:27px;line-height:27px;text-indent:30px;border-width:1px;border-style:solid;font-size:14px;
- 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'];
- $ratelogs[$ratelog['pid']][$ratelog['uid']]['dateline'] = dgmdate($ratelog['dateline'], 'd');
复制代码 所用到图形存放在 bbs\static\image\common
icon.png
bg_repeat.png
效果如下
|
评分
-
1
查看全部评分
-
|