![]() |
Generate a variable usable in templates
Hello,
I need a variable which i can insert into the navbar template. I want to use the plugin system of 3.6.7. The variable should only be generated if a user is logged in. I thougth this should work: Plugin: hook: parse_templates PHP Code:
HTML Code:
<if condition="$bbuserinfo['userid'] >= 0"> Thanks for your help in advance :) |
you could make it like this:
in the template: Code:
<if condition="$show['member']">show to registered.. |
Yes, that was my first thought, but the $htSid will be filled with a dynamic content (from a soap client). "Dummy" was only a test if the content of the variable is displayed in general. So how can I use this variable?
But thanks for your help ;) |
have you tried another hook?
like global_complete? |
Yes, I tried:
No content of the variable is displayed. Maybe I have to implement the variable in a different way? :( |
you need $userinfo, not $bbuserinfo :)
sorry.. by that I mean "in the hook".. you still need bbuserinfo in the template. |
Actually in plugins you use $vbulletin->userinfo.
|
All times are GMT. The time now is 01:21 AM. |
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:
|