![]() |
Any simple example of how to use a hook?
I'd like to replace a hook statement with some custom code.
I presume that is possible?? Example: in Template postbit there is a line: Code:
$template_hook[postbit_start] right where where that line is. What are the steps needed to make this happen? like do I create a file called postbit_start somewhere? Thank you. |
$template_hook[postbit_start] is a variable for the comment within the HTML when the postbit template is rendered. If you would like to print something dynamically within that template, follow the following example.
Postbit Template: Code:
$template_hook[postbit_start] AdminCP -> (left menu) Plugins & Products -> Plugin Manager Fill out the form with the following information... Product: vBulletin Hook Location: postbit_display_complete Title: My Postbit Addition Execution Order: 5 (default) Plugin PHP Code: PHP Code:
Click "Save" and continue on to your forums and view the Postbit within a thread. You should see your variable printed within each Postbit render. Hope this helps! - shovel |
Errr, shovel, why would you do that when you can USE the hook? A bit pointless, IMO.
Have a read of: https://vborg.vbsupport.ru/showthread.php?t=147447 |
As far as I understood he wanted to insert a variable. Either way, I can see your point Dismounted. I tend to over think at times, it happens haha.
|
Code:
$template_hook[postbit_start] how did you make the jump to the hook: postbit_display_complete I mean, what documentation would say, to use postbit_start add a hook for, postbit_display_complete? I'm so clueless here. The other post: https://vborg.vbsupport.ru/showthread.php?t=147447 is a listing of hooks, not any instructions how how to use them. How do you use these things, called hooks? It includes: $template_hook[postbit_start] But why, if it is just a comment, and therefore unusable(?) It makes no mention of postbit_display_complete, the one you presumably should use. |
Code:
$template_hook[postbit_start] |
All times are GMT. The time now is 04:34 AM. |
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:
|