Vbulletin 4 : how to display User Profile Fields(Multiple-Selection) in other pages.
Collapse
X
-
What type of profile field did you create?
Have you read this - How To Add A Profile Field To The PostbitLeave a comment:
-
Thanks for the reply, in this case, if i changed the field content, for example added another option fish, i have to change from my plugin as well
how is the vbulletin link the number to the text? i did a print_r($vbulletin) output, but i can't see the select text(cat, dog etc) anywhere. it displays ok for vbulletin build-in profile editor
What you probably want to do is in your plugin, define the text you want to display. Something like:
PHP Code:if ($vbulletin->userinfo[field9] == '1') $postcode = 'Cat';
else if ($vbulletin->userinfo[field9] == '2') $postcode = 'Dog';
else if ($vbulletin->userinfo[field9] == '0') $postcode = '';
vB_Template::preRegister('navbar',array('postcode' => $postcode));
Leave a comment:
-
What you probably want to do is in your plugin, define the text you want to display. Something like:
PHP Code:if ($vbulletin->userinfo[field9] == '1') $postcode = 'Cat';
else if ($vbulletin->userinfo[field9] == '2') $postcode = 'Dog';
else if ($vbulletin->userinfo[field9] == '0') $postcode = '';
vB_Template::preRegister('navbar',array('postcode' => $postcode));
Leave a comment:
-
Vbulletin 4 : how to display User Profile Fields(Multiple-Selection) in other pages.
Hi all
I am trying to change the template and display the user profile fields on other pages.
I created a plugin and get the value from $vbulletin->userinfo[field*]; and register it to the template. somegthings like below. but the problem is, it works fine for text field, but for selection field, it will display a number, not the selected text data. any idea how do i display the selected text??
PHP Code:$postcode = $vbulletin->userinfo[field9];
vB_Template::preRegister('navbar',array('postcode' => $postcode));
Tags: None
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Leave a comment: