![]() |
Need to clearify how to preRegister to template
Hi all,
I've spent the entire yesterday and today morning reading on how to use custom PHP code through plugins and referring to plugin-variables in a template, and I still haven't got it working. The approach to do this still seems a bit blurry even after reading multiple articles covering the subject, so please bear with me on these basic questions. From my understanding you can't register a variable in existing templates, such as FORUMHOME. This is where I would like my code to be inserted. Do do that I need to preRegister the variable from my plugin code. What I did was to make a new plugin. I made a name for it and set hook_location to global_start (If anyone has any links on when to use what hook please share). I leave execution order to 5 and the actual code for my new plugin looks like this: PHP Code:
PHP Code:
Any help appreciated! Thank you. |
global_start is deprecated since 4.0.2. use global_bootstrap_init_start instead
|
Thank you! Had no idea.
|
All times are GMT. The time now is 02:32 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:
|