Log in

View Full Version : hook_vbulletin.xml


calorie
06-10-2005, 01:15 AM
So I see how to mod hook_vbulletin.xml, but I don't see, and maybe I'm blind, what exactly hook_vbulletin.xml does? I haven't yet been able to get a super clear picture of how the hook tags in hook_vbulletin.xml translate into using, say, set_session_visibility() in a plugin, and where a call to $session->set_session_visibility() in a custom plugin would first be available.

Andreas
06-10-2005, 02:20 AM
hooks_vbulletin.xml holds the definition for all available hooks.
Take a look here: https://vborg.vbsupport.ru/showthread.php?t=82703

As for your $session->set_session_visibility() question:

Once again, the first hook being called for every page (only for registered users!) is fetch_userinfo.

calorie
06-10-2005, 02:39 AM
hooks_vbulletin.xml holds the definition for all available hooks.
Take a look here: https://vborg.vbsupport.ru/showthread.php?t=82703

As for your $session->set_session_visibility() question:

Once again, the first hook being called for every page (only for registered users!) is fetch_userinfo.
Ah, I knew you luved me. :p

So, set_session_visibility maps to fetch_userinfo, right?, and fetch_userinfo is hooktype general (what is general?) so I guess what I'd like is a way (maybe it already exists and I missed it) to know what functions map to the hook tags in hooks_vbulletin.xml file, and what files accept what hooktype.

Andreas
06-10-2005, 03:14 AM
Hooktype is just to group hooks, it does not have any "real" meaning.
Hooktype general contains hooks that are not bound to specific functions, eg. are at places commonly used (like in global.php, functions, php, class_bbcodeparse.php).

Hooksd not "map to functions". Hooks can be in functions, yes - but they don't have to.
A hook can be just almost anywhere.

Read Brads Howto.