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

XF 1.2 Posts per Page Settings, Adverts and Usergroups

Discussion in 'XenForo Questions and Support' started by Paul Murphy, Jan 15, 2014.

  1. Paul Murphy

    Paul Murphy Member

    Hi everyone,

    I recently bought Xenforo and I am very pleased with it so far, but I have a couple of questions.

    I am going to put some Adsense banners on the site, nothing too excessive but would I be able to limit which usergroups these appear to? I'd like there to be more for guests and none for donators, that kind of thing, can it be done?

    Also I have had an influx of members from another board, they are used to 50 posts per page and whilst i know where the setting is to change this, I would not like a forum wide change, can I have usergroups with custom settings for this?

    Thanks in advance. :)
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Paul Murphy likes this.
  3. Paul Murphy

    Paul Murphy Member

    Thanks Brogan, I'll have a look at the resource. Is user selected/user group page settings something that would be considered in the future, or do you know of a modification which would add the feature?
  4. Brogan

    Brogan XenForo Moderator Staff Member

    There are several ad managers available as far as I am aware: http://xenforo.com/community/resources/

    I'm not familiar with any of them though, I just use conditional statements; I set it up once and haven't had to touch it since so it works for me.

    And now I realise you were asking about the posts per page setting :D

    I'm not sure if there's an add-on available for that, you would need to check.
    Paul Murphy likes this.
  5. Paul Murphy

    Paul Murphy Member

    Hi guys and @Brogan,

    I've been looking at the adsense resource and I really cannot make any sense of it. I'm not the best at this kind of thing at the best of times but I'm not sure how to implement the code that is there. Basically I want to have it so it either shows a 320x100, 460x60 or 728x90 banner, both on the main page and also on post pages. I get that the code is linked to the ad type on XF, but does it have to have the "/* Thread List Below Stickies Responsive 2 */" parts in it, for example?
  6. Brogan

    Brogan XenForo Moderator Staff Member

    That is just comments and isn't required.
    Paul Murphy likes this.
  7. Paul Murphy

    Paul Murphy Member

    Cheers Brogan, so in a nutshell I can keep it simple like this and it will work? Obviously with my account details in there.

    <script type="text/javascript">
    google_ad_client = "ca-pub-id";
    width = document.documentElement.clientWidth;
    google_ad_slot = "123456890"; google_ad_width = 320; google_ad_height = 50;
    if (width > 483) {
    google_ad_slot = "123456890"; google_ad_width = 468; google_ad_height = 60;
    if (width > 743) {
    google_ad_slot = "123456890"; google_ad_width = 728; google_ad_height = 90;
    <script type="text/javascript"

    Or would it be easier/better to create new adsense codes that are like in the beta category?
  8. Brogan

    Brogan XenForo Moderator Staff Member

    Yes, that will work.

    It needs to be one of the new responsive ad slots though.
  9. Paul Murphy

    Paul Murphy Member

    I feel quite stupid now, I used a new ad unit with the Beta settings, and posted it in the ad section with the CSS styling that is recommended and without it, it just seems to work either way.


    Is the CSS styling necessary? I've checked the ad on mobile, Vita and laptop and it all works without any issues.
  10. Brogan

    Brogan XenForo Moderator Staff Member

    No, the styling is optional, depending on how you want the ads to display.
    Paul Murphy likes this.

Share This Page