MyBB Community Forums

Full Version: Conditional template help needed!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi I am trying to show an Ad in every first post on each page, except first page please check this code and tell me if it's good please
<if $postcounter %1 == 0 && $page > 1 && THIS_SCRIPT != "private.php" && THIS_SCRIPT != "newreply.php" && THIS_SCRIPT != "editpost.php" && THIS_SCRIPT != "newthread.php" then>
ADSENSE
</if>
Thanks

OPS. Sorry posted into the wrong forum
No, it's not. Just copy code from previous topic: http://community.mybb.com/thread-142737-...pid1021693
<if ($postcounter - 1) % $mybb->settings['postsperpage'] == "0" && $page > 1 && THIS_SCRIPT != "private.php" && THIS_SCRIPT != "newreply.php" && THIS_SCRIPT != "editpost.php" && THIS_SCRIPT != "newthread.php" then>
ADSENSE
</if>
OMG! You did it again! I love you dude. Can I marry you brain?
Thank you so much

Do you know how can I make this ad to show on private.php removing && THIS_SCRIPT != "private.php" doesn't work
(2013-07-19, 10:41 PM)marcus123 Wrote: [ -> ]Do you know how can I make this ad to show on private.php removing && THIS_SCRIPT != "private.php" doesn't work

How about this:
<if (THIS_SCRIPT == "showthread.php" && ($postcounter - 1) % $mybb->settings['postsperpage'] == "0" && $page > 1) || THIS_SCRIPT == "private.php" then>
ADSENSE
</if>
Thank you very much! You just nailed it.