Current time: 03-16-2010, 06:17 PM Hello There, Guest! (LoginRegister)


Post Reply 
Display Name and Login Name
12-09-2007, 10:33 AM
Post: #1
Display Name and Login Name
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.
Find all posts by this user
Quote this message in a reply
12-09-2007, 11:09 AM
Post: #2
RE: Display Name and Login Name
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?
Visit this user's website Find all posts by this user
Quote this message in a reply
12-09-2007, 12:09 PM (This post was last modified: 12-09-2007 12:10 PM by Yumi.)
Post: #3
RE: Display Name and Login Name
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:
PHP Code:
makeinputcode($lang->username"userusername"$user['username'], 25''$mybb->settings['maxnamelength'], 0); 
ADD BELOW:
PHP Code:
makeinputcode('Login name'"loginname"$user['loginname'], 25''$mybb->settings['maxnamelength'], 0); 

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

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

FIND:
PHP Code:
$query $db->query("SELECT uid,username,password,salt,loginkey,remember FROM ".TABLE_PREFIX."users WHERE username='".$db->escape_string($username)."' LIMIT 1"); 
REPLACE WITH:
PHP Code:
$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 File(s)
.zip  dispname.zip (Size: 17.92 KB / Downloads: 99)
Visit this user's website Find all posts by this user
Quote this message in a reply
12-09-2007, 12:28 PM (This post was last modified: 12-09-2007 02:09 PM by LeX-.)
Post: #4
RE: Display Name and Login Name
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;

Visit this user's website Find all posts by this user
Quote this message in a reply
12-09-2007, 12:32 PM
Post: #5
RE: Display Name and Login Name
^ ?

You mean no code modifications? Maybe, but the implementation won't be that nice.
Visit this user's website Find all posts by this user
Quote this message in a reply
12-09-2007, 01:14 PM
Post: #6
RE: Display Name and Login Name
Well, Both are correct.
Thanks very much you two :]
Find all posts by this user
Quote this message in a reply
12-10-2007, 04:15 AM
Post: #7
RE: Display Name and Login Name
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
11-25-2008, 04:24 PM
Post: #8
RE: Display Name and Login Name
Can someone update this for 1.4, please?
Find all posts by this user
Quote this message in a reply
02-06-2010, 11:13 AM
Post: #9
RE: Display Name and Login Name
Can someone update this for 1.4, please?
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: