XF 1.5 Exclude ad in some forums

gavpeds

Active member
I am using the ad_thread_view_below_messages to display ads. What i want to do though is not show this ad in some forums. Can i use a conditional for this? I tried searching but could not find the one i needed.
 
Right so I am trying to get an ad to show after first post in all threads. I have the below however it seems to be trying to show ads after every post.

I have this in ad_message_below.

Code:
<xen:if is="!in_array({$forum.node_id}, array(54, 138, 164, 49, 160, 148))">
Advertisement
<br>
<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND !{$message.conversation_id}">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- myad -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-000000000"
     data-ad-slot="00000000"
     data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</xen:if>
</xen:if>
 
While I realize this is 1.5 I couldn't find anything for 2.0 and the code is somewhat different. I'd like to include it here for reference.

Code:
 <xf:if is="!in_array({$__globals.forum.node_id}, [93, 44, 12])">
 
Top Bottom