WordPress.org

Ready to get started?Download WordPress

Forums

Quick Chat
Private chat only (5 posts)

  1. Mike
    Member
    Posted 1 year ago #

    Hi,

    Thanks for this great plug-in. I just have one question though.

    May I know if and how I can only use private chats? Say, I'm viewing a user's profile page (/profile/[username]), I want to be able to show a button to start a private chat with [username]. Is that possible? PHP code, shortcode or JS code would be fine :)

    Thank you!

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

  2. Marko-M
    Member
    Plugin Author

    Posted 1 year ago #

    Hello Mike you're probably talking about BuddyPress because WordPress doesn't have user profile pages. What you need it possible but you would additional code probably in the form of BuddyPress plugin to add Quick Chat button to user profile pages. Also code should be in place to detect is user online or not when you look at someone's profile. I can create this code for you but you would need hire me to do so. For questions you can contact me using contact form on my blog. By the way this is a great idea.

  3. Mike
    Member
    Posted 1 year ago #

    Hi Marko,

    Thanks for replying. I'm not using BuddyPress since it is overkill for what I really need. I have my profile page set-up using several shortcodes and I'm using the UserOnline plugin to check where the user who's profile is being viewed is online or not.

    I guess what I'm asking for is a little direction on how I can achieve that direct private message block when a button is clicked. The JS function which handles event when a user's name is clicked on the chat box would be a good start.

    Thanks!
    Mike

  4. Marko-M
    Member
    Plugin Author

    Posted 1 year ago #

    Little direction it is :) This is short intro on how QC Private Chat works. When you click someones name system message is broadcast-ed to room in question. You can look at jQuery("div.quick-chat-single-user a").live('click', function(e){}); inside quick-chat-core.js. This message carries json encoded payload and receiver will parse that json and broadcast message if it accepts invitation or not (all done by long polling loop with Javascript end inside jQuery.quick_chat_update_messages function. All users receive/parse all system messages but they ignore them unless json payload states it is targeted to them. So to invite user to private chat currently you must be in a same chat room as other side. This isn't actually appropriate to your application. I could implement system differently but for current Quick Chat use case scenario this system was appropriate, for your use case it should be implemented differently. Good luck!

    Regards,
    Marko

  5. Mike
    Member
    Posted 1 year ago #

    Awesome, thank you!

    This should be enough info for me to work with.

    Thanks again.
    Mike

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.