[Request] Display Names & User Names

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Ideas Centre
Locked
ilovewaffles
Registered User
Posts: 1
Joined: Mon Jan 14, 2008 6:58 am

[Request] Display Names & User Names

Post by ilovewaffles » Sun Jan 20, 2008 1:54 pm

I've been looking through both phpbb3 and phpbb2 mods and haven't seen any clear mods for this. There have been dozens of requests but none with an actual mod.

I was hoping for a mod that allows a custom unique display name different than a unique username. Both be input during registration and it need not change, just be shown instead of the username on all posts / edits / etc, while users still type their username to login.

I personally would use this for security reasons on mine... since guessing the info isn't exactly hard if you're already given half of the requirements to login :p

z3frog
Registered User
Posts: 3
Joined: Fri Jan 25, 2008 8:30 pm

Re: [Request] Display Names & User Names

Post by z3frog » Tue Jan 29, 2008 8:35 pm

I agree I would really like this feature.
It would be even cooler if the display name could be bound to the display name in active directory (basically the cn attribute in LDAP I think).

I wouldn't actually mind making a mod myself but I have no idea how to.

pepe_boy
Registered User
Posts: 7
Joined: Tue Jan 29, 2008 9:48 pm
Location: Portugal

Re: [Request] Display Names & User Names

Post by pepe_boy » Wed Jan 30, 2008 1:53 am

More or less what I want to!! i think it's a good idea, i'm needing this 2 :) introduce and display the name of the user :)

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51726
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: [Request] Display Names & User Names

Post by Brf » Wed Jan 30, 2008 2:02 am

Create a custom profile field for the other name, and then display that one rather than the username.

User avatar
guardog
Registered User
Posts: 61
Joined: Sun Aug 03, 2008 2:19 pm

Re: [Request] Display Names & User Names

Post by guardog » Mon Aug 04, 2008 10:18 am

Brf wrote:Create a custom profile field for the other name, and then display that one rather than the username.
Which will involve heavy modifications as mentioned here. I agree this can be implemented for security reasons, which is also the reason for me to post here :P . We still need to consider the functionality of a display name, as in sending PM, word censors on display name. Other factors like unicode support for display name, option to hide usernames in ACP, etc. which I think should be too difficult for us to make a MOD. :geek:
Dream and reality...
What's the difference?...

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51726
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: [Request] Display Names & User Names

Post by Brf » Mon Aug 04, 2008 11:20 am

It seems redundant to me to hide a username for security reasons, since you could still use their "display name" for all forum functions. The only reason I see for "security" would be to hide their username from non-phpbb reasons and that would only make sense if you were doing something silly like making them use SS# as their username or something. If you needed to know ss#, or student#, or whatever, you could have them enter that as a hidden custom field.

User avatar
guardog
Registered User
Posts: 61
Joined: Sun Aug 03, 2008 2:19 pm

Re: [Request] Display Names & User Names

Post by guardog » Mon Aug 04, 2008 2:20 pm

Brf wrote:It seems redundant to me to hide a username for security reasons, since you could still use their "display name" for all forum functions. The only reason I see for "security" would be to hide their username from non-phpbb reasons and that would only make sense if you were doing something silly like making them use SS# as their username or something. If you needed to know ss#, or student#, or whatever, you could have them enter that as a hidden custom field.
After some thinking, I do think it's redundant too :lol: , anyway maybe what I meant is not security, but only anonimousity, which is not needed by my forum since it's only a small community. Some people might want usernames which is easy to remember (having their real name) but they want to be anonymous at the same time as well, where the 'hiding username' comes into play. Hope you understand what I meant. :mrgreen:
Brf wrote:Create a custom profile field for the other name, and then display that one rather than the username.
How can I code it in the way that: If there's no display name (field name display_name) provided, show the username instead?
Dream and reality...
What's the difference?...

User avatar
guardog
Registered User
Posts: 61
Joined: Sun Aug 03, 2008 2:19 pm

Re: [Request] Display Names & User Names

Post by guardog » Tue Aug 05, 2008 10:45 am

Found the solution, please confirm that there's no problem with my code:
  1. Firstly a custom profile field display_name is created.
  2. Remember to enable it to be shown in topic pages, profiles or memberlist (whenever you want) in ACP Index > Load settings.
  3. For this instance, I've done it in topic pages, i.e. edit viewtopic_body.html
  4. FIND

    Code: Select all

    				<b class="postauthor"<!-- IF postrow.POST_AUTHOR_COLOUR --> style="color: {postrow.POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{postrow.PROFILE_DISPLAY_NAME_VALUE}</b>
    
  5. REPLACE WITH

    Code: Select all

    				<b class="postauthor"<!-- IF postrow.POST_AUTHOR_COLOUR --> style="color: {postrow.POST_AUTHOR_COLOUR}"<!-- ENDIF -->><!-- IF postrow.PROFILE_DISPLAY_NAME_VALUE eq "" -->{postrow.POST_AUTHOR}<!-- ELSE -->{postrow.PROFILE_DISPLAY_NAME_VALUE}<!-- ENDIF --></b>
    
  6. This should function as what I've wanted - when the user has entered a display name, it'll replace the username as the author's name. Otherwise, the username will be displayed.
Last edited by guardog on Tue Aug 05, 2008 11:33 am, edited 1 time in total.
Dream and reality...
What's the difference?...

User avatar
guardog
Registered User
Posts: 61
Joined: Sun Aug 03, 2008 2:19 pm

Re: [Request] Display Names & User Names

Post by guardog » Tue Aug 05, 2008 11:20 am

And if you think you don't want to have the "Display Name : XXX" listed again in the custom fields of poster profile, further edit the viewtopic_body.html:

FIND

Code: Select all

					<!-- BEGIN custom_fields -->
						<br /><b>{postrow.custom_fields.PROFILE_FIELD_NAME}:</b> {postrow.custom_fields.PROFILE_FIELD_VALUE}
REPLACE WITH

Code: Select all

					<!-- BEGIN custom_fields -->
						<!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "Display name" --><!-- ELSE -->
						<br /><b>{postrow.custom_fields.PROFILE_FIELD_NAME}:</b> {postrow.custom_fields.PROFILE_FIELD_VALUE}
						<!-- ENDIF -->
Assuming that your "display_name" custom profile field is set to be shown to users as "Display name" in their profile.

Question: How to point the IF statement to my field identification (as in: display_name)?
EDIT: I've scanned through the functions_profile_fields file, I guess it's a 'no' then?

This will prevent the "Display name:" to be repeated again in the poster profile.
Dream and reality...
What's the difference?...

nouveau
Registered User
Posts: 256
Joined: Tue Mar 27, 2007 1:51 pm

Re: [Request] Display Names & User Names

Post by nouveau » Thu Aug 07, 2008 11:00 pm

Completed development MOD is located here

http://www.phpbb.com/community/viewtopi ... &t=1116805

The login name is separate from the username, leaving basically everything that ties into the username field as it is to minimise issues with other forum functions.

The login name should only be known to admins / moderators if they have relevant permissions and the user themselves.

Admins will basically have full functionality over the login name as they do with the username.
Formerly known as xceler8shun

User avatar
ej311
Registered User
Posts: 29
Joined: Mon Aug 04, 2008 4:53 pm

Re: [Request] Display Names & User Names

Post by ej311 » Fri Aug 29, 2008 7:38 am

Edited because I can't delete the post.

Locked

Return to “[3.0.x] MOD Requests”