Resource icon

Visual List of Ad Locations

For the first, use the ad_message_body template.
This is mine:
Code:
<xen:hook name="ad_message_body" />

<style type="text/css">
.message-body-dynamic {
width: 125px;
height: 125px;
}

@media(min-width: 360px) {
    .message-body-dynamic {
    width: 180px;
    height: 150px;
    }
}

@media(min-width: 640px) {
    .message-body-dynamic {
    width: 300px;
    height: 250px;
    }
}
</style>

<xen:if is="!{$visitor.user_id}">
    <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0">
        <xen:if is="@enableResponsive">
            <div style="min-height: 150px; margin-left: 8px; float: right">
                <script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
                <!-- Message Body - Dynamic -->
                <ins class="adsbygoogle message-body-dynamic"
                    style="display:inline-block"
                    data-ad-client="ca-pub-12345678"
                    data-ad-slot="987654321"></ins>
                <script>
                (adsbygoogle = window.adsbygoogle || []).push({});
                </script>
            </div>
        <xen:else />
            <div style="min-height: 150px; margin-left: 8px; float: right">
                <script type="text/javascript">
                google_ad_client = "ca-pub-4545465645";
                /* Message Body */
                google_ad_slot = "3445565645";
                google_ad_width = 300;
                google_ad_height = 250;
                </script>
                <script type="text/javascript"
                src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
                </script>
            </div>
        </xen:if>
    </xen:if>
</xen:if>

For the second, use the ad_sidebar_below_visitor_panel template.

Edit: Just realised it's the thread list, you will need to create a custom template and edit the forum_view template accordingly.
 
The ad_message_body will add something to all messages, is it possible to add it only to specific ones?

Something like first message?

And would it also be possible to let’s say message 1, 5 and 10. And for it to happen on every page of the thread, so that on page 2 message 1, 5 and 10 of that page also display that ad for example?
 
For the first, use the ad_message_body template.
This is mine:
Code:
<xen:hook name="ad_message_body" />

<style type="text/css">
.message-body-dynamic {
width: 125px;
height: 125px;
}

@media(min-width: 360px) {
    .message-body-dynamic {
    width: 180px;
    height: 150px;
    }
}

@media(min-width: 640px) {
    .message-body-dynamic {
    width: 300px;
    height: 250px;
    }
}
</style>

<xen:if is="!{$visitor.user_id}">
    <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0">
        <xen:if is="@enableResponsive">
            <div style="min-height: 150px; margin-left: 8px; float: right">
                <script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
                <!-- Message Body - Dynamic -->
                <ins class="adsbygoogle message-body-dynamic"
                    style="display:inline-block"
                    data-ad-client="ca-pub-12345678"
                    data-ad-slot="987654321"></ins>
                <script>
                (adsbygoogle = window.adsbygoogle || []).push({});
                </script>
            </div>
        <xen:else />
            <div style="min-height: 150px; margin-left: 8px; float: right">
                <script type="text/javascript">
                google_ad_client = "ca-pub-4545465645";
                /* Message Body */
                google_ad_slot = "3445565645";
                google_ad_width = 300;
                google_ad_height = 250;
                </script>
                <script type="text/javascript"
                src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
                </script>
            </div>
        </xen:if>
    </xen:if>
</xen:if>

For the second, use the ad_sidebar_below_visitor_panel template.

Edit: Just realised it's the thread list, you will need to create a custom template and edit the forum_view template accordingly.


Is there a way to add it after, say, the first post, 10th post, x post etc etc?
 
It can take some time for ads to start displaying.

Check in your AdSense account that the ad slots are active.
 
Noob here:unsure:

You mean this?
AdSense.webp

I also see this..

AdSense.webp

What concerns me is that I don't even see a blank frame here:

of a legend.webp
 

Attachments

  • AdSense.webp
    AdSense.webp
    24.5 KB · Views: 0
The ad is wider than the sidebar.

Increase the width of the sidebar or use a smaller ad.
 
Top Bottom