View Full Version : Echo user profile field in postbit
YouBabble
12-27-2009, 05:53 PM
In vBulletin 3.8, we could sort of echo or display one of the users' profile fields in the post bit by using this code:
<a href="http://youtube.com/user/$post['field5']">
This would echo the custom profile field5 to complete the youtube channel url.
I need to know how to do the same thing in vBulletin 4.0. I have tried many things with no luck. Thanks!
Lynne
12-27-2009, 06:03 PM
What have you tried? Have you seen this article on the new syntax - First Look at vBulletin 4 Template Variables (https://vborg.vbsupport.ru/showthread.php?t=217569)?
Anseur
12-27-2009, 06:24 PM
Just look at the default template, it already has profile field data in it with the fieldX format, just copy it's syntax changing the number.
mandingo
12-27-2009, 10:42 PM
Got it:
<vb:if condition="$post['field6']"><dd><a href="http://youtube.com/user/{vb:raw post.field6}">{vb:raw post.field6}'s Youtube Channel</a></dd></vb:if>
or:
<vb:if condition="$post['field6']"><dd><a href="http://youtube.com/user/{vb:raw post.field6}">http://youtube.com/user/{vb:raw post.field6}</a></dd></vb:if>
YouBabble
12-28-2009, 07:40 AM
Brilliant Mandingo and everyone else. Thanks for all your help!
claudib
01-03-2010, 11:06 PM
Anyone know the code for putting out a profile field in a widget? ?Thanks
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.