日志最终页面 显示上/下一篇日志
①打开 source/space_blog.php找//整理上起一行加://读取下一篇日志
$query = $_SGLOBAL['db']->query("SELECT blogid,subject FROM ".tname('blog')." WHERE blogid>'$id' AND uid='$space' ORDER BY blogid ASC LIMIT 0,1 ");
$blog['next'] = $_SGLOBAL['db']->fetch_array($query);
//读取上一篇日志
$query = $_SGLOBAL['db']->query("SELECT blogid,subject FROM ".tname('blog')." WHERE blogid<'$id' AND uid='$space' ORDER BY blogid DESC LIMIT 0,1 ");
$blog['prev'] = $_SGLOBAL['db']->fetch_array($query);②打开 template/模板目录/space_blog_view.htm
找<!--{if $tracelist || (empty($tracelist) && !$space)}-->上起一行加<div class="status">
上一篇: <!--{if $blog}--><a href="space.php?uid=$blog&do=blog&id=$blog" />$blog</a><!--{else}-->这是第一篇哦.<!--{/if}--><br />
下一篇: <!--{if $blog}--><a href="space.php?uid=$blog&do=blog&id=$blog" />$blog</a><!--{else}-->这是最后一篇哦.<!--{/if}-->
</div>③后台更新"模板缓存"..搞定!
页:
[1]