The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
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. |
#2
|
|||
|
|||
![]()
global_start is deprecated since 4.0.2. use global_bootstrap_init_start instead
|
#3
|
|||
|
|||
![]()
Thank you! Had no idea.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|