每个模板都有它的特点,所以不可能每个模板都会延用默认模板的所有功能,因此才会有“定制模板”。
一般返回顶部的代码都会在模板文件夹下的footer.htm里
html完整代码是这一段:
<!--{if $_G['basescript'] != 'userapp'}-->
<div id="scrolltop">
<!--{if $_G[fid] && $_G['mod'] == 'viewthread'}-->
<span><a href="forum.php?mod=post&action=reply&fid=$_G[fid]&tid=$_G[tid]&extra=$_GET[extra]&page=$page{if $_GET[from]}&from=$_GET[from]{/if}" onclick="showWindow('reply', this.href)" class="replyfast" title="{lang fastreply}"><b>{lang fastreply}</b></a></span>
<!--{/if}-->
<span hidefocus="true"><a title="{lang scrolltop}" onclick="window.scrollTo('0','0')" class="scrolltopa" ><b>{lang scrolltop}</b></a></span>
<!--{if $_G[fid]}-->
<span>
<!--{if $_G['mod'] == 'viewthread'}-->
<a href="forum.php?mod=forumdisplay&fid=$_G[fid]" hidefocus="true" class="returnlist" title="{lang return_list}"><b>{lang return_list}</b></a>
<!--{else}-->
<a href="forum.php" hidefocus="true" class="returnboard" title="{lang return_forum}"><b>{lang return_forum}</b></a>
<!--{/if}-->
</span>
<!--{/if}-->
</div>
<script type="text/javascript">_attachEvent(window, 'scroll', function () { showTopLink(); });checkBlind();</script>
<!--{/if}-->
因为不清楚你使用的模板修改了多少源代码,所以放到footer里不一定会跟官方的一样,这个关联到CSS和JS是否被删除或修改,如果官方的JS没有被删减,那添加进去是会有效的,
官方的CSS是这一段:
#scrolltop { visibility: hidden; position: fixed; bottom: 100px; display: block; margin: -30px 0 0 2px; width: 40px; background: #f4f4f4; border: 1px #cdcdcd solid; border-radius: 3px; border-top: 0; cursor: pointer; }
#scrolltop:hover { text-decoration: none; }
.ie6 #scrolltop { position: absolute; bottom: auto; }
#scrolltop a { display: block; width: 30px; height: 24px; padding: 3px 5px; line-height: 12px; text-align: center; color: #787878; text-decoration: none; background: url({IMGDIR}/scrolltop.png) no-repeat 0 0; border-top: 1px #cdcdcd solid; }
a.scrolltopa:hover { background-position: -40px 0px !important;}
a.replyfast { background-position: 0 -30px !important; }
a.replyfast:hover { background-position: -40px -30px !important;}
a.returnlist,a.returnboard { background-position: 0 -60px !important; }
a.returnlist:hover,a.returnboard:hover { background-position: -40px -60px !important;}
#scrolltop a b { visibility: hidden; font-weight: normal; } |