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));

}

}

}

}

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

点赞

发表回复

电子邮件地址不会被公开。必填项已用 * 标注