• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Ads under first post but not conversations?

karoshio

Active member
#1
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.
 

Brogan

XenForo moderator
Staff member
#6
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.
 
#8
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
#10
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
#12
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:
#13
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
#14
<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND {$thread.reply_count} > 0 AND !{$message.conversation_id}">
 

Brogan

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

surfsup

Well-known member
#17
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
#19
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">