Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 02-24-2004, 08:49 PM
doctiar's Avatar
doctiar doctiar is offline
 
Join Date: Jan 2004
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default User Profile as User Titles

Is there any Mods that can take custom profile fields and replace the default User Titles?

AN example would be you create a user profile field for Occupations. Once a user registers with your forum and selects the Occupation listed, it would appear alongside his avatar in place of the default titles, Junior Member, Member etc..

I know that Admins can give them selves custom titles in their CP's, but automation of this for every registered user, would be awesome!

THanks.
Reply With Quote
  #2  
Old 02-24-2004, 08:52 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm ... you can just allow your normal usergroup to have custom titles (Usergroup Manager, Edit, General Permissions, Can Use Custom Title = Yes)
Reply With Quote
  #3  
Old 02-24-2004, 09:48 PM
doctiar's Avatar
doctiar doctiar is offline
 
Join Date: Jan 2004
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thats true, but If I do that and allow say regular members to have access to add a custom title, I'm sure I will get alot of jokers out there putting in fake descriptions. I don't want to have to administrate it. If a user selects it once in their CP under their profile it would just appear in all of there posts. Thats what I want.
Reply With Quote
  #4  
Old 02-24-2004, 10:21 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm. Then you could do the following:

1) Create a new custom profile file (select) with all the titles you want to have, set it to required, profile
2) In profile.php FIND
PHP Code:
              else
              {
                      
$customtitle $bbuserinfo['customtitle'];
                      
$customtext $bbuserinfo['usertitle'];
              }
      }
      else
      {
               
$customtitle $bbuserinfo['customtitle'];
               
$customtext $bbuserinfo['usertitle'];
      } 
REPLACE that with
PHP Code:
              else
              {
                      
$customtitle $bbuserinfo['customtitle'];
                      
$customtext $bbuserinfo['usertitle'];
              }
      }
      else
      {
               
$customtitle 2;
               
preg_match("/fieldx = '(.*)'/"$userfields$matches);
               
$customtext $matches[1];
      } 
Where fieldx is the name of your new profile field. Then the users can select the title in User CP.
Reply With Quote
  #5  
Old 02-25-2004, 12:30 PM
doctiar's Avatar
doctiar doctiar is offline
 
Join Date: Jan 2004
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think you are on to Something KirbyDE. I put in your code and it now shows the add custom title bar in the CP for a basic user. I set the fieldx to field7 which is the custom profile field that I want to use. But when I post it still displays Junior Member.

Should not the matches[1] return the value of the selected profile field?

I still don't want to give regular users the ability to create there own custom titles. Just make the selection box = the name of the custom profile.

If that makes sense.
Reply With Quote
  #6  
Old 02-25-2004, 12:45 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, does work just fine on my testboard.

Which version do you use?
Did you save the profile?
Reply With Quote
  #7  
Old 02-25-2004, 01:21 PM
doctiar's Avatar
doctiar doctiar is offline
 
Join Date: Jan 2004
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ya I saved the profile.php

I'm using VB3 RC3.

Perhaps I could PM you and you could take a look at my board or I could view your test board to make sure we on the same page with this.

Thanks!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:02 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.04199 seconds
  • Memory Usage 2,218KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete