Back to vBulletin 4.x Template Modifications

Show ads for last post on page only when there are more than X replies
Mod Version: 1.00, by tpearl5

vB Version: 4.x.x Rating: (0 vote - 0 average) Installs: 4
Released: 06 Jul 2012 Last Update: Never Downloads: 0
Not Supported Template Edits  

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
HTML Code:
<vb:if condition="$post['islastshown']">
replace with
HTML Code:
<vb:if condition="$post[postcount] % $vboptions[maxposts] > 2 OR $post[postcount] % $vboptions[maxposts] == 0">
I found that more than 2 posts on a page is sufficient to show an ad again. Of course if you rather have more posts on a page before showing another ad, simply change the 2 in the conditional to whatever you want.

Download

No files for download.


vblts.ru supports vBulletin®, 2022-2024