PDA

View Full Version : Global Variables in some Hooks


dannyrulez
02-14-2006, 12:24 AM
Hi,

I'm having some problems with the global variables in some templates.
Let me explain:

global_start:hook
ob_start();
global $userinfo;
echo "Hi";
$userinfo[corillo] = ob_get_contents();
ob_end_clean();

header:template
<!-- logo -->
<a name="top"></a>
$includeMRheader
$userinfo[corillo]
<!-- /logo -->

(The header template show "Hi" and work fine)

forumhome_forumbit_level1_nopost:template
$userinfo[corillo]

forumhome_forumbit_level1_nopost dont' show hi (I search "hi" in the web and only appear at the header area, not at forumhome_forumbit_level1_nopost.)
The global variable is not passing to this template, this is my problem.

How I can make this work?

Thanks Everyone!

Marco van Herwaarden
02-14-2006, 10:22 AM
I suggest you don't try to use standard variables. Use a variablename that is only used by you.