No announcement yet.

Banner conditionals

  • Filter
  • Time
  • Show
Clear All
new posts

  • Banner conditionals

    I was looking at the code for inserting banners between posts but I cannot figure out how to set the rules to my wishes.

    I want to show the banner after the first post on every page and show the next banner on the same page after 20 posts. If the page has less than 20 posts, only one banner should be shown (after the first post).

    I want to achieve that maximum two banners would be shown per page. Some of my users have the setting to show 40 posts per page. In those cases I would like the banner to be shown after the first post on the page and be repeated after 20 posts. Can this be done?

  • #2
    You can most likely just use this or get yourself Openads.


    • #3
      I've tried the codes from the existing instructions but they don't do what I want them to do. How can I limit the number of ad blocks per page?


      • #4
        Jake has alot of version to get what you want, you can try the one in the second post of this thread. If you still do not like it, then you need to post over at and see what modification you can install to get the outcome you want on your forum.


        • #5
          I've tried those versions. The problem is this. For example the default setting for number of posts per page on my forum is 10 but a user manually changed this to 40 posts per page in his settings.

          If I tell the code to display the ads after the first post on every page, it will repeat the ad every 10 posts because it thinks there is a new page after 10 posts (default setting) eventhough that user chose to display 40 posts per page. If I add the conditional to show the banner ever 15 posts, it will will post an ad as post 2, 12, 17, 22, 32, 35 (displaying ads every 10 and 15 posts).

          The main problem is that the conditional rely on the default setting of number of posts per page and you cannot change that.


          • #6
            You can edit your setting to suite your needs or check and see what has and or request this for yourself.

            vBulletin Options > vBulletin Options > Thread Display Options (showthread) > User-Settable Maximum Displayed Posts


            • #7
              There's a hack at

              Search for vB Ad Management.

              Should do the job.


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