The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi there,
If a variable is created in a php file, how can I tell a template where to find what the variable is meant to do? IE. $mad $mad is assigned in mad.php, how, in a template such as navbar_link, would I get this information from mad.php? Thanks |
#2
|
|||
|
|||
![]()
Make a plugin and use hooks to achieve this.
|
#3
|
|||
|
|||
![]()
What hook location would I select? Would I put the contents of mad.php into the plugin?
|
#4
|
|||
|
|||
![]()
If the template is fetched on the same page as that in which $mad is defined then you can type $mad directly into your template.
|
#5
|
|||
|
|||
![]()
Thats the thing, its not. navbar_link is used on every vb page.
|
#6
|
||||
|
||||
![]()
You need to create & assign data to the variable before the template is parsed.
|
#7
|
|||
|
|||
![]()
I know but how do I do this..?
|
#8
|
|||
|
|||
![]()
Create a Plugin on the page on which the template is parsed. For something displayed on all pages, global_start would be best.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|