![]() |
Finding the right hook for adding text to the header template in CMS
I have a mini mod on my site that looks something like this:
Code:
Hook Location : global_start Code:
<? Code:
<span>Message : <i>{vb:raw template_hook.tagline}</i></span> So, does anybody have any ideas on how to solve this? |
Anybody?
|
First, don't use global_start, it's deprecated (do a search on it in your files and you'll see). I'd actually suggest global_bootstrap_init_complete otherwise you'll need to preregister template_hook (again, you'll see this if you look at the code).
I put the php directly into the plugin and it worked fine for me. Did you try that? |
Fantastic, the hook suggested worked a treat.
Regarding the location of the php code, I prefer to put hook php into file. Doing it this way means that the opcode cachers can work on the file - if the php is in the hook itself then it can't be cached in the same way. For a couple of hooks here and there it makes little difference, but once you have a number of hooks the difference is noticeable. |
All times are GMT. The time now is 01:21 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:
|