MyBB Community Forums

Full Version: Include code in threads?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey,
i was looking through the source of some plugins and created my own to include some code in messages/posts for guests. But what i can't get it to do is only include it once just for the thread not each post...
I want the message only for guests.
Any ideas what i need i think i am using $message right now can't remember...
Do you want to add the code on first post only ?

If so, then use the following code in your function;

if (($postcounter - 1) % $mybb->settings['postsperpage'] == "0")
{
// your code goes here
}