View Full Version : User profile fields
africanw
04-24-2008, 01:42 PM
Hi,
Anyone know how to include a vbulletin user profile field (eg country) inside a custom Vb template.
Tried things lile $user[field10] but that did not work.
Thanks
Opserty
04-24-2008, 01:48 PM
The User profile field of the browsing user? [mincode]$bbuserinfo[field10][/minicode]
Or in a postbit then poster's would be $post[field10]
Or on the member profile page $userinfo[field10]
africanw
04-24-2008, 04:16 PM
$bbuserinfo[field10] does work but it is not for the actual user looking at the template but the user in the database.
I have $post[field10] in the postbit already and working.
It is just in my custom template (vbclassified template) that I cannot get this field to show.
I had tried $userinfo[field10]. $user[username] works though.
snippet of the code -
<td class="alt1" width="53%>
$vbphrase[posted_by]:
</td>
<td class="alt2">
<a href="classifieds.php?do=user&userid=$user[userid]">$user[username]</a>
</td>
</tr>
<tr>
<td class="alt1" colspan="2">
Seller Location: $userinfo[field10]
</td>
</tr>
Opserty
04-24-2008, 07:08 PM
It is a custom template on a custom page, therefore you will need to consult the authors of the custom PHP. You'd need to edit the query to fetch the custom fields, however like I said, you will need to contact the authors.
africanw
04-25-2008, 12:57 AM
ah I see thanks.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.