XF 2.2 How to make Adsense ad look like a post?

You can use "Ads Manager 2" by @Siropu, if you want a solid ad solution (paid!):


AFAIK a post-like looking ad position was recently added.
 
You can use "Ads Manager 2" by @Siropu, if you want a solid ad solution (paid!):


AFAIK a post-like looking ad position was recently added.
I have this addon but I am trying to scale back on using addon's. Just trying to use the built in ad placement. Thanks for the suggestion.
 
You have to look at the template post_macros:

HTML:
<xf:macro name="post"
    arg-post="!"
    arg-thread="!"
    arg-highlightedPosts="{{ [] }}">

    <xf:css src="message.less" />

    <xf:extension name="before"></xf:extension>

    <xf:extension name="extra_classes" value="message--post" />
    <article class="message {{ extension_value('extra_classes') }} js-post js-inlineModContainer {{ $post.isIgnored() ? 'is-ignored' : '' }} {{ $post.isUnread() ? ' is-unread' : '' }}"
        data-author="{{ $post.User.username ?: $post.username }}"
        data-content="post-{$post.post_id}"
        id="js-post-{$post.post_id}">

        <span class="u-anchorTarget" id="post-{$post.post_id}"></span>

        <xf:extension name="full_body">
            <div class="message-inner">
                <xf:extension name="user_cell">
                    <div class="message-cell message-cell--user">
                        <xf:macro template="message_macros" name="user_info" arg-user="{$post.User}"
                            arg-fallbackName="{$post.username}"/>
                    </div>
                </xf:extension>

                <xf:extension name="main_cell">
                    <div class="message-cell message-cell--main">
                    <xf:extension name="main_cell_inner">
                        <div class="message-main js-quickEditTarget">

                            <xf:extension name="attribution">
                                <xf:macro name="post_attribution" arg-post="{$post}" arg-thread="{$thread}" />
                            </xf:extension>

                            <div class="message-content js-messageContent">
                            <xf:extension name="content">

                                <xf:extension name="notices">
                                    <xf:macro name="post_notices" arg-post="{$post}" arg-thread="{$thread}" />
                                </xf:extension>

                                <xf:extension name="user_content">
                                    <xf:macro name="post_user_content" arg-post="{$post}" arg-thread="{$thread}" />
                                </xf:extension>

                                <xf:extension name="after_content">
                                    <xf:macro name="post_last_edit" arg-post="{$post}" />
                                </xf:extension>

                                <xf:extension name="signature">
                                    <xf:macro template="message_macros" name="signature" arg-user="{$post.User}" />
                                </xf:extension>

                            </xf:extension>
                            </div>

                            <xf:extension name="footer">
                                <xf:macro name="post_footer" arg-post="{$post}" arg-thread="{$thread}" />
                            </xf:extension>
                        </div>

                    </xf:extension>
                    </div>
                </xf:extension>
            </div>
        </xf:extension>
    </article>

    <xf:extension name="after"></xf:extension>
    <xf:ad position="post_below_container" arg-post="{$post}" />
</xf:macro>
 
Back
Top Bottom