Ok I might sound stupid or something, I just don't understand what's "vars" in something like $variable->vars['number']. Also, is the ' ' needed for arrays? Does this $variable->vars[number] do as well?
$myarray['this']
$myarray[nothis]
PHP Manual: Arrays
This is wrong, but it works. Then, why is it wrong? The reason is that this code has an undefined constant (bar) rather than a string ('bar' - notice the quotes), and PHP may in future define constants which, unfortunately for your code, have the same name. It works, because the undefined constant gets converted to a string of the same name automatically for backward compatibility reasons.
/*-------------------------------------------------------------------------*/
//
// Load a template file from DB or from PHP file
//
/*-------------------------------------------------------------------------*/
function load_template( $name, $id='' )
{
global $ibforums, $DB, $root_path;
$tags = 1;
if ($ibforums->[b]vars[/b]['safe_mode_skins'] == 0)
{
// Simply require and return
require $root_path."Skin/".$ibforums->skin_id."/$name.php";
return new $name();
}