casavalahar
Gefreiter
- Tham gia
- 28/08/2017
- Bài viết
- 74
- Được Like
- 21
.
Làm sao cho nó chỉ hiển thị qc ở bài viết chính, phàn bình luận ko hiển thị qc vậy anh ?code chính xác phải là
Mình sử dụng post_macros và chèn vào sau đoạn code dưới đây:Mã:<xf:if is="{$post.position} % {$xf.options.messagesPerPage} == 0 AND {$post.Thread.reply_count} > 0"> Ads code here </xf:if>
Kết quả cuối cùng làMã:<xf:if is="$post.isFirstPost()"> <xf:macro template="custom_fields_macros" name="custom_fields_view" arg-type="threads" arg-group="after" arg-onlyInclude="{$thread.Forum.field_cache}" arg-set="{$thread.custom_fields}" </xf:if>
Mã:<xf:if is="$post.isFirstPost()"> <xf:macro template="custom_fields_macros" name="custom_fields_view" arg-type="threads" arg-group="after" arg-onlyInclude="{$thread.Forum.field_cache}" arg-set="{$thread.custom_fields}" </xf:if> <xf:if is="{$post.position} % {$xf.options.messagesPerPage} == 0 AND {$post.Thread.reply_count} > 0"> Ads code here </xf:if>
1. Nếu chỉ muốn hiện ở post chính thì thêm đoạn code:Làm sao cho nó chỉ hiển thị qc ở bài viết chính, phàn bình luận ko hiển thị qc vậy anh ?
<!-- -------->
<center>
<xf:if is="{$post.position} % {$xf.options.messagesPerPage} == 0">
<center>
Chèn code quảng cáo ở đây
</center>
</xf:if>
</center>
<!-- -------->
<!-- -------->
<center>
<xf:if is="{$post.position} % {$xf.options.messagesPerPage} == 0 AND {$post.Thread.reply_count} > 0">
<center>
Chèn code quảng cáo ở đây
</center>
</xf:if>
</center>
<!-- -------->
Mr. Tuấn Mobile/Zalo: 0988 488 096 Telegram: bluekpro Email: [email protected] |