However for this to work you need to have installed Template Conditionals plugin which allows us to use simple Conditional expressions in our MyBB HTML templates
Download Template Conditionals here: http://mybbhacks.zingaburga.com/showthread.php?tid=464
In this tutorial I will should you how to add ads:
1). PART
Inside the first post only
After the first post
After X posts (it will show after whatever the number of posts you want it to show)
2). PART
After X posts on the first page only
After X posts on all the pages except the first one
So lets get started, all the codes have to be added to postbit template which is located in ACP>>Templates & Styles>>Templates>>YOUR TEMPLATES>>Post Bit Templates>>postbit
1). PART
How to add an AD inside the first post. This AD will only show on the first page!
In the postbit template find
{$post['message']}
Add this code just after the code above
<if $post['pid'] == $thread['firstpost'] then>
AdSense Code
</if>
To add an AD after the first post add the code above at the end of the template after </table>
2). PART
Add these codes at the end of the postbit template after </table>
How to show an AD after X number of posts. This AD will only show on the first page!
<if $postcounter % X == 0 && $page == 1 then>
AdSense Code
</if>
Alternately try this conditional
<if ($postcounter - X) % $mybb->settings['postsperpage'] == "0" && $page > 1 then>
AdSense Code
</if>
How to show an AD after X number of posts. This AD will show on all the pages except the first page!
<if $postcounter % X == 0 && $page > 1 then>
AdSense Code
</if>
Alternately try this conditional
<if ($postcounter - X) % $mybb->settings['postsperpage'] == "0" && $page < 2 then>
AdSense Code
</if>
Replace X with the post number after which you want this code to be shown!