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

XF 1.1 BuySellAds Leaderboard in xenForo

Discussion in 'XenForo Questions and Support' started by Marco Famà, Mar 20, 2013.

  1. Marco Famà

    Marco Famà Active Member

    dear all,

    I would like to integrate a nice 728x90 px banner upper right in my xenForo instance, but I cannot achieve that.

    Found the "ad_header" which seems to be able to host the BSA brief code:

    Code:
    <!-- BuySellAds Zone Code -->
    <div id="bsap_1284249" class="bsarocks bsap_1ec5154dd23da4651be26af32721548b"></div>
    <!-- End BuySellAds Zone Code -->
    but it's simply aligned right close to the logo.
    Any way to put it right there, on the rightest side?

    Thanks a lot,
    Marco
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Wrap it in <div style="float: right>...</div>.
     
    Marco Famà likes this.
  3. Marco Famà

    Marco Famà Active Member

    hey Brogan, thanks for the quick answer.

    I am trying with it as you said, but the banner does not show up... looks like it's somehow hidden via CSS?
    If you can, please have a look at the URL:
    http://timelapseitalia.com/forum/

    This is the source of the page, in the div pageContent:

    Thanks for your help, much appreciated
    Marco
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Try this.

    Code:
    <!-- BuySellAds Zone Code -->
    <div style="float:right">
    <div id="bsap_1284249" class="bsarocks bsap_1ec5154dd23da4651be26af32721548b"></div>
    </div>
    <!-- End BuySellAds Zone Code -->
    If it's not showing then it's due to the ad service - you will need to check if ads are being served.
     
    Marco Famà likes this.
  5. Marco Famà

    Marco Famà Active Member

    OK will ask them! :)
    Thank you!
     
  6. Marco Famà

    Marco Famà Active Member

    Ciao Brogan,
    got a reply from BSA, and they told me I was supposed to integrate few more lines

    HTML:
    <!-- BuySellAds Ad Code -->
    <script type="text/javascript">
    (function(){
      var bsa = document.createElement('script');
        bsa.type = 'text/javascript';
        bsa.async = true;
        bsa.src = 'http://s3.buysellads.com/ac/bsa.js';
      (document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(bsa);
    })();
    </script>
    <!-- End BuySellAds Ad Code -->
    
    right below the opening <body> tag.

    Which is the template I can use from ACP, to apply such edit?

    Thanks
    Marco
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    Where can additional JavaScript be placed?
    Additional JavaScript can be placed in the PAGE_CONTAINER, page_container_js_head or page_container_js_body templates. If PAGE_CONTAINER is used, it can be placed anywhere in the template. If page_container_js_head is used, it will be included in the head section of PAGE_CONTAINER. If page_container_js_body is used, it will be included in the body section of PAGE_CONTAINER, after the footer. It depends on the JavaScript to a large extent; some require to be placed in the head, some in the body.

    http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-181112
     
    Marco Famà likes this.
  8. Marco Famà

    Marco Famà Active Member

    Sorry Brogan, but it will include it at the end of the page, not really right below <body> tag... :-/
    Maybe I'm misunderstanding smth?

    Thanks
     
  9. Brogan

    Brogan XenForo Moderator Staff Member

    PAGE_CONTAINER

    HTML:
    </head>
     
    <body{xen:if {$bodyClasses}, ' class="{$bodyClasses}"'}>
    <xen:hook name="body">
     
    Marco Famà likes this.
  10. Marco Famà

    Marco Famà Active Member

    Thanks, done it...
     
  11. RoldanLT

    RoldanLT Well-Known Member

    Should be:
    <div style="float:right">
     
    Marco Famà likes this.
  12. Marco Famà

    Marco Famà Active Member

    ok guys, tried with what you suggested but this is the result, with or without the DIV wrapper: where are those arrows coming from? :(

    thank you all
    Marco

    tliforum brogan help.jpg
     
  13. Marco Famà

    Marco Famà Active Member

    dear all,
    anyone can help me please? :confused:

    thanks a lot
    Marco
     
  14. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Adjust this?

    Admin CP -> Appearance -> Style Properties -> Header and Navigation -> Height of Header Logo

    Just a guess.
     
    Marco Famà likes this.
  15. Marco Famà

    Marco Famà Active Member


    you guessed it right, Jake!! Bravo :) thanks a lot for it, had to increase it of 10px and it works nice now..!


    Wish I could lower it a little bit down, just centering it with the logo (see it now, it's totally top right, margin 0px). Tried with this but... no results. Always stuck there...

    Code:
    <xen:hook name="ad_header" />
    <!-- BuySellAds Zone Code -->
    <div style="float:right; ">
    <div id="bsap_1284249" class="bsarocks bsap_1ec5154dd23da4651be26af32721548b"></div>
    </div>
    <!-- End BuySellAds Zone Code -->
     
    or
     
    <xen:hook name="ad_header" />
    <!-- BuySellAds Zone Code -->
    <div style="float:right; vertical-align: middle; height: 110px; border-top: 10px;">
    <div id="bsap_1284249" class="bsarocks bsap_1ec5154dd23da4651be26af32721548b" style="vertical-align: middle; height: 110px; border-top: 10px;"></div>
    </div>
    <!-- End BuySellAds Zone Code -->

    Just if you have bit of time

    Marco
     
  16. Brogan

    Brogan XenForo Moderator Staff Member

    How do I place an image or advert in the header on the right and center it vertically?
    Wrap the contents in a div like so:
    <div style="display: block; float: right; line-height: {xen:calc '@headerLogoHeight - 4'}px; *line-height: @headerLogoHeight; height: @headerLogoHeight; vertical-align: middle">
    Image or advert code
    </div>

    http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-181037
     
    Marco Famà likes this.
  17. Marco Famà

    Marco Famà Active Member

    The output I see now is:

    HTML:
    <!-- BuySellAds Zone Code -->
    <div style="display: block; float: right; line-height: 106px; *line-height: 110px; height: 110px; vertical-align: middle">
    <div id="bsap_1284249" class="bsarocks bsap_1ec5154dd23da4651be26af32721548b"></div>
    </div>
    <!-- End BuySellAds Zone Code -->
    but the banner stays stuck in that position... strange o_O ... thx Brogan
     

Share This Page