View Full Version : {$vbulletin->userinfo[variable]} STUFF
evenmonkeys
12-23-2005, 08:54 PM
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: sadfsad[[i]/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!!!
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.
Andreas
12-23-2005, 09:40 PM
You should use $bbuserinfo['whatever'] in templates - $vbulletin is not within the scope everywhere.
evenmonkeys
12-23-2005, 09:43 PM
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.
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.
Are number 2 and 3 possible without creating a php file?
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?)
evenmonkeys
12-24-2005, 12:06 AM
I'm almost 100% positive it doesn't. Marco and I worked with it before.
Paul M
12-24-2005, 12:36 AM
$$bbuserinfo should always work in templates.
evenmonkeys
12-24-2005, 12:40 AM
I was messing with the usercp template. When I tried using $bbuserinfo, it wouldn't work for me.
Andreas
12-24-2005, 01:13 AM
@merk
replace_template_variables() ;)
Basically it does $bbuserinfo => $GLOBALS['vbulletin']->userinfo, etc.
evenmonkeys
12-24-2005, 04:31 PM
> 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.
Depends where you want to put it.
evenmonkeys
12-24-2005, 09:11 PM
In the usercp template.
There should be a hook usercp_start, it could go in there.
evenmonkeys
12-25-2005, 06:16 AM
I don't know what to put in the hooks though. =\
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.