Preferred Name (Display Name)
This modification is in the archives.
This minor template edit will enable your users to have a "Preferred Name" instead of their username showing on their posts and navbar. Users would still log in using their username and password just that their preferred name would show up instead of their username.
This will not change the displayed name in the "Who's online" box. This would be a good protection against cases where an admin from another site steals passwords. Meaning they try to log in with the password of a username they recognise. But in the end, it isn't really the right username. Regardless .. this is a feature that would be useful to some members. Step 1. Go into your Admin CP User Profile Fields Add New Profile Field Single Line Text Box Name: Preferred Name Description: What would you like to be known as on the site? you will still use your username to log in. Required: Yes, Always Private Field: No Field Searchable: No Show On Member List: No Leave everything else the same. Make a note of the user field number that is assigned to this field (for this example, we will use Field5) Step 2. In Styles & Templates Open Navbar (Under Navigation Templates) Search For: Code:
$bbuserinfo[username] Code:
$bbuserinfo[fieldX] Save. Open up Postbit / Postbit Legacy (Depending on which one you use. Search For: Code:
$post[musername] Code:
$post[fieldX] Save. Step 3. Click Language & Phrases. Search For Phrase. "Thank you for logging " Click Edit. Replace with: Code:
Thank you for logging in, $bbuserinfo[fieldX] . Done. No more template edits. THANKS TO
REMEMBER TO CLICK Download No files for download. Screenshots |