![]() |
How do you create a custom hook?
Hi I've had a look around and I'm wondering if there is a tutorial/post explaining the steps to create a custom hook.
Thanks. |
Do you mean plugin hook or template hook?
For plugin hooks, you'd create an xml file named hooks_something.xml (replace the "something" with some unique identifier) and put it in the includes/xml folder. To see the required format, look at one of the existing "hook_" files. Then you just need to insert code like this where you want your hook called: Code:
($hook = vBulletinHook::fetch_hook('my_hook_name')) ? eval($hook) : false; and obviously you'd change 'my_hook_name' to whatever you choose to name each hook. |
All times are GMT. The time now is 01:00 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|