<xen:hook name="ad_message_body" />
<xen:if is="{$post.position} == 0 AND !{$message.conversation_id}">
<div style="float: right">
Ad content here
</div>
</xen:if>
Brogan: You are Awesome!Use the ad_message_body template and float the content right.
Use a conditional to restrict it to the first post: http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-182355
Like this:
Code:<xen:hook name="ad_message_body" /> <xen:if is="{$post.position} == 0 AND !{$message.conversation_id}"> <div style="float: right"> Ad content here </div> </xen:if>
<xen:hook name="ad_message_body" />
<xen:if is="{$post.position} == 0 AND !{$message.conversation_id}">
<div style="min-height: 250px">
<div style="float: right; padding-left: 5px">
Ad content here
</div>
</div>
</xen:if>
Hi Brogan. This works well. Just a little problem. If the post has attachment, then the attachment section in post runs into the ad-spot. Is it possible to limit the size of attachment section so that it does not mess with the advertisement?<div style="float: right; padding-left: 5px">
Oh I missed the second point. Use this code instead:
Code:<xen:hook name="ad_message_body" /> <xen:if is="{$post.position} == 0 AND !{$message.conversation_id}"> <div style="min-height: 250px"> <div style="float: right; padding-left: 5px"> Ad content here </div> </div> </xen:if>
Quoting myself. Can someone suggest a CSS fix for this issue?Hi Brogan. This works well. Just a little problem. If the post has attachment, then the attachment section in post runs into the ad-spot. Is it possible to limit the size of attachment section so that it does not mess with the advertisement?
You are - A-W-E-S-O-M-E-S-T!<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND !{$message.conversation_id}">
<div style="float: right; padding-left: 5px">
Oh I missed the second point. Use this code instead:
Code:<xen:hook name="ad_message_body" /> <xen:if is="{$post.position} == 0 AND !{$message.conversation_id}"> <div style="min-height: 250px"> <div style="float: right; padding-left: 5px"> Ad content here </div> </div> </xen:if>
How do you get this code to fall at the bottom of the first post rather than the top? That is, after the post text, not before, and to the left, not right? Thanks.
We use essential cookies to make this site work, and optional cookies to enhance your experience.