慕容的工作随笔

慕容的工作随笔

记录学习和工作

DiscuzX3楼主贴每页显示,不翻页的修改

2015-07-11 16:39:50

在:source\module\forum目录下forum_viewthread.php文件中找到:

$_G['forum_thread']['replies'] = $temp_reply;

}


下面增加如下代码:

##########楼主贴不翻页开始###########

$threadpid=0;

if($_G[‘page’]>1){

$post=DB::fetch_first(“SELECT p.* FROM “.DB::table(“forum_post”).” p WHERE p.tid=’{$_G[’tid’]}’ AND p.first=1 limit 1”);

if($post){

$threadpid=$post[‘pid’];

if(($onlyauthoradd && $post[‘anonymous’] == 0) || !$onlyauthoradd) {

$postlist[$post[‘pid’]] = $post;

$postusers[$post[‘authorid’]] = array();

if($post[‘first’]) {

$_G[‘forum_firstpid’] = $post[‘pid’];

$metadescription = str_replace(array("\r", “\n”), ‘’, messagecutstr(strip_tags($post[‘message’]), 160));

}

}

}

}

##########楼主贴不翻页结束###########

评论 (0)

还没有评论,来做第一个吧。

发表评论

提交后需管理员审核通过后显示