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

Adsense after first post?

Discussion in 'XenForo Questions and Support' started by Stan, May 7, 2011.

  1. Stan

    Stan Active Member

    How would I go about adding Adsense after the first post and only after the first post?
     
  2. Walter

    Walter Well-Known Member

    In the template ad_message_below use the xen:if e.g. this way

    PHP:
    <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0">
    <
    div style="text-align: center;">
    .... 
    your adsense invoke code ....

    </
    div>
    </
    xen:if>
     
  3. Brogan

    Brogan XenForo Moderator Staff Member

    If you want the ad banner to be completely outside the first post, add </li><li> to the start of the code Walter posted above.
     
    WoodiE likes this.
  4. Despair

    Despair Active Member

    Not sure if it's a bug or not, but IIRC adding any opening or closing tags between list elements will result in problems with inline editing on that first post. The post will still edit, but the rest of the javascript fails to run (re-adding the post and removing the loading indicator). Has that been fixed (I'm still on an old version)?
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    I just tested it on my local installation and it worked fine.
     
  6. Despair

    Despair Active Member

    I just upgraded to 1.0.2 and was just testing this again, still didn't manage to get it to work. It may be related to this:
    Although if that is the case, not sure why you had it working just fine.
     
  7. principia

    principia Well-Known Member

    you can use "rotating ads" addon. thers an option for this.
     

Share This Page