- UID
- 1
- 阅读权限
- 200
- 注册时间
- 2022-3-27
- 积分
- 2584
- 最后登录
- 2025-2-7
TA的每日心情 | 擦汗 2023-7-12 20:55 |
---|
签到天数: 8 天 连续签到: 8 天 [LV.3]偶尔看看II
管理员
- 积分
- 2584
   
|
①打开 template/default/forum/viewthread_node.htm 模板文件,查找:
- <!--{if !empty($post['relateitem'])}-->
复制代码
在上边添加:
- <!--上一篇下一篇-->
- <!--{eval $next_t=DB::fetch_first("SELECT tid,subject from ".DB::table('forum_thread')." where fid='$_G[fid]' and tid>'$_G[tid]' order by tid asc limit 1");}-->
- <!--{eval $up_t=DB::fetch_first("SELECT tid,subject from ".DB::table('forum_thread')." where fid='$_G[fid]' and tid<'$_G[tid]' order by tid desc limit 1");}-->
- <div class="t_navigation">
- <p class="up_t">
- <em>上一篇:</em>
- <a href="/thread-<!--{eval echo $up_t[tid];}-->-1-1.html"><!--{eval echo $up_t[subject];}--></a>
- </p>
- <p class="next_t">
- <em>下一篇:</em>
- <a href="/thread-<!--{eval echo $next_t[tid];}-->-1-1.html"><!--{eval echo $next_t[subject];}--></a>
- </p>
- </div>
- <!--上一篇下一篇end-->
复制代码
②打开 template/default/common/common.css 文件,在最下边添加:
- /*----------上一篇下一篇----------*/
- .t_navigation a{
- font-size: 14px;
- color:#333;
- vertical-align: middle;
- text-decoration: none;
- }
- .t_navigation a:hover{
- color:red;
- }
- .up_t{
- margin:20px 0 10px 0;
- overflow: hidden;
- line-height: 22px;
- }
- .up_t em{
- font-size: 12px;
- color:#ffffff;
- padding: 1px 9px 3px 7px;
- margin:0 10px 5px 0;
- background: #3DA2C2;
- }
- .next_t{
- margin:5px 0 5px 0;
- overflow: hidden;
- line-height: 22px;
- }
- .next_t em{
- font-size: 12px;
- color:#ffffff;
- padding: 1px 9px 3px 7px;
- margin:0 10px 5px 0;
- background: #3DA2C2;
- }
- /*----------上一篇下一篇end----------*/
复制代码 |
上一篇:Discuz 让发帖的附件选项默认打开下一篇:Discuz 相关帖子功能开启方法
|