PDA

View Full Version : HOWTO: Set a Profile field visible or not


delicjous
03-18-2015, 05:52 PM
Hi Everyone,

If you want to set a profilefield to the conversation userinfo you could do it by the following:

look here:
http://www.vbulletin.com/forum/blogs/lynne-s-how-to-s/3971574-%5Bvb5%5D-user-profile-fields-in-the-postbit-templates

If you want to show it only if the choice or text is like Yes, no or anything else you could do it with the following code:

Example for User is not available:

I made a radiobutton -profilefield with 2 options no for standard in the first line and yes

no
yes

in the conversation_fields template I change the code to:

please look into next post! Had to edit this

So the field is only visible if the user set Yes.

Think it is a nice thing to do a lot of stuff with and it hopefully help somebody here...

delicjous
05-08-2015, 02:05 PM
You have to edit the code to:

<vb:if condition="!empty($conversation['userid'])">
{vb:data userInfo, user, fetchProfileInfo, {vb:raw conversation.userid}}
<br />
<vb:if condition="$userInfo['field10'] == 'yes'"><li><span style="color: red;"><label>{vb:phrase field10_title}</label></span></li></vb:if>
</vb:if>

Because the first code will output an error.
For more info look here: http://tracker.vbulletin.com/browse/VBV-14645?page=com.atlassian.jira.plugin.system.issuet abpanels:all-tabpanel

Thanks to Sebastiano Vassellatti and the developer who helped him!