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

XF 1.3 Adsense in the first message of page

Cidrack

Active member
#3
I Read anytimes but I realy have dificult to understand how to work with This codes and do what I want in the first post... And more dificult with the English...

Thank You very much.
 

Brogan

XenForo moderator
Staff member
#4
Use the ad_message_body template.

Code:
<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0">
AdSense code
</xen:if>
You will need to apply styling such as float:right, margins, etc.
 

Cidrack

Active member
#5
Hi brogan.... Thank You again.... This is my code but....

How and where I put code to apply styling to look same This page?
http://www.drummerworld.com/forums/showthread.php?t=20547



<xen:hook name="ad_message_body" />
<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Dentro da Mensagem -->
<ins class="adsbygoogle"
style="display:inline-block;width:300px;height:250px"
data-ad-client="ca-pub-1454635887431753"
data-ad-slot="6076968025"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push(\{\});
</script>
</xen:if>
 

Cidrack

Active member
#8
Sorry, I Know, but I didnt understand how and where put the Styles...

I Think is This:

<xen:hook name="ad_message_body" />
<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0">
<div style="float: right">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Dentro da Mensagem -->
<ins class="adsbygoogle"
style="display:inline-block;width:300px;height:250px"
data-ad-client="ca-pub-1454635887431753"
data-ad-slot="6076968025"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push(\{\});
</script>
</div>
</xen:if>