Ads on the right side

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zweeper
    Senior Member
    • Jan 2005
    • 617
    • 6.0.X

    Ads on the right side

    Okay I am lost now, since a couple of hours I am trying to get an ad code to the right side (outside) of my forum...
    Can anyone help me how to get a codesnippet in there? I tried in the header template, but the ad is always aligned to the left side. Just can't get it to the right side.



    Click image for larger version

Name:	right.PNG
Views:	216
Size:	265.5 KB
ID:	4406574



    I added the following code in my header:

    Code:
    <body>
      <div class="myRightContainer" blablabla="right"><!-- Skyscraper --></div>
    </body>


    And I tried to control it with this CSS code in the additional_css:
    Code:
    <style>
      .myRightContainer  { margin-right: 17%; }
    </style>

    Actually I tried many different codes for the css, but it seems that the ad is sticking on the left side forever


    Can anyone help me here? Kind regards!
  • Mark.B
    vBulletin Support
    • Feb 2004
    • 24287
    • 6.0.X

    #2
    Going to be quite difficult to get anything in there in a consistent and robust fashion, as it's outside the content wrapper. The software isn't really built with that in mind.

    Even if you manage it, the behaviour might not be great on smaller monitors and also mobile devices.
    MARK.B
    vBulletin Support
    ------------
    My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
    My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

    Comment

    • Wayne Luke
      vBulletin Technical Support Lead
      • Aug 2000
      • 74123

      #3
      Your code with the <body> tags can cause the entire page to be invalid. You can only have ONE set of body tags per page and we're already adding them in the header.

      I'd use Site Builder for this... If you edit the page, you can change the layout to a two-column layout with a side bar on the right side. Then you can add your advertising modules on the right. If you want the page to be wider to accommodate the new column, you can adjust the wrapper_max_width style variable to change the width on pages.
      Translations provided by Google.

      Wayne Luke
      The Rabid Badger - a vBulletin Cloud demonstration site.
      vBulletin 5 API

      Comment

      • zweeper
        Senior Member
        • Jan 2005
        • 617
        • 6.0.X

        #4
        hm okay, seems quite complex.
        My aim was to get it like on this site https://www.mercedes-forum.com/ (sorry, I know it is not vbulletin, just to see an example).


        So that there is a Wallpaper ad on the right side and if there is no Wallpaper code available, only a top banner on the top right side and a skyscraper on the right side beneath it.
        The Sitebuilder also doesnt seem to work for that, still working a bit on that.

        Question: can I manually change the coloum width in the style templates to make the second right one smaller?

        Comment

        • Wayne Luke
          vBulletin Technical Support Lead
          • Aug 2000
          • 74123

          #5
          There is a modification at https://vbmods.rocks that describes how to change the width of columns.
          Translations provided by Google.

          Wayne Luke
          The Rabid Badger - a vBulletin Cloud demonstration site.
          vBulletin 5 API

          Comment

          • zweeper
            Senior Member
            • Jan 2005
            • 617
            • 6.0.X

            #6
            Is there a way to limit the width of the very top Navbar (the one with the messages and profile dropdown)?

            Comment

            • zweeper
              Senior Member
              • Jan 2005
              • 617
              • 6.0.X

              #7
              just came a big step further with this question. Just in case this is anybody helping in the future:



              kind greetings

              Comment

              • glennrocksvb
                Former vBulletin Developer
                • Mar 2011
                • 4021
                • 5.7.X

                #8
                This is possible by using template hook and using 'footer_before_body_end' as hook location and then use CSS to move the ad in the desired location.

                Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

                Comment

                • zweeper
                  Senior Member
                  • Jan 2005
                  • 617
                  • 6.0.X

                  #9
                  Hello Glenn, thanks for the feedback, that is correct and exactly what was suggested if you follow the link i posted.


                  Another question is still keeping me busy:

                  Originally posted by zweeper
                  Is there a way to limit the width of the very top Navbar (the one with the messages and profile dropdown)?

                  Comment

                  • zweeper
                    Senior Member
                    • Jan 2005
                    • 617
                    • 6.0.X

                    #10
                    I want to get rid of the sides which are wider than my actual forum (1300 px)


                    Click image for larger version

Name:	bar.PNG
Views:	163
Size:	265.4 KB
ID:	4406960

                    Comment

                    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                    Working...