MyBB Community Forums

Full Version: Display Name and Login Name
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Yes, I am looking for a feature similar to IPB's display name and login name.
Its because I am setting up a graphics forum, and on the forum there is teams. (Like on many other forums.) Alot of members, when they join a team, like to put a prefix or suffix on their name to show which team they are in.

Editing the log-in name for each team would be annoying though, as you will have to keep remembering new log-in names.

So I am looking for these features in a plug-in.
- Display name and Login name.
- MYPS plug-in that allows people to change their name using points.

If anyone has one, I would love to have it. :]

Thanks for any help.
It's not particularly hard to make, but it could possibly require a LOT of code modifications.

Where abouts do you want the display name shown? Pretty much everywhere, except the login place?
Meh, since it was so simple anyway, I just made it.

I'm going by the assumption that the only change you want is that users log in with a different name.

This is basically what this mod does. Note that the login name can only be changed through the AdminCP - when a user registers on a board, their login name is set to their username.

This mod does require code edits, but I've included pre-edited MyBB 1.2.10 files.

Note, activate the plugin before uploading the code edits! (or you won't be able to log into your AdminCP Toungue)

Here's the code edits, if you want to perform them manually:
In /admin/users.php
FIND:
makeinputcode($lang->username, "userusername", $user['username'], 25, '', $mybb->settings['maxnamelength'], 0);
ADD BELOW:
makeinputcode('Login name', "loginname", $user['loginname'], 25, '', $mybb->settings['maxnamelength'], 0);

FIND:
makeinputcode($lang->username, "userusername", '', 25, '', $mybb->settings['maxnamelength'], 0);
ADD BELOW:
makeinputcode('Login name', "loginname", '', 25, '', $mybb->settings['maxnamelength'], 0);

In /inc/functions_users.php
FIND:
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."users WHERE username='".$db->escape_string($username)."' LIMIT 1");
REPLACE WITH:
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."users WHERE loginname='".$db->escape_string($username)."' LIMIT 1");

FIND:
$query = $db->query("SELECT uid,username,password,salt,loginkey,remember FROM ".TABLE_PREFIX."users WHERE username='".$db->escape_string($username)."' LIMIT 1");
REPLACE WITH:
$query = $db->query("SELECT uid,username,password,salt,loginkey,remember FROM ".TABLE_PREFIX."users WHERE loginname='".$db->escape_string($username)."' LIMIT 1");




Good luck!


As for allowing users to change their display name, allowing them to edit their username will only change their display name.
As for a money system integration, I've already made a username changer thing (with this mod, it will change the display name instead) for MyPlaza, so I am not going to bother to write it for another money system.
Probably everything can be done by a plugin =P
What i have so far;
UCP => Edit Profile [
[Image: dname_ucp.jpg]
UCP => Change Name [
[Image: dname_changename.jpg]

Edit:
Done, With No File Changes;
^ ?

You mean no code modifications? Maybe, but the implementation won't be that nice.
Well, Both are correct.
Thanks very much you two :]
LeX-, you have a download for that? I'm interested in how you did it without code edits.

Anyways, something hit me. I specifically wrote code to allow multiple people to have the same display name, however, that may be undesirable (PM'ing will be an issue too).
Not hard to remove that code - at work now, so can't do anything.
Can someone update this for 1.4, please?
Can someone update this for 1.4, please?