vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Let users chose between predefined user titles (https://vborg.vbsupport.ru/showthread.php?t=245877)

Tettinntil 07-04-2010 04:18 PM

Let users chose between predefined user titles
 
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:
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.


All times are GMT. The time now is 06:56 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01077 seconds
  • Memory Usage 1,711KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete