Showing Ads In Multiple Posts?

anthony parsons

Verified Customer
#1
Hi,

I want to show ads in posts 0, 4, 8 and I used to do so via using a xen:if, such as:

<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND !{$message.conversation_id}">

Now I've tried using the custom hook method and inserting a wrapper template using:

<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND !{$message.conversation_id}">

</xen:if>

<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 4 AND !{$message.conversation_id}">

</xen:if>

<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 8 AND !{$message.conversation_id}">

</xen:if>

But that only creates a huge error and does nothing.

I've tried creating separate zones, choosing the ad message in body option, checking the box to use a specific post position, but when you use more than one zone like this, none of them work.

How can I show ads in several posts in the same thread using this?
 

anthony parsons

Verified Customer
#2
Ok, disregard.... I worked out that this can be done by using the XF ad templates and using the zone embed code.

That is a nice touch... thank you for that. Sorry... learning and I'm a little silly obviously right now trying to work out the system.
 
Top