Mike Fara
Active member
This code works great, however:
When there are no replies, two block ads appear instead of one. Basically I am floating two ads on the first post and last post of each thread page. It is working, except when theres zero replies. In that case, TWO ads get placed in the same post.
Does anyone have a solution on how one would solve this one? TY
Code:
<xen:hook name="ad_message_body" />
<xen:if is="!{xen:helper ismemberof, $visitor, 312}">
<xen:if is="({$post.position} % {$xenOptions.messagesPerPage} == 0 AND !{$message.conversation_id})">
<div style="float: right;">
AD_CODE
</div>
</xen:if>
<xen:if is="({$post.position} % {$xenOptions.messagesPerPage} == {$xenOptions.messagesPerPage} - 1 OR {$post.position} == {$thread.reply_count} AND !{$message.conversation_id})">
<div style="float: right;">
AD_CODE
</div>
</xen:if>
</xen:if>
When there are no replies, two block ads appear instead of one. Basically I am floating two ads on the first post and last post of each thread page. It is working, except when theres zero replies. In that case, TWO ads get placed in the same post.
Does anyone have a solution on how one would solve this one? TY