管理員
積分信息:
威望:6087
金錢:9076866
貢獻:6198
儲蓄:2146643647
|
第一步
source/module/forum/forum_index.php
找到
下面添加
- if(defined('IN_MOBILE')) {
- $sql = "SELECT a.*,b.*,c.* FROM ".DB::table('forum_thread')." a inner join ".DB::table('forum_forum')." b on a.fid=b.fid inner join ".DB::table('forum_post')." c on a.tid=c.tid and c.first=1 where a.displayorder>=0 AND a.fid<>189 AND a.fid<>190 ORDER BY a.tid DESC LIMIT 0,50";
- $query = DB::query($sql);
- $loglist = $loglists = array();
- while($loglist = DB::fetch($query)){
- $loglists[] = $loglist;
- }
- }
複製代碼
第二步
template/default/mobile/forum/discuz.htm
找到:
- <!--{hook/index_top_mobile}-->
複製代碼
下面添加
- <script>
- function showmore(){
- document.getElementById("newthread").style.overflow="";
- document.getElementById("newthread").style.height="";
- }
- </script>
- <style>
- .newthread{border-bottom:#EEE 1px solid; padding:2px 0;}
- .newthread span{font-size:0.8em; color:#BBB;}
- </style>
- <div class="bm"><div class="bm_h">最新貼</div></div>
- <div id="newthread" style="height:14em; overflow:hidden">
- <!--{loop $loglists $loglist}-->
- <div class="newthread">
- <a href="forum.php?mod=viewthread&tid={$loglist['tid']}&mobile=yes">{$loglist['subject']}</a><br/>
- <span>{$loglist['author']} <!--{eval echo date("H:i",$loglist['dateline']);}--> 回復:{$loglist['replies']}</span>
- </div>
- <!--{/loop}-->
- </div>
- <div id="showmore" onclick="showmore()" style="text-align:center; height:2em; line-height:2em;
- background:#EEE;">顯示更多新帖▼</div>
複製代碼
|
|