Page 1 of 1
How to make nickname visable ( no username )
PostPosted: 10 May 2013, 21:59
by Pala
Hello to all,
how I can make my chat so that the nicknames visable and not the usernames like it is now ?
Please help me with this its very important for my site.
Best regards,
Pala
PostPosted: 11 May 2013, 14:54
by Jason
In the includes/config.php file you can change the DB_USERTABLE_NAME value to be your database field that holds the nickname instead of the username.
PostPosted: 07 May 2014, 10:53
by mattmcguire
Would it be possible to incorporate the function get_username($userid) from the /includes/integration.php? That way we can tweak the results as necessary. In my case, the table I'm using has both firstName and lastName fields. Within the integration.php I have it concatenate the two and return that as the users_name:
$users_name = $row['firstName'].' '.$row['lastName'];
But it could be further tweaked to limit the results to a certain number of characters, or only show first names and last initials, etc.
This could give us a little more customization without having to alter our databases to include fields aren't necessary.
Thanks for the great work so far!
PostPosted: 07 May 2014, 14:53
by Jason
Yes, but you need to change the friends/online list MySQL statements as well and concat the username part.
The get username function is only for the logged in user for their GUI.
Topic Closed
PostPosted: 16 Dec 2014, 00:26
by Staff Bot
[b]This thread has been locked because the last post is greater than six months old. There is a good chance that the information in this thread is outdated. Please open a new topic if you wish to discuss this further.[/b]