Ads under first post but not conversations?

karoshio

Active member
So,

I'm using

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

</xen:if>

To display an add under only the first post each post and each page of each post but I now noticed this also displays in conversations..

Is there any way to avoid this as it just looks really bad in conversations and if you have a smaller monitor the ad goes under the sidebar.
 

Diablotic

Active member
To extend that - how would the line look like if I wanted to show ads after first post AND after first conversation message?
 

Brogan

XenForo moderator
Staff member
Just remove the check for the conversation message, like so:

<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == x">

That will work after the first post on every page.
 

Diablotic

Active member
Hmm this will show ads under EVERY conversation message but I want it to show only under the first one
 
Hmm this will show ads under EVERY conversation message but I want it to show only under the first one
bump, i'd like to know aswell.

I want a code that will display an ad under only the first post and disable it for more than one group so it will show to everyone besides my 2 donator groups. Thanks!
 

Russ

Well-known member
Bumping this... using Brogan's reference here:

Code:
<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == x">
In conversations it'll display in every message, any hint to this at all?
 

Russ

Well-known member
What do you want to do?
Sorry, display inside the first post on every page, that snippit I provided works for regular forum threads, but in conversations it shows on every single message.

EDIT: And yes the goal would be to show in every regular thread + conversations on the first post of every page.


I guess @Diablotic had the same problem but it was never answered in this thread.

http://xenforo.com/community/threads/ads-under-first-post-but-not-conversations.29790/#post-501183
 
Last edited:

mbt131

Member
I am using these.I want to show my ads every page's first message body and below ? How can I do it?

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

Brogan

XenForo moderator
Staff member
<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND {$thread.reply_count} > 0 AND !{$message.conversation_id}">
 

Brogan

XenForo moderator
Staff member
I don't really understand what you're asking but that single conditional statement incorporated both of yours.
 

surfsup

Well-known member
Any update to this? It would be awesome if we could get the banner ad under the 1st post in thread and 1st post in conversations, cause right now the ad will appear under each post in convos....any fix?
 

Beanjam

Active member
Could somebody please tell me the difference between these? I've seen both ways mentioned.

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

... or ...

<xen:if is="{$post.position} == 0">
 
Top