XF 1.5 Message and ad under first post?


Active member
I would like to have a box under each thread's first post within which I could place place text, and a banner ad to be visible to non-supporting members only.

I'l looking for suggestions how to implement this.



Active member
This is what I came up with.

<xen:hook name="ad_message_below" />

<xen:if is="!{xen:helper ismemberof, $visitor, 4, 5, 45, 54, 55, 56, 62, 68}">
<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND !{$message.conversation_id}">
    <xen:if is="!{$visitor.user_id}">
     <li class="message">
            <div class="messageUserInfo" itemscope="itemscope" itemtype="http://data-vocabulary.org/Person">
                <div class="messageUserBlock">
                    <div class="avatarHolder">
                        <span class="helper"></span>
                        <xen:avatar user="$visitor" size="m" img="true" />
                    <h3 class="userText">
                    <span style="font-weight: bold">Support EF</span>
                    <em class="userTitle" itemprop="title"></em>
                    <span class="arrow"><span></span></span>
            <div class="messageInfo primaryContent">
                <div class="messageContent">
                        <blockquote class="messageText ugc baseHtml">
                          style type="text/css">
.overtaking-top-dynamic {
width: 320px;
height: 50px;

@media(min-width: 484px) {
    .overtaking-top-dynamic {
    width: 468px;
    height: 60px;

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- xen_below_message -->
<ins class="adsbygoogle"
(adsbygoogle = window.adsbygoogle || []).push({});
                            <br /><br /><label for="LoginControl"><span style="font-weight: bold; color: #004400"><a href="login/" class="concealed noOutline">Log in or Sign up</a></span></label> to hide all adverts.

I chose to exclude so many user groups because I wasn't sure what would happen if I tried to serve to just the "Registered" group, since Xenforo wants all members to be in the "registered" group.

In fact I am trying to show the ads to registered and unregistered members , and exclude my "Elite" group, moderators, admin, etc.

The code above shows the new post with the avatar, etc, but it's also showing some of the code instead of rendering it. What did I goof up on?