discuz 只调用回复回复楼代码

2019-12-17

在帖子内容页,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楼。

《discuz 只调用回复回复楼代码.doc》

下载本文的Word格式文档,以方便收藏与打印。