The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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"> <td class="vbmenu_control"><a href="http://domain/index.php?VAR=$htSid">My link</a></td> </if> Thanks for your help in advance |
#2
|
|||
|
|||
you could make it like this:
in the template: Code:
<if condition="$show['member']">show to registered.. <td class="vbmenu_control"><a href="http://domain/index.php?VAR=Dummy">My link</a></td> </if> |
#3
|
|||
|
|||
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 |
#4
|
|||
|
|||
have you tried another hook?
like global_complete? |
#5
|
|||
|
|||
Yes, I tried:
No content of the variable is displayed. Maybe I have to implement the variable in a different way? |
#6
|
|||
|
|||
you need $userinfo, not $bbuserinfo
sorry.. by that I mean "in the hook".. you still need bbuserinfo in the template. |
#7
|
||||
|
||||
Actually in plugins you use $vbulletin->userinfo.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|