PDA

View Full Version : Inject into header template from global_start?


Kaitlyn2004
07-30-2010, 02:16 PM
As part of my upgrade to vB4 it seems I can no longer inject variables into header template via the global_start hook

Obviously I changed it to the vB_Template::preRegister() method, but it doesn't work. If I make the hook global_bootstrap_init_start, all is well!

I see TONS of examples online of preRegister() with the header template, so any idea why it wouldn't be working for me?

To make matters worse, it appears as though my friend's setup (during our testing) which is VERY VERY similar to mine seems to work fine with the global_start hook spot.

What gives!? :( SO FRUSTRATING

Lynne
07-30-2010, 08:44 PM
You shouldn't be using the global_start hook, but use the global_bootstrap_init_start hook instead:
// Deprecated as of release 4.0.2, replaced by global_bootstrap_init_start
($hook = vBulletinHook::fetch_hook('global_start')) ? eval($hook) : false;