View Full Version : global_* not woriking in CMS!
al3bed
06-18-2011, 04:37 PM
hi,
I'm trying to register variables for header template, but they are not working in CMS pages? navbits hook is working great but my problem is that I want to register them for header not navbar template?
because all global hooks are not working in CMS, any idea what hook should i use to do this?
thanks
Lynne
06-18-2011, 05:22 PM
If you look up the global_start template in the files, you will see this:
// Deprecated as of release 4.0.2, replaced by global_bootstrap_init_start
($hook = vBulletinHook::fetch_hook('global_start')) ? eval($hook) : false;
Try looking up the others and you will see similar.
al3bed
06-20-2011, 09:38 AM
refactoring stuff huh .. thanks Lynne, you are very helpful person. :up:
al3bed
06-25-2011, 01:36 PM
ok I got something wrong! the $vbphrase doesn't work in global_bootstrap_init_start, any idea?
Lynne
06-25-2011, 02:39 PM
You may need to make it global:
global $vbphrase;
Paul M
06-25-2011, 02:51 PM
The language is not loaded at that point. What are you trying to do ?
vbresults
06-25-2011, 04:34 PM
The language is not loaded at that point. What are you trying to do ?
This. You can probably move it to another hook that has the language initialized already.
al3bed
06-25-2011, 04:52 PM
Lynne, I tried to global it but I thought why I should do so I am already using a global hook! .. anyway it's not work.
Paul, I',m trying to add something like this shown in header in all pages:
$subscriptions_menubits .= "<li><a class=\"viewall\" href=\"" . $href . "\">" . $vbphrase['fbstyle_view_all_subscribed_blogs'] . "</a></li>";
fbstyle_view_all_subscribed_blogs is a phrase in the GLOBAL phrase group.
Lancerforhire, give me the hook name where I can register variables in header template & work in all vb pages & load language
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.