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

Ad Templates

Discussion in 'XenForo Questions and Support' started by kuyenmotdivad, Mar 16, 2011.

  1. kuyenmotdivad

    kuyenmotdivad Active Member


    Can Ad Templates do this, like this guy as added adsense to his header and footer : http://www.8wayrun.com/forum/

    If it cant be done with Ad Templates, any idea how it can be done?

  2. Brogan

    Brogan XenForo Moderator Staff Member

    Just add the AdSense code to the ad template.
  3. kuyenmotdivad

    kuyenmotdivad Active Member

    which template as I tried adding it to most of them and it does not go in the same place as the website above.
  4. Brett Peters

    Brett Peters Well-Known Member

    Have you seen this thread ?
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The top banner would be this template:

    Admin CP -> Appearance -> Templates -> ad_above_top_breadcrumb

    Use this code to center it:

    <div style="text-align: center;">
    The bottom banner would be this template:

    Admin CP -> Appearance -> Templates -> ad_below_content
    erich37, Taner, Veer and 2 others like this.
  6. Ryan Kent

    Ryan Kent Well-Known Member

    I'm looking for a conditional which is not (yet) in Brogan's FAQ.

    I would like to show ads to everyone except premium members and my "regular" members with more then ?100 posts. My thinking is if a member contributes directly with $$ or indirectly with content, they are adding value to the community.

    How can I do a conditional If member.postcount <100 show ad?
  7. Russ

    Russ Well-Known Member

    You could always set it so users get out of a certain group once they hit 100+ posts, then make it so the conditional works for the group under 100 posts.
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Use this:

    <xen:if is="{$visitor.message_count} < 100">
    Ray, GeeksChat and Oracle like this.
  9. CyclingTribe

    CyclingTribe Well-Known Member

    Can you use similar conditionals on any of the database fields?

    Shaun :D
  10. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    In general, yes. message_count comes from xf_user.message_count in the database.
    Oracle likes this.
  11. CyclingTribe

    CyclingTribe Well-Known Member


    There's a lot to learn, but there's also a certain simplicity to it as well. I think I'm going to enjoy playing with XF. (y)
  12. Ryan Kent

    Ryan Kent Well-Known Member

    I have noticed the new ad_ templates which were added in 1.0.0. I have used each of them today. Many of them worked perfectly. Some had CSS issues but otherwise work. There are 4 ads that I cannot locate anywhere. I switched to Default template and tried, searched every part of the site and still could not locate these ads. Can anyone tell me if the below 4 templates are working?

  13. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    > ad_forum_view_above_node_list

    That shows inside of a forum, but only when that forum contains subforums.

    > ad_member_view_above_messages

    On the profile page, in the Profile Posts tab.

    > ad_member_view_below_avatar

    Also on the profile page, underneath the big avatar on the top left of the profile.

    > ad_member_view_sidebar_bottom

    Also on the profile page, at the bottom of the sidebar on the left of the profile.
  14. Ryan Kent

    Ryan Kent Well-Known Member

    I went on to my profile page by choosing "Your Profile Page" from the moderation bar. I placed ads in each of the ad_member_view templates. The ads are 250x250 boxes which worked perfectly on the sidebar in the other templates. I refreshed numerous times and still cannot see the ads.

    I checked the member_view template and I can see the xen include statements within the template. I can also see the 3 tabs brought up when I open the member_view. I have confirmed that the templates are from the style I am viewing. I have duplicated this process for the Default template. For some reason the process simply isn't working for the profile page. I am on my admin account.

    Ok, scratch the above. It works when I view from a "regular" account but not from the admin account. I do not see any conditionals related to admin so I am not sure why the ads would not appear for my admin acct? Both pc's are using FF browsers v3.6
  15. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I don't have that problem.

    Maybe you are viewing a different style with your admin account?
  16. principia

    principia Well-Known Member

    I can also see all ads as an admin. using chrome and flexile orange.
  17. Ryan Kent

    Ryan Kent Well-Known Member

    my fault....

    AdBlock plus. For some reason it didn't block the other ads but blocked the ones on this page. I love that add-on but what a headache it gave me today!
  18. CyclingTribe

    CyclingTribe Well-Known Member

    :) ... it's always the little things that cause us the problems.

    I'm really liking the XF templates ... :D
  19. erich37

    erich37 Well-Known Member

    when I go to the template named "ad_below_content", then I see the following default code in this template:

    <xen:hook name="ad_below_content" />
    How do I put my banner-code into this template?

    underneath the default code or in between the default code ? Or do I need to delete this hook-code in that template?
    Not sure how to do this??
  20. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Just put it underneath. Make a new line.
    erich37 likes this.

Share This Page