The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Alright so I have some code which outputs data from a database. It's in the member_start hook.
To test it I tried echoing the result and infact it does come out as expected at the top of the page. However, if I try and include the variable in a template so that it's outputted in the correct part of the page... it comes out blank. How can I get templates to work with custom variables that are set from a plugin? |
|
#2
|
|||
|
|||
|
What template are you trying to use?
|
|
#3
|
|||
|
|||
|
memberinfo_block_statistics
--------------- Added [DATE]1215415281[/DATE] at [TIME]1215415281[/TIME] --------------- so... |
|
#4
|
|||
|
|||
|
You probably need to use $GOBALS[yourvar] if your custom variable is $yourvar. As the hook is probably located inside or a class/function.
Looking at the PHP file in which the hook is located is always a good place to start debugging.
|
|
#5
|
|||
|
|||
|
Thank you, worked like a charm!
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|