vB4 Show ads for last post on page only when there are more than X replies

  • Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Radio

    ven0m

    Administrator
    Staff member
    Administrator
    Moderator
    Platinum
    xenForo 2.x.x
    xenForo 1.x.x
    Contributor
    vBulletin All Access Pass
    The Chest
    Verified
    Ultra Platinum VIP
    Platinum VIP
    Gold VIP
    Silver VIP
    Premium
    Member
    Jul 17, 2005
    20,466
    7,708
    321
    localhost
    Heisenberg submitted a new resource:

    - Show ads for last post on page only when there are more than X replies

    vB Version: 4.x.x

    By default the ad in the last post will show if there are 2 posts on a page. This results in two successive, often cluttered looking ads. Alternatives if statements to this did not account for multi-page threads where 2 posts were on a page.

    Here is the solution:

    In postbit find

    Code:
    <vb:if condition="$post['islastshown']">

    replace with

    Code:
    <vb:if condition="$post[postcount] % $vboptions[maxposts] > 2 OR...

     
    Last edited: