修改方法:
文件1:source\module\portal\portal_view.php
查找:
- include_once template("diy:portal/view:{$article['catid']}");
[color=rgb(0, 94, 175) !important]复制代码
上面增加:
- /*门户阅读页显示上下篇文章 BY:cr180*/
- $query = DB::query("SELECT a.aid, a.title FROM ".DB::table('portal_article_title')." AS a WHERE a.aid<$id ORDER BY a.aid DESC limit 1");
- $cr180_last = DB::fetch($query);
- if (!empty($cr180_last['title'])){$cr180_lasts = "上一篇:<a href=\"portal.php?mod=view&aid=$cr180_last[aid]\">$cr180_last[title]</a>";}else{$cr180_lasts = "上一篇:没有了";}
- $query = DB::query("SELECT a.aid, a.title FROM ".DB::table('portal_article_title')." AS a WHERE a.aid>$id ORDER BY a.aid ASC limit 1");
- $cr180_next = DB::fetch($query);
- if (!empty($cr180_next['aid'])){$cr180_nexts = "下一篇:<a href=\"portal.php?mod=view&aid=$cr180_next[aid]\">$cr180_next[title]</a>";}else{$cr180_nexts = "下一篇:没有了";}
- /*门户阅读页显示上下篇文章 BY:cr180 END*/
[color=rgb(0, 94, 175) !important]复制代码
文件2:template\default\portal\view.htm
本帖隐藏的内容查找:
- <!--[diy=diycontentrelatetop]--><div id="diycontentrelatetop" class="area"></div><!--[/diy]-->
[color=rgb(0, 94, 175) !important]复制代码
下面增加:
- <style>
- /*门户阅读页显示上下篇文章 BY:cr180*/
- .cr180nextitle { height:auto; overflow:hidden; padding:3px 5px}
- .cr180nextitle span{ font-weight:bold; display:block; float:left; width:50%; height:21px; line-height:21px; overflow:hidden}
- .cr180nextitle span a { font-weight:normal}
- /*门户阅读页显示上下篇文章 BY:cr180 END*/
- </style>
- <div class="bm cr180nextitle"><span style="float:right">$cr180_nexts</span><span>$cr180_lasts</span></div>
[color=rgb(0, 94, 175) !important]复制代码
[color=rgb(0, 94, 175) !important]
|