MyBB Community Forums

Full Version: Advertisements In-between Posts?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Yes, that's the job for Template Conditionals. Download Template Conditionals plugin first as mentioned before, put .txt and .php to inc/plugins and activate it.

This conditional will show ad on every 9th post each page:
<if ($postcounter - 9) % $mybb->settings['postsperpage'] == "0" then>
ad <table> code here 
</if>
Put it at the end of postbit/postbit_classic template.

If you want it in only after 9th post (will show only on 1 page), use .m.'s conditional mentioned before.
<if $postcounter == 9 then>
ad <table> code here
</if>

To change the post number, just change the 9 in both conditionals to other number. You can use multiple conditionals at the end of postbit/postbit_classic or combine them into one.
and you can use tables and div elements etc with required style to makeup the advertisements!
Wow! Great, I'll test it out with the conditionals + tables when I wake up tomorrow! Smile I had a feeling MyAdvertisements couldn't achieve what I wanted.
Pages: 1 2