MyBB Community Forums

Full Version: Variables
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can anyone explain why when I put variable $some_mod in showthread template it is working and not working if I put it in header template ?
Variables used in each template do not exist in all templates. Variables must first be set in the PHP file that they are called from. For example, if you try to use a $variable that is set in showthread.php, you will not be able to use it for a template that is called in forumdisplay.php.

The only exception is if the variable is set in global.php or one of the files called globally.
Great thanks ! I see now where the problem is
You're welcome.