vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Can I show 'real name' instead of 'userid' (https://vborg.vbsupport.ru/showthread.php?t=194125)

sidman 10-20-2008 08:19 PM

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.

Hex_legend 10-20-2008 10:18 PM

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.

SVTCobraLTD 10-20-2008 10:39 PM

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.

sidman 10-21-2008 08:13 AM

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.

sidman 10-22-2008 03:00 PM

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?

Lynne 10-22-2008 03:25 PM

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].

sidman 10-22-2008 05:50 PM

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?

Dismounted 10-23-2008 09:35 AM

Code:

$post[field8]

sidman 10-24-2008 10:54 AM

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.

Lynne 10-24-2008 04:11 PM

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.

sidman 10-28-2008 08:53 AM

:confused: Well, none of that works - is it possible for any coder to give it a shot?


All times are GMT. The time now is 03:28 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.00984 seconds
  • Memory Usage 1,728KB
  • 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)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (11)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