PDA

View Full Version : Let users chose between predefined user titles


Tettinntil
07-04-2010, 04:18 PM
I know that I can let user groups have the permission to chose their personal user title. But is there a mod letting admin define a set of user titles that are available to choose from in user CP?

BirdOPrey5
07-05-2010, 02:55 AM
I don't know a mod to do this off-hand, there may be I just never cared to look...
But you could do this on your own by making a custom profile field "User Profile Fields" on the admin cp menu... Make a drop down box, add all your pre-defined titles... then add the field to display in your postbit manually.. just drop in the code:

<div>
$vbulletin->userinfo['field7']
</div>

replace 'field7' with whatever name you get from vbulletin when you make your new field. There is an article you can search for for more help in adding custom fields to the postbit. (or postbit_legacy, whichever you use).

Tettinntil
07-05-2010, 07:28 PM
Thanks, I might give it a try. Is it also possible to give admission to certain usergroups only?

BirdOPrey5
07-05-2010, 07:55 PM
You could modify the $vbulletin->userinfo['field7'] code to be in an if statement to only display for users of certain groups but off hand I don't know how you would stop user's from outside that group from choosing a title- you can just block it from showing. Maybe put in the description "This field will not affect users in x,y,z usergroups."

James Birkett
07-05-2010, 11:01 PM
Yeah, the method I did was this for something similar. The only way to prevent the drop-down from showing is to create a conditional on the hook that fetches custom fields and telling it to only display for X, Y, Z.

Just put a notice saying it'll only work for certain usergroups.