PDA

View Full Version : Show ad (or whatever) after every X post


effeff70
12-27-2020, 07:52 AM
Add the following to the bottom of display_contenttype_threadview_footer:

{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.