Changing the name displayed in the chat room list...
Changing the name displayed in the chat room list...
Currently I am using the maze example. How can I make it so if a user logins with "jimbo" and is taken to the chatroom. How can I make his name display "Jim" instead of "jimbo"?
I dont really see the need for doing this, the problem being that others identify the user with there login name. I guess if you wanted you could add a user variable after login with the users "preffered" name. And this is what is displayed instead of the users login name.
Check http://www.smartfoxserver.com/docs/ > avatar chat example for help with user variables.
Check http://www.smartfoxserver.com/docs/ > avatar chat example for help with user variables.
Its all about the SmartFox!
I want to be able to have duplicate names in the player list. So if ted01 logs in with that username and then ted2007 logs in. I want to be able to see Ted K. and Ted R. instead of their username to login with.
Lets assume both Teds have a last name that starts with R. Will I be able to send them a PM if they have the same name in the list?
Lets assume both Teds have a last name that starts with R. Will I be able to send them a PM if they have the same name in the list?
Hey JC-
Ok, if i understand what your saying.
You want two people to log in with the same name, well call it Bob.
So user 1 logs in as Bob
and user2 logs in as Bob.
That what you want so far? If so, im not sure if SmartFox will let you do that or not, havent test it. BUT if it does, then YES you can send Private messages to both User1Bob and User2Bob since you are refercing the user by their ID and not their name. Course you would need to give your PM system some way to differentiate the two or you users may get confused.
_-Menser-_
Ok, if i understand what your saying.
You want two people to log in with the same name, well call it Bob.
So user 1 logs in as Bob
and user2 logs in as Bob.
That what you want so far? If so, im not sure if SmartFox will let you do that or not, havent test it. BUT if it does, then YES you can send Private messages to both User1Bob and User2Bob since you are refercing the user by their ID and not their name. Course you would need to give your PM system some way to differentiate the two or you users may get confused.
_-Menser-_
By default no two users can have the same login name. (Not sure if you can turn this off)
Just make a user variable for each user as they log in. Name it something like "listname". The list should be populated with the listname instead of login name. When you try to pm a user, it takes the listname, finds the actual login name, and sends the pm to that user.
Of course if two users do have the same listname, what if in the userlist there are two people called Bob. How would a user know who the Bob is they want to pm. I dont see why you would want two people to have the same name.
Just make a user variable for each user as they log in. Name it something like "listname". The list should be populated with the listname instead of login name. When you try to pm a user, it takes the listname, finds the actual login name, and sends the pm to that user.
Of course if two users do have the same listname, what if in the userlist there are two people called Bob. How would a user know who the Bob is they want to pm. I dont see why you would want two people to have the same name.
Its all about the SmartFox!
I dont see why you would want two people to have the same name.
Yeah... unless there's a good reason for this, I don't see it too
SmartFoxServer does not allow two users with the same name in the same Zone... and this is obviously quite common... does a forum allow two users with the same name? Does Gmail allow two equal accounts?
Also this would break the buddy list which is based on the user name, which is unique.
You can however add a "secondary" nickname, using the User Variables as suggested. In that case you will have to use a server side custom login.
You can find more details about it in the documentation. There's a specific example.
does a forum allow two users with the same name? Does Gmail allow two equal accounts?
Correct me if I am wrong but you cant make this comparison... A forum is a great comparison because your 'login name' is whats being displayed as your 'name' With gmail your 'login name' is not your 'name' When I log into gmail it doesn't say Hello Jonathan@gmail.com it says Hello Jonathan. gmail is what I want. A unique 'login name' but people can have the same 'name'.
- Carl Lydon
- Posts: 298
- Joined: 12 Nov 2007, 16:15
- Location: NYC
- Contact:
How about....
This could work:
1. User inputs prefered name (lname)
2. Flash does lname=lname+"###"+random(100000)
3. Login with lName
4. Client removes the random number when displaying name
That way, you can have everyone logged in with a (very likely) unique name, but may display same name within chat.
But a user probably would be the best way.
-Carl
1. User inputs prefered name (lname)
2. Flash does lname=lname+"###"+random(100000)
3. Login with lName
4. Client removes the random number when displaying name
That way, you can have everyone logged in with a (very likely) unique name, but may display same name within chat.
But a user probably would be the best way.
-Carl
Return to “SmartFoxServer 1.x Discussions and Help”
Who is online
Users browsing this forum: No registered users and 115 guests