Question: How can I get the ads to not show up in Conversations?Add this to the message template, below the <li> tag:
Code:<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0"> <div class="right_block"> <!-- Ad code here --> </div> </xen:if>
Add this to the extra.css template:
Code:.messageList .message:first-child .messageInfo.primaryContent { margin-right: 310px; } .messageList .message:first-child .right_block { float:right; height:250px !important; width:300px !important; }
Question: How can I get the ads to not show up in Conversations?
.conversation_view .messageList .message:first-child .messageInfo.primaryContent { margin-right: inherit; }
.conversation_view .messageList .message:first-child .right_block
{
display:none;
}
I'm going to annoy you with three more questions:
- How can I get the text to wrap around the ad? As it stands right now, the right side has a buffer of 310px all the way down to the end of the post (including the area where it says "Like Reply Share".
- I can get the ads to only show for guests, but I can't get the 310px buffer to go away for logged-in members.
- How can I format it to look nicer like the IGN ads?View attachment 30563
The gap is intentional and part of the ad layout. To do what you want there is an ad template you can use (I think anyways).
Add <xen:if is="!{$visitor.user_id}"> </xen:if> around the CSS and ad code in the template.
This is a different style of ad layout, but you can use .right_block to style the ad block. You will need to take margin and padding into account the CSS code however.
<xen:hook name="message_content" params="{xen:array 'message={$message}'}">
...
<!-- Z - Publicité droite premiers message -->
<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND {$xenOptions.XenCrea_Ads_AddonActive} == 1 AND {$xenOptions.XenCrea_Ads_AdsForRegisterMember} == 0">
<div id="firstMessageRightBloc">
<div class="firstMessageRightBlocLabel">{$xenOptions.XenCrea_Ads_Title}</div>
<div class="firstMessageRightBlocAds">{$xenOptions.XenCrea_Ads_Script}</div>
</div>
<div class="messageContent messageContentFirstPostMinHeight">
<xen:else/>
<div class="messageContent">
</xen:if>
<!-- /Z -->
<!-- Z REMOVE <div class="messageContent"> -->
<article>
...
We use essential cookies to make this site work, and optional cookies to enhance your experience.