Display Name and Login Name
#1
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.
Reply
#2
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?
Reply
#3
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.


Attached Files
.zip   dispname.zip (Size: 17.92 KB / Downloads: 224)
Reply
#4
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;
Reply
#5
^ ?

You mean no code modifications? Maybe, but the implementation won't be that nice.
Reply
#6
Well, Both are correct.
Thanks very much you two :]
Reply
#7
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.
Reply
#8
Can someone update this for 1.4, please?
Reply
#9
Can someone update this for 1.4, please?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)