vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   User Profile as User Titles (https://vborg.vbsupport.ru/showthread.php?t=61874)

doctiar 02-24-2004 08:49 PM

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.

Andreas 02-24-2004 08:52 PM

Hmm ... you can just allow your normal usergroup to have custom titles (Usergroup Manager, Edit, General Permissions, Can Use Custom Title = Yes)

doctiar 02-24-2004 09:48 PM

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.

Andreas 02-24-2004 10:21 PM

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.

doctiar 02-25-2004 12:30 PM

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.

Andreas 02-25-2004 12:45 PM

Hmm, does work just fine on my testboard.

Which version do you use?
Did you save the profile?

doctiar 02-25-2004 01:21 PM

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!


All times are GMT. The time now is 01:42 AM.

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.01489 seconds
  • Memory Usage 1,731KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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