演示:
http://www.phpq.net/club/thread-4-1-1.html
您是否已经厌倦了主题贴中
这样的显示方式?
其实搜索引擎也厌倦了这些内容,大家可以看看下自己的访问日志中,有多少搜索引擎还在GET redirect.php这个页面的!
现在只要2步将您的论坛修改成为
第一步:
在论坛根目录的viewthread.php中(大概在25行左右)
查找
复制内容到剪贴板
代码:
$query = $db->query("SELECT * FROM {$tablepre}threads t WHERE tid='$tid' AND displayorder>='0'");
if(!$thread = $db->fetch_array($query)) {替换为
复制内容到剪贴板
代码:
$lastthread = $thread = $nextthread = array();
$lasttid = intval($tid - 1);
$nexttid = intval($tid + 1);
$query = $db->query("SELECT * FROM {$tablepre}threads t WHERE tid IN ('$lasttid', '$tid', '$nexttid') AND displayorder>='0'");
while($threadt = $db->fetch_array($query)) {
$lastthread = $threadt['tid'] == $lasttid ? $threadt : $lastthread;
$thread = $threadt['tid'] == $tid ? $threadt : $thread;
$nextthread = $threadt['tid'] == $nexttid ? $threadt : $nextthread;
}
if(!$thread) {第二步:
在templates/default/viewthread.htm中(大概34行 和350行都有)
查找
复制内容到剪贴板
代码:
<div class="threadflow"><a href="redirect.php?fid=$fid&tid=$tid&goto=nextoldset"> ‹‹ {lang last_thread}</a> | <a href="redirect.php?fid=$fid&tid=$tid&goto=nextnewset">{lang next_thread} ››</a></div>替换为
复制内容到剪贴板
代码:
<div class="threadflow"><!--{if $lastthread[tid]}--> ‹‹ <a href="viewthread.php?tid=$lasttid">$lastthread['subject']</a><!--{/if}--> <!--{if $lastthread[tid] && $nextthread[tid]}--> | <!--{/if}--> <!--{if $nextthread[tid]}--><a href="viewthread.php?tid=$nexttid">$nextthread['subject']</a> ››<!--{/if}--></div>顺便AD下
引用:
Discuz!专业QQ群:45918770 这里不定期有一些专有插件群里高手众多。不欢迎潜水者和总问简单问题而不成长者,定期清理!
[
本帖最后由 小水水 于 2007-10-30 14:05 编辑 ]
[
本帖最后由 习明 于 2007-11-8 21:37 编辑 ]