How to put ads after first post in thread on vB5 without using plugins

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • glennrocksvb
    Former vBulletin Developer
    • Mar 2011
    • 4005
    • 5.7.X

    #46
    This is a known issue in 5.2.0 and was fixed in 5.2.1. You should upgrade to that version or apply the temporary solution suggested in the bug ticket at http://tracker.vbulletin.com/browse/VBV-15593

    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

    • vbmundo
      New Member
      • Apr 2015
      • 27
      • 3.6.x

      #47
      Well Thanks

      but Upgrading from 5.2.0 to 5.2.1 at 66% I have this Error
      • Processing XML
      • Step 1 - Import latest options
      • Importing vbulletin-settings.xml
      • Import Done
      • XML Error: Not well-formed (invalid token) en la lĂ­nea 1

      Status: Aborted

      I have now error into my forum

      Look



      Try to go to some POST

      Comment

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

        #48
        You should create a separate thread for this issue as this is not related to the current thread.

        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

        • vbmundo
          New Member
          • Apr 2015
          • 27
          • 3.6.x

          #49
          Hi,

          I have the Google Adsense into the First Post

          But

          Where's the AD ?

          Look



          Comment

          • vbmundo
            New Member
            • Apr 2015
            • 27
            • 3.6.x

            #50
            sorry, now Appears.

            THANKS FOR ALL !!

            Comment

            • vbmundo
              New Member
              • Apr 2015
              • 27
              • 3.6.x

              #51
              Hi,

              I change the Forum Theme and Now the First Post ADs doesn't Appear

              When I go to EDIT PAGE, I can see the Google Adsense Code attached, but this Ad doesn't appears... I change the Cold Blue to Blue Green Theme

              What's Wrong ?

              Look



              Regards

              Comment

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

                #52
                Did you also add the CSS in css_additional.css template for that theme? You have to do that for all the themes you are using.

                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

                • vbmundo
                  New Member
                  • Apr 2015
                  • 27
                  • 3.6.x

                  #53
                  Wow.. is that... Thanks !!

                  Comment

                  • Drache28
                    Member
                    • Feb 2010
                    • 65
                    • 4.0.0

                    #54
                    This is great guide. Thanks.

                    But because I am using Iframe ads. not google. Could you please teach me how can I make it auto resize the ad when browsing in mobile? or just disable the ad? because the long ad is actually broken the style on mobile devices.

                    Comment


                    • Drache28
                      Drache28 commented
                      Editing a comment
                      thanks I will pm you the link.

                    • glennrocksvb
                      glennrocksvb commented
                      Editing a comment
                      To auto-resize the ad inside the iframe, the ad provider you are using must use responsive ads. Nothing I can do about that. But if you want to disable it, then you could hide the ads in mobile by adding this custom CSS:

                      Code:
                      .l-small .b-post.ad-after-first-post-active {
                          margin-bottom: 0;
                      }
                      .l-small .b-post.ad-after-first-post-active .axd_first-post {
                          display: none;
                      }

                    • Drache28
                      Drache28 commented
                      Editing a comment
                      Hi Glenn
                      Thanks so much. It works very well. The ad doesn't display when using mobile screen now.

                      Thanks
                  • Drache28
                    Member
                    • Feb 2010
                    • 65
                    • 4.0.0

                    #55
                    Glenn Vergara

                    Thanks again for you code. Just wondering if is possible to make first post appear on all pages so that the ad will display on all pages as well?

                    Because currently the ad only displays on first page after first post. However we really like the ad to show on all pages. Some topics have like 20 30 pages.

                    Thanks.

                    Comment


                    • glennrocksvb
                      glennrocksvb commented
                      Editing a comment
                      You are using the First Post Content Ad feature and that's what it's supposed to do. If you want to display the ads in all pages in a thread, then you add an Ad Module in the Conversation Detail page and drop it on top or bottom of the Conversation Detail module. Note that when navigating pages in a thread it will not reload the ads because it uses AJAX to display the next/previous page.

                    • Drache28
                      Drache28 commented
                      Editing a comment
                      Thanks so much for your reply Glenn is it possible to also make the first post display on all pages as well?
                  • William Thomas Jr
                    Senior Member
                    • Nov 2014
                    • 526
                    • 5.1.x

                    #56
                    Hi Glenn,

                    I am not using Google ads but a different ad network. Here's my code, how would add your code:

                    Code:
                    document.querySelector('.conversation-content-widget .conversation-list li:first-child').className += ' ad-after-first-post-active';
                    To:

                    Code:
                    <p><center><!-- Beacon Ads Zone Code -->
                    <div id="bsap_1304484" class="bsarocks bsap_16b62cf9f6e37c0cab931dce97e25008"></div><center>
                    Thanks,
                    William

                    Comment


                    • glennrocksvb
                      glennrocksvb commented
                      Editing a comment
                      Put the js code inside <script></script> tags and then add it before or after the ad code.
                  • Mrs.T
                    Senior Member
                    • Nov 2007
                    • 1210
                    • 6.0.X

                    #57
                    That worked perfectly and so easy to do! Thank you so much Glenn.

                    One quick question. We already have some CSS code to do another job, should we leave a line space between each block of code or just place them after each other?

                    Comment

                    • NiGh10GaLe
                      New Member
                      • Dec 2015
                      • 18
                      • 5.3.x

                      #58
                      Not working with the last version of vb (5.3.4)

                      Comment


                      • Mrs.T
                        Mrs.T commented
                        Editing a comment
                        Still works for us in 5.3.4

                      • glennrocksvb
                        glennrocksvb commented
                        Editing a comment
                        Thanks for confirming it still works in 5.3.4
                    • Mark.B
                      vBulletin Support
                      • Feb 2004
                      • 24286
                      • 6.0.X

                      #59
                      Originally posted by NiGh10GaLe
                      Not working with the last version of vb (5.3.4)
                      You'll need to provide more information. "Not working" doesn't tell us very much.
                      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

                      • BrasilWeb
                        New Member
                        • Oct 2016
                        • 5
                        • 5.2.x

                        #60
                        Hi,
                        Thanks for sharing.
                        I add some more code. I copied the Code for a entire post- Change something, e.g using the default avatar, take out the date and time and other dynamic things. And, of curse changing the CSS.
                        For the result see picture or got to: https://forum.brasil-web.de/
                        (still need to work on the CSS for Cellphones )

                        Comment

                        Related Topics

                        Collapse

                        Working...