WordPress.org

Ready to get started?Download WordPress

Forums

Quick Chat
Nicknames instead of Usernames (23 posts)

  1. Lord_Novice
    Member
    Posted 2 years ago #

    Hello Marko-M, I was wondering if you could add an option to use the Nickname instead of the Username.
    I don't really like exposing people's username to everyone, and people can even edit their nicknames from their profile.

    Thanks again e good job on this great plugin!

    http://wordpress.org/extend/plugins/quick-chat/

  2. Marko-M
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,
    Making it use Nicknames instead of usernames is trivial but usernames were selected because of their uniqueness. Nicknames aren't unique so it might happen that two users share same chat name and Quick Chat would treat them the same. We should think of some clever way to give initial chat names without doing any extra checks for uniqueness because that would make impact on performance. If you have any ideas feel free to say :)

    Thanks for the nice words about my work I appreciate it ;)

  3. Lord_Novice
    Member
    Posted 2 years ago #

    I see, it's just I've always used those kind of shoutboxes for registered members only with Avatar and Nicknames, but none existent for WordPress today pleases me, except for yours. :]

    Couldn't you hook by the username but only display the Nickname? At least you have the avatar to help identify each user if by any chance two or more people have the same nick.

    Since I can only speak for myself, let me explain how I would use the plugin and why I prefer nicknames, maybe that will help you. I have a shoutbox on a gaming community, with people having different characters that most of the time doesn't reflect their account names, so the nicks help us identify each other.
    And since we are not a huge community, I'm sure we won't have people sharing nicknames, neither people trying to impersonate others, as we would shortly caught and ban them.

    Thanks for the time. ^^

  4. Marko-M
    Member
    Plugin Author

    Posted 2 years ago #

    It's just a line or two change so here you go my friend, nickname version of Quick Chat 2.33:

    Quick Chat 2.33 nickname

    Just make sure people have unique nicknames. Enjoy!

  5. Lord_Novice
    Member
    Posted 2 years ago #

    Wow, thanks a lot! *-*
    I will start using it right away.

    And I just noticed how you posted this 8 minutes ago. I swear I didn't check this page once since my last post. xD

    Cya! o/

    Edit: Just tested and it still shows usernames. Also the smilies are not working, when I click any of them, it just writes "undefined" non-stop into the text area.
    But thanks for the effort! ^^

  6. Marko-M
    Member
    Plugin Author

    Posted 2 years ago #

    The thing I forgot to write is that you need to clear your browser history to flush old history/cookies and reload page a few times. The undefined problem might be this but if normal Quick Chat v2.33 worked with smilies then I believe it's all about history/cookies and it'll work with this "nickname" v2.33version. The smilies part of code is is identical to the "regular" v2.33, I haven't touched that. Good luck!

  7. Lord_Novice
    Member
    Posted 2 years ago #

    Everything worked like a charm after clearing the cache and doing those modifications. ^^
    Thanks a lot!

    And just to be sure so I don't do anything stupid, I won't be able to update the plugin if you release new versions, is that right?

  8. Marko-M
    Member
    Plugin Author

    Posted 2 years ago #

    No worries your mod is trivial. You just need to open quick-chat.php from any future QC version and replace all instances of $current_user->user_login with $current_user->nickname. And clear your browser cache of course :)

  9. Lord_Novice
    Member
    Posted 2 years ago #

    I don´t wanna be that annoying guy, but could I ask you a for few features? If you like them and have the time to implement, would be great.
    - Option to enable/disable the date & time output. So if disabled, posts won´t have the time shown and it will one less line to make the chat more compact.
    - If option to choose your own nickname is disabled, remove the "Nickname" textfield from the chat, again to make it compact.
    - Option to use avatars from WordPress profile too, instead of just Gravatars. Although I use Gravatars and like it, I hate making people have to edit the WordPress profile AND the Gravatars too. Many people just don´t use it.

    Would be great to see those changes in the future, but if not, that's Ok anyway.
    Thanks a lot for the quick replies, support and everything.

  10. Marko-M
    Member
    Plugin Author

    Posted 2 years ago #

    All this can be hidden with few lines of code using CSS, but I guess not everyone is comfortable with editing plugin files so I might put some checkboxes when I find time. Thanks for your ideas ;)

  11. Lord_Novice
    Member
    Posted 2 years ago #

    No problem at all. ^^

    Also, one more thing you could take a look at:

    Last wednesday afternoon my website went extreme slow, with each page taking 20~40 seconds to respond, then my host took my website and said something was slowing the whole server, probably some ajax script.

    Only a few hours ago my website was put back online, and after a lot of search I realized the only major change I did on the blog was installing your plugin and then I saw the "Refresh every 1 second", so I changed to 60 seconds (although it would be awesome to have something faster as I´ve had with other plugins) and I´m now waiting for my host to respond if that resolved the problem.

    I´ve never had any problem with other ajax plugins, even with shoutboxes that refreshed via ajax. Don´t know if other people have had that same problem or its just me, but maybe its something worth checking.

    Thanks for your patience and care to respond all my messages.
    Cya o/

  12. Marko-M
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks for the report, no it isn't just your host. If you have a lot of visitors, shared hosting and keep QC inside sidebar your server might get into problems. The problem is that chat applications are very resource intensive because of their real time nature and because of that it isn't easy to make one using only Ajax and PHP/html.

    In the next version I will double the default user and message refresh times and I'm working on compatibility with WordPress caching plugins. That should make Quick Chat much lighter on the server. Unfortunately even then server demand would keep increasing with the number of concurrent users, that can't be avoided.

  13. Ulfsby Webdesign
    Member
    Posted 2 years ago #

    It is a securiy issue that the admin username is shown when admin chats. It would hav been better to use the public name that is used as author in posts.

  14. Marko-M
    Member
    Plugin Author

    Posted 2 years ago #

    True, there are some security implications but that was the only way to ensure uniqueness of chat user names when users first come to the chat page. Any other means like checking is there any user with that user name while page is loading would have significant performance implications and chat applications are already very resource intensive. This way I'm giving login names (unique by definition) to subscribers and don't need to worry about uniqueness. One way to triage this problem is to use public names only for admin users and let them ensure their public name is unique?

  15. Ulfsby Webdesign
    Member
    Posted 2 years ago #

    Do the chat user names need to be unique? Not registered users can choose any name anyway. If they need to be unique, your propsal to use public names for admins only is OK.

  16. Marko-M
    Member
    Plugin Author

    Posted 2 years ago #

    Yes the whole system assumes that chat user names are unique and when you change your username ajax request goes back to server to check is it unique (already taken or reserved for any of the registered users). The idea is that when you see user Marko on my site you know you are talking to me because no one else can take this name no mater am I currently on the chat or not. This is ensured in a way that registered users login names are reserved so when someone registers to your site automatically he gets unique chat identity trough login name. This way allowing admins to use their nicknames makes sense cause system can assume that admins won't do funny things with chat user names.

  17. harsha52
    Member
    Posted 2 years ago #

    Hi i have a website where only my and my friends are present. i need a plugin such that only me and my friends should be able to chat. Can some one help please

    Thanks
    Harsha

  18. ibbrxx
    Member
    Posted 1 year ago #

    Just installed quick chat the latest version on the latest version of wordpress. I am having problem showing the chat on the sidebar to all the users. It seem quick chat is only working for admin users with my installation where I am trying to show it to all the registered users and subscribers as well. What am I missing here? Waiting for your quick response.

  19. Marko-M
    Member
    Plugin Author

    Posted 1 year ago #

    ibbrxx could you please start a new thread because your question is separate from this threads topic.

  20. onepack
    Member
    Posted 1 year ago #

    It is the same concern that I had in my previous case here. There are a lot of attacks on the website by people trying to login under the username "Admin". Giving away the real username is like giving your bankcard without the pincode.
    Admins and other editors should always be shown by their nickname and never by their username. Those people are the owners of the website and can make sure to only use a unique name. Also the nicknamens of Admins and editors should be protected by default so no others could use those names.

  21. Marko-M
    Member
    Plugin Author

    Posted 1 year ago #

    Yes I totally understand that it is scary to publish your login name, but if you have a decent password no one can log into your web site. I will take another look at the code to try to find different way on achieving uniqueness for subscribers, but so far I've found none other then login names. It would be possible to use nicknames for admin types of users (what ever roles you select in QC admin options) because those are users you trust.

    Right now login names of registered users are protected, If Quick Chat goes to using nicknames I'll protect nicknames.

  22. radgh
    Member
    Posted 1 year ago #

    Why is there an option to let users change their username, but no nickname support? Isn't that the point of nicknames? I say you should get rid of the option to let users change their chat name and instead support nicknames.

    For now I'm using javascript to change the username field and hide it, very hacky. What's a better way to change to show nicknames? Hopefully without having to use this "change username" box.

  23. Marko-M
    Member
    Plugin Author

    Posted 1 year ago #

    Changing user name after chat is loaded goes trough different checks like duplicate user names inside single chat room, reserved user names check etc... When chat is first loaded I had to ensure that no duplicate names exist without running any special checks and using login name was obvious and gave most performance because chat doesn't have to query database when setting initial user name.

    I see that the feature of using nicknames is very important so I'll change this behavior for the next version. Until then you don't need to use special Javascript hacks, just change

    $this->user_name = $current_user->user_login;

    from line 245 of quick-chat.php v4.10 into

    $this->user_name = $current_user->display_name;

    But to make all features work fine make sure logged in users do not use same display names. In the next version I will make display names used by default and do the checks when deciding on initial user name so all will be fine.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags