其实我觉得 X1.5 的评分列表已经很漂亮很整齐了,没必要美化了,但是还是好多站长要求升级之前那个仿 PW8 的评分列表,所以在原 X1.5 的基础上加了一些 CSS 样式,达到美化目的。
修改方法:
打开 template/default/forum/viewthread_node_body.htm 文件查找 (如果自己第三方模板中也有这个文件,那就修改第三方模板目录下的该文件):
<table >
<tr>
<th width="120"><a href="forum.php?mod=misc&action=viewratings&tid=$_G[tid]&pid=$post[pid]" onclick="showWindow('viewratings', this.href)" title="{lang rate_view}">{lang have} <span ><!--{echo count($postlist[$post[pid]][totalrate]);}--></span> {lang people_score}</a></th>
<!--{loop $post['ratelogextcredits'] $id $score}-->
<th width="50"><i>{$_G['setting']['extcredits'][$id][title]}</i></th>
<!--{/loop}-->
<th>
<a href="javascript:;" onclick="toggleRatelogCollapse('ratelog_$post[pid]', this);" ><!--{if !empty($_G['cookie']['ratecollapse'])}-->{lang open}<!--{else}-->{lang pack}<!--{/if}--></a>
<i>{lang reason}</i>
</th>
</tr>
<tbody >
<!--{loop $post['ratelog'] $uid $ratelog}-->
<tr id="rate_{$post[pid]}_{$uid}">
<td>
<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>
</td>
<!--{loop $post['ratelogextcredits'] $id $score}-->
<!--{if $ratelog['score'][$id] > 0}-->
&nb
sp; <td > + $ratelog[score][$id]</td>
<!--{else}-->
<td >$ratelog[score][$id]</td>
<!--{/if}-->
<!--{/loop}-->
<td >$ratelog[reason]</td>
</tr>
<!--{/loop}-->
</tbody>
</table>
<p >
{lang rate_total}:
<!--{loop $post['ratelogextcredits'] $id $score}-->
<!--{if $score > 0}-->
<span >{$_G['setting']['extcredits'][$id][title]} + $score</span>
<!--{else}-->
<span >{$_G['setting']['extcredits'][$id][title]} $score</span>
<!--{/if}-->
<!--{/loop}-->
<a href="forum.php?mod=misc&action=viewratings&tid=$_G[tid]&pid=$post[pid]" onclick="showWindow('viewratings', this.href)" title="{lang rate_view}" >{lang rate_view}</a>
</p>
替换为:
<style type="text/css">
<!--
.ratl img { border:1
px solid #CCCCCC; height:20px; padding:2px; width:20px; }
-->
</style>
<table style="border:1px solid #CCCCCC;">
<tr bgcolor="#efeeee">
<th width="3"></th>
<th width="120"><a href="forum.php?mod=misc&action=viewratings&tid=$_G[tid]&pid=$post[pid]" onclick="showWindow('viewratings', this.href)" title="{lang rate_view}">{lang have} <span ><!--{echo count($postlist[$post[pid]][totalrate]);}--></span> {lang people_score}</a></th>
<!--{loop $post['ratelogextcredits'] $id $score}-->
<th width="50"><i>{$_G['setting']['extcredits'][$id][title]}</i></th>
<!--{/loop}-->
<th>
<a href="javascript:;" onclick="toggleRatelogCollapse('ratelog_$post[pid]', this);" ><!--{if !empty($_G['cookie']['ratecollapse'])}-->{lang open}<!--{else}-->{lang pack}<!--{/if}--></a>
<i>{lang reason}</i>
</th>
</tr>
<tbody >
<!--{loop $post['ratelog'] $uid $ratelog}-->
<tr id="rate_{$post[pid]}_{$uid}">
<td width="3"></td>
<td>
<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>
&nbs
p; </td>
<!--{loop $post['ratelogextcredits'] $id $score}-->
<!--{if $ratelog['score'][$id] > 0}-->
<td > + $ratelog[score][$id]</td>
<!--{else}-->
<td >$ratelog[score][$id]</td>
<!--{/if}-->
<!--{/loop}-->
<td >$ratelog[reason]</td>
</tr>
<!--{/loop}-->
</tbody>
</table>
<p style="border: 1px solid #cccccc; border-top:none;background-color:#efeeee;padding-left:5px;">
{lang rate_total}:
<!--{loop $post['ratelogextcredits'] $id $score}-->
<!--{if $score > 0}-->
<span >{$_G['setting']['extcredits'][$id][title]} + $score</span>
<!--{else}-->
<span >{$_G['setting']['extcredits'][$id][title]} $score</span>
<!--{/if}-->
&nb
sp; <!--{/loop}-->
<a href="forum.php?mod=misc&action=viewratings&tid=$_G[tid]&pid=$post[pid]" onclick="showWindow('viewratings', this.href)" title="{lang rate_view}" >{lang rate_view}</a>
</p>