discuz 只调用回复回复楼代码
类别:建站知识   时间:10-12

在帖子内容页,1楼(主题帖)与回复帖代码:

<!--{eval $postcount = 0;}-->        <!--{loop $postlist $post}-->                <!--{if $rushreply && $_GET['checkrush'] && $post['rewardfloor'] != 1}-->                        <!--{eval continue;}-->                <!--{/if}-->                <div id="post_$post[pid]" {if $_G['blockedpids'] && $post['inblacklist']}style="display:none;"{/if}>                        <!--{subtemplate forum/viewthread_node}-->                </div>                <!--{eval $postcount++;}-->        <!--{/loop}-->        复制代码

其中的
<div id="post_$post[pid]" {if $_G['blockedpids'] && $post['inblacklist']}style="display:none;"{/if}>
<!--{subtemplate forum/viewthread_node}-->
</div>
复制代码
为主题帖与回复楼公同使用,如果只调用回复楼,不调用1楼主题帖,则:
<!--{eval $postcount = 0;}--><!--{loop $postlist $post}--><!--{if $rushreply && $_GET['checkrush'] && $post['rewardfloor'] != 1}--><!--{eval continue;}--><!--{/if}--><!--{if !$post['first'] && $_G['forum_thread']['replies']}--><div id="post_$post[pid]" class="box"><!--{subtemplate forum/viewthread_node}--></div><!--{/if}--><!--{eval $postcount++;}--><!--{/loop}-->复制代码

第6行做了判断:不是1楼,并有回复。
---------------------------------------------------------
如果只调用1楼,不调用回复:
<!--{eval $postcount = 0;}--><!--{loop $postlist $post}--><!--{if $rushreply && $_GET['checkrush'] && $post['rewardfloor'] != 1}--><!--{eval continue;}--><!--{/if}--><!--{if $post['first']}--><div id="post_$post[pid]" class="box"><!--{subtemplate forum/viewthread_node}--></div><!--{/if}--><!--{eval $postcount++;}--><!--{/loop}-->

第6行做了判断:1楼。

智慧半岛,是一家专注于青岛网站建设青岛网站开发的青岛网络公司,Copyright ©2007-2019 Ebandao.Cn 版权所有 All Rights Reserved.(建议在1366x768以上的浏览器中访问)鲁ICP备08014496号

13153297890