Announcement

Collapse
No announcement yet.

Show ad (or whatever) after every X post

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Show ad (or whatever) after every X post

    Add the following to the bottom of display_contenttype_threadview_footer:

    Code:
    {vb:set conversationCount, {vb:math ({vb:var postIndex} + ({vb:var pagingInfo.currentpage} - 1) * {vb:var pagingInfo.perpage}) + 0}}
    <vb:if condition="$conversationCount % 15 == 0">
    <div>YOUR CONTENT</div>
    </vb:if>
    With posts per page == 15, this will show YOUR CONTENT after every 1st post on every page.
    This even works when using the AJAX pagination.
Working...
X