![]() |
editing template with custom variable
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? |
What template are you trying to use?
|
memberinfo_block_statistics
--------------- Added [DATE]1215415281[/DATE] at [TIME]1215415281[/TIME] --------------- so... |
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. ;) |
Thank you, worked like a charm!
|
All times are GMT. The time now is 08:16 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:
|