BoonKiong.com2026™

人气 1108

Discuz! 手机触屏版帖子内添加上一篇下一篇

文***已获得官方认证 2022-5-29 22:38

Discuz! 手机触屏版帖子内添加上一篇下一篇

Discuz! 手机触屏版帖子内添加上一篇下一篇


一、打开 template/default/touch/forum/viewthread.htm 模板文件,查找:

  1.                 <!--{if !empty($post['relateitem'])}-->
复制代码


在上面添加:

  1. <!--上一篇下一篇-->
  2.                 <!--{eval $next_t=DB::fetch_first("SELECT tid,subject from ".DB::table('forum_thread')." where fid='$_G[fid]' and tid>'$_G[tid]' and displayorder >= 0 order by tid asc limit 1");}-->
  3.                                 <!--{eval $up_t=DB::fetch_first("SELECT tid,subject from ".DB::table('forum_thread')." where fid='$_G[fid]' and tid<'$_G[tid]' and displayorder >= 0 order by tid desc limit 1");}-->
  4.                                         <div class="t_navigation">
  5.                                                 <p class="up_t">
  6.                                                         <em>上一篇:</em>
  7.                                                         <!--{if empty($up_t)}-->
  8.                                                         <span style="font-size: 14px">已经是最后一篇</span>
  9.                                                         <!--{else}-->
  10.                                                         <a href="/thread-<!--{eval echo $up_t[tid];}-->-1-1.html"><!--{eval echo $up_t[subject];}--></a>
  11.                                                         <!--{/if}-->
  12.                                                 </p>
  13.                                                 <p class="next_t">
  14.                                                         <em>下一篇:</em>
  15.                                                         <!--{if empty($next_t)}-->
  16.                                                         <span style="font-size: 14px">已经是最新一篇</span>
  17.                                                         <!--{else}-->
  18.                                                         <a href="/thread-<!--{eval echo $next_t[tid];}-->-1-1.html"><!--{eval echo $next_t[subject];}--></a>
  19.                                                         <!--{/if}-->
  20.                                                 </p>
  21.                                         </div>                          
  22. <!--上一篇下一篇end-->
复制代码


二、打开 static/image/mobile/style.css 文件,在最下边添加:

  1. /*----------上一篇下一篇----------*/
  2. .t_navigation a{
  3.         font-size: 12px;
  4.         color:#333;
  5.         vertical-align: middle;
  6.         text-decoration: none;
  7. }
  8. .t_navigation a:hover{
  9.         color:red;
  10. }
  11. .up_t{
  12.         margin:20px 0 10px 0;
  13.         overflow: hidden;
  14.         line-height: 10px;
  15. }
  16. .up_t em{
  17.         font-size: 9px;
  18.         color:#ffffff;
  19.         padding: 1px 9px 3px 7px;
  20.         margin:0 10px 5px 0;
  21.         background: #20B09F;
  22.         border-radius:2px 2px 2px 2px;
  23. }
  24. .next_t{
  25.         margin:5px 0 5px 0;
  26.         overflow: hidden;
  27.         line-height: 10px;
  28. }
  29. .next_t em{
  30.         font-size: 9px;
  31.         color:#ffffff;
  32.         padding: 1px 9px 3px 7px;
  33.         margin:0 10px 5px 0;
  34.         background: #20B09F;
  35.         border-radius:2px 2px 2px 2px;
  36. }
  37. /*----------上一篇下一篇end----------*/
复制代码


<
您需要登录后才可以回帖 登录 | 立即注册

您还未登录

随手拍~~:

热门推荐~~:

论坛表情分享...

1、洋葱头 ...

Discuz! X3.5 解决小图标不显示的方法...

我发现大多数使用Discuz! X3.5 都有小图标不能显示的问题,提问的时候大家给的回答都是说跨域的问题, ...

如何在 discuz 帖子里添加 APlayer 音乐播...

1、首先将下边的 APlayer.css 和 APlayer.js 代码下载然后解压上传到服务器。 2、单曲音乐的代 ...

Discuz! 相关帖子功能修改随机显示不依赖标...

打开 source/module/forum/forum_viewthread.php 文件,查找: 换行添加: 再查找: 换行添 ...

Discuz! X3.5 手机版 logo 的路径...

打开以下的模板文件,搜索 logo_m.svg 1.template/default/touch/portal/index.htm 2.template/def ...

热度会员~~:

文強berrybkboonkiongadmin老谟深虑TaC9528huaekinc.t.teoteresabitchJCYSORALIN

免责声明~~:


本站内容来源于合作伙伴及网络搜集,版权归原作者所有。如有侵犯版权,请立刻和本站联系,我们将在三个工作日内予以改正。
Email:hsbk@hotmail.com

服务与条款|隐私政策|免责声明|手机版|小黑屋|网站地图|友链申请| 文强阁

Powered by Discuz! X3.5|© 2001-2026 Discuz! Team. |本站总访问量已经运行: