Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-20-2008, 08:19 PM
sidman's Avatar
sidman sidman is offline
 
Join Date: Oct 2008
Location: Assam, India
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Can I show 'real name' instead of 'userid'

In all posts, is it possible to show the 'real name' (a custom user profile field - required on registration) instead of 'userid' ?
Since our forum is an alumni forum, it will help greatly in more accurately identifying the poster to everybody else.
Reply With Quote
  #2  
Old 10-20-2008, 10:18 PM
Hex_legend Hex_legend is offline
 
Join Date: May 2007
Posts: 750
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes you can, although it will take a lot of setting up. The userid is called in a lot of places, so I believe you will have to replace all instances of that as well.
Reply With Quote
  #3  
Old 10-20-2008, 10:39 PM
SVTCobraLTD SVTCobraLTD is offline
 
Join Date: Jul 2007
Location: PA
Posts: 841
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why not have them register with their first initial and last name or something of that sort. You could even adjust the ones that are already registered.
Reply With Quote
  #4  
Old 10-21-2008, 08:13 AM
sidman's Avatar
sidman sidman is offline
 
Join Date: Oct 2008
Location: Assam, India
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Why not have them register with their first initial and last name or something of that sort.
The thing is, the old school forum site was on a YABB platform - for about 11 years now. In YABB you had a required filed in registration called "choose displayed name", which would be the field displayed on all posts/threads etc.
In addition we also urged members to type in displayed names alongwith batch year(year the person passed out from school) eg: Siddhartha Chaliha '91. This helped in users passing out the same year quickly identify posts made by their classmates.
I know we can have a custom field called 'batch year' in VB too, and postbit it, but the user name is the one that really stands out, apart from it being displayed on the 'who made last post' etc columns.
Reply With Quote
  #5  
Old 10-22-2008, 03:00 PM
sidman's Avatar
sidman sidman is offline
 
Join Date: Oct 2008
Location: Assam, India
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is the phrase to be changed (in all templates) [userid] or $post[username]?

Can someone let me know the phrase which represents the user login id?
Reply With Quote
  #6  
Old 10-22-2008, 03:25 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's not a phrase.

$post[username] is the username - yours is sidman
$post[userid] is the userid number - yours is 279918

Those two variables may only be used for posts in a thread. If you are changing it in thee members profile, you will have to use $userinfo[username] and $userinfo[userid].
Reply With Quote
  #7  
Old 10-22-2008, 05:50 PM
sidman's Avatar
sidman sidman is offline
 
Join Date: Oct 2008
Location: Assam, India
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Lynne!
Much obliged!:up:

One more Q then?

If I have created a custom user field in Admin CP, called it "Real Name", varname is $vbphrase[field8_title] and text is Real Name, then to change a post to show a user's real name instead of where it shows the user's login id (in blue, bold and underlined), what do I have to do -

Change all $post[username] to $post[field8_title]?

Will this be enough to do the job - atleast in the user posts?
Reply With Quote
  #8  
Old 10-23-2008, 09:35 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
$post[field8]
Reply With Quote
  #9  
Old 10-24-2008, 10:54 AM
sidman's Avatar
sidman sidman is offline
 
Join Date: Oct 2008
Location: Assam, India
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've managed to change the code to now show the users "real name" as against his/her "username" (or login id).

Would anyone know the variables to change to show the user's 'real name' in the main thread display? (esp the last post column?)

Many of our users visit threads if they know it's a friend/close peer (same batch) who's made a post - and the thing about login id's are that they're, by nature, not very clear.
Reply With Quote
  #10  
Old 10-24-2008, 04:11 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It would be in the forumhome_lastpostby template. They use $lastpostinfo in there, so try $lastpostinfo[field8]. If that doesn't work, you'll probably have to write a plugin to grab the info.
Reply With Quote
Reply


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 08:53 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.03992 seconds
  • Memory Usage 2,251KB
  • 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
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete