The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How do you make a custom variable available to other templates?
I have a plug-in attached to the global_complete hook, and it is fetching a custom template and filling it with data, i.e.:
eval('$myvariable .= "' . fetch_template('mytemplate') . '";'); If I echo it to the screen right after the above is called (inside the same plug-in), it works fine - the template is displayed on the page at the top. However, I want to reference $myvariable inside the FORUMHOME template so that I can have it displayed in a certain location on the page. All of my attempts to do this have failed. I think I should be able to just put $myvariable into FORUMHOME, but obviously the variable is not available to that when it is called, because nothing is displayed. $myvariable is declared outside of any functions in the plug-in, so it's not being scope-limited there. What do I need to do to have $myvariable be available to other templates? Or, perhaps I'm not calling this in the right place, but I tried other hooks such as forumhome_start, and it still only works when echoed inside the plug-in. --------------- Added [DATE]1211578137[/DATE] at [TIME]1211578137[/TIME] --------------- Nevermind - it was my error, in the order of the functions I was calling in the plug-in. It works now as I expected. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|