XF 1.4 Adsense Text Wrap

cdub

Well-known member
I'm pulling my hair out now. Why won't the text wrap?

I'm trying to put an adsense ad in my message text. I'm posting the following after this line of text in the ad_message_body template:

Code:
<xen:comment> PLACE YOUR ADVERTISEMENT CODE DIRECTLY BELOW </xen:comment>

Here's what I'm posting:

Code:
<xen:if is="!{xen:helper ismemberof, $visitor, 11}">
    <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND !{$message.conversation_id}">

<div style="margin: 2px; float: left;">
       
adsense code

</div>

</xen:if>

</xen:if>

and it still looks like this:

Screenshot 2014-11-21 at 10.40.40 PM.webp
 
The full code of ad_message body is this:

Code:
<xen:if hascontent="true">
   
    <div class="funbox">
    <div class="funboxWrapper">
    <xen:contentcheck>
   
        <xen:if hascontent="true">
            <xen:contentcheck>
                <xen:hook name="ad_message_body" />
               
               
                <xen:comment> PLACE YOUR ADVERTISEMENT CODE DIRECTLY BELOW </xen:comment>


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

<div style="margin:2px; float:left;">
       
ADSENSE CODE

</div>

</xen:if>

</xen:if>

            </xen:contentcheck>
        <xen:elseif is="{$visitor.is_admin} && @uix_previewAdPositions" />
            <div>{xen:phrase 'template'}: ad_message_body</div>
        </xen:if>
   
    </xen:contentcheck>
    </div>
    </div>
   
</xen:if>
 
I have nearly the same in my template and it works. What template are you modifying???

You should only modify the template "ad_message_body" - and this templare by default only contains this:
HTML:
<xen:hook name="ad_message_body" />
Nothing more.
 
I have nearly the same in my template and it works. What template are you modifying???

You should only modify the template "ad_message_body" - and this templare by default only contains this:
HTML:
<xen:hook name="ad_message_body" />
Nothing more.

That worked! :)
 
I'm trying this out again on my site to see how it goes. Results were inconclusive before. I'm showing in the first post of each page in the ""ad_message_body"' and only to guests.

Code:
<xen:hook name="ad_message_body" />

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


<div style="margin: 15px; float: left;">

ADSENSE CODE HERE

</div>



</xen:if>

</xen:if>

You can see it action on this site:

http://www.filmschool.org/
 
Still seeing how it goes... but I'm playing around with the "register and login" to remove in post add link:

Code:
<xen:hook name="ad_message_body" />

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


<div style="margin: 15px; float: left;">

ADSENSE CODE

<br><center><font size="1"><a href="http://www.filmschool.org/login/"  class="inner OverlayTrigger">Register and login to remove this "in post" ad.</a></font>
</center></div>



</xen:if>

</xen:if>
 
Top Bottom