View Full Version : profile field
DiscussAnything
02-10-2004, 01:27 AM
I added a custom profile field called zipcode which I wanna use to display weather specific to peoples location. I used the default 'custom profile fields' for this. So far so good, but how do I use this in the template? The customfield id is 7
is it something like this?
$userinfo[profilefieldid=7]
DiscussAnything
02-10-2004, 01:30 AM
if this isn't possible, what query do i use to retrieve this from the db and add it? It's on the vbhome index, and it shouldn't be too hard right? My php isn't too good though. Can anyone help?
Andreas
02-10-2004, 01:33 AM
$bbuserinfo[field7]
This will give you the contents of profile field id 7 for the current user .
DiscussAnything
02-10-2004, 01:46 AM
that works excellently
danke shon :)
Andreas
02-10-2004, 01:52 AM
Np m8, you're welcome :)
Reviving this post.... How would i get this info for members of a certain group.
peterska2
05-07-2006, 12:22 AM
If the members who's profile is being viewed is a member of a usergroup where the code is to be visable use:
<if condition="$userinfo[usergroupid]=x">$userinfo[fieldy]</if>where x is the usergroup id number for the group that you wish to display this code for, and y is the profile field number.
If the viewing member is to have permission to view the field regardless of who's profile use:
<if condition="$bbuserinfo[usergroupid]=x">$userinfo[fieldy]</if>where x and y are as above.
If you want to do it in the postbit, then use $post[fieldy] inside the if instead.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.