MyBB Community Forums

Full Version: How to add Adsense every couple posts?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
So currently I have it so that it shows an adsense ad in every thread's first post using a plugin called "PHP and Template Conditionals (2.0)" and using the following if statement:

<if $post['pid'] == $thread['firstpost'] then>

in the post bit template. I was wondering how I could change it so that it adds an ad in every x (for example: 5) posts instead?
<if $postcounter % 5 == 0 then>

Will add code after 5th, 10th, 15th etc. post.
Are you sure you have 2.0 version?
"
Download: tplcond-1.7.7z (5.58 KB)
Plugin Version: 1.7
Last Updated: 11-18-2012, 08:16 PM

Downloads: 1,418
MyBB Compatibility: 1.2.x, 1.4.x, 1.6.x
Plugin License: GPLv3
Uploader: ZiNgA BuRgA
"
Which one is better
phptpl-2.0.7z
or
tplcond-1.7.7z
They are almost the same, but PHP in Templates, as the name says, additionally allows usage of PHP. But it's slower than core edits or simplified conditionals/expressions.
I am using tplcond-1.7.7z do you think I should switch to phptpl-2.0.7z?
I only use simple conditionals and I don't want any plugin to affect my forum performance!!!
If you use only simple you can use both.. As I said, they are very similar, just PHP in Templates provides PHP and Templates Conditionals doesn't. So if you don't need PHP, you don't need to switch.
Thanks Destroy666 I only need conditionals not PHP thanks very much
some of my friends said, sometimes adsense will have crashes with adword under the subtle situation. It's that true?
Pages: 1 2