网(LieHuo.Net)教程 今天我们来看一篇《给 Discuz! 在帖子页面加入上一贴、下一贴功能》的教程
第一步: templatesdefaultviewthread.htm
找到:
<span class="pageback"{if $visitedforums} id="visitedforums"{/if}><a href="$upnavlink">{lang return_forumdisplay}</a></span>
下面加:
<div class="xjtoplics">
<a href="redirect.PHP?fid=$fid&tid=$tid&goto=nextoldset" class="prev"> ‹‹ {lang last_thread}</a>
<a href="redirect.PHP?fid=$fid&tid=$tid&goto=nextnewset" class="next">{lang next_thread} ››</a>
</div>
第二步: templatesdefaultcss_common.htm
最后加:
.xjtoplics { float: right; padding: 2px 0; }
.xjtoplics a,.xjtoplics strong { float: left; padding: 0 6px; margin-right: 2px; height: 20px; border: 1px solid; line-height: 20px; overflow: hidden; }
.xjtoplics a {border-color: {HIGHLIGHTLINK}; background-color: {WRAPBG}; color: {HIGHLIGHTLINK}; }
.xjtoplics a:hover { text-decoration: none; }
第三步:includeglobal.func.PHP
找到:
function multi($num,$perpage,$curpage,$mpurl,$maxpages = 0,$page = 10,$autogoto = TRUE,$simple = FALSE)
约 578 行:
改为: function multi($num,$page = 5,$simple = FALSE)
OK!更新一下缓存,看看效果吧!