The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
{$vbulletin->userinfo[variable]} STUFF
Okay... I've got a few questions...
Question 1 How can I use {$vbulletin->userinfo[variable]} in <if condition> statements? When I put that in there, I get an error saying I can't do that. So how would I do it? Question 2 Why doesn't {$vbulletin->userinfo[signature]} let bb code work? I'm making a custom page without using an actual php file and I was told that {$vbulletin->userinfo[variable]} should pull everything. However, when I use {$vbulletin->userinfo[signature]}, it pulls exactly what's there. ie: [img]sadfsad[/img] Question 3 Why doesn't <img src="{$vbulletin->userinfo[avatarurl]}"> work? Is there something else I can use to make it work? HELP ME!!! |
#2
|
|||
|
|||
1) Use $vbulletin->userinfo['variable'] in conditions, you dont need {}.
2) You need to initialise a bbcode parser class and parse the signature field. 3) You need to use fetch_userinfo with a specific option to join the avatar table before having it available. |
#3
|
||||
|
||||
You should use $bbuserinfo['whatever'] in templates - $vbulletin is not within the scope everywhere.
|
#4
|
||||
|
||||
I can't use that. I tried using that and it didn't work. When I showed it all to Marco, he told me to use {$vbulletin->userinfo[variable]}. >_> Then it all started working for the most part.
Quote:
|
#5
|
|||
|
|||
You could possibly do 2/3 in hooks.
Andreas: I wasnt aware you could use $bbuserinfo inside the conditional statements. Are you saying that the template code converts $bbuserinfo into the proper "variable" for different scopes? (for both variables in templates and conditionals?) |
#6
|
||||
|
||||
I'm almost 100% positive it doesn't. Marco and I worked with it before.
|
#7
|
||||
|
||||
$$bbuserinfo should always work in templates.
|
#8
|
||||
|
||||
I was messing with the usercp template. When I tried using $bbuserinfo, it wouldn't work for me.
|
#9
|
||||
|
||||
@merk
replace_template_variables() Basically it does $bbuserinfo => $GLOBALS['vbulletin']->userinfo, etc. |
#10
|
||||
|
||||
> initialise a bbcode parser class and parse the signature field
> use fetch_userinfo with a specific option to join the avatar table How would I make hooks for these? I know how to make hooks... but what would I put in the hooks to make it work in the template? I mean... there are several things not showing up... but at least this would give me an idea. Join date, referrals, messenger icons, etc are all not showing up. It hates me. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|