WordPress.org

Ready to get started?Download WordPress

Forums

Quick Chat
Make other user roles able to participate in the "Admin's Chat Lounge (7 posts)

  1. nbloggen
    Member
    Posted 1 year ago #

    Hey!

    I am using Quick Chat primarily because the dashboard admin chat widget and was wondering if it is possible to make other users than admins (editors and authors in this case) able to participate in the chat since it is a very useful feature for me having a chat with my whole staff.

    Cheers!

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

  2. Marko-M
    Member
    Plugin Author

    Posted 1 year ago #

    Yes it is possible to modify Quick Chat source to behave this way. I'll try to squeeze this into next version I'm preparing.

    Cheers to you ;)

  3. nbloggen
    Member
    Posted 1 year ago #

    Thank you so much for your reply! I am looking forward to tho new feature.

    Until the new update is released, is there a way for me to configure this on my own?

    I am also very interested in translating your plugin into Swedish. Would you like me to?

    Thanks again!

  4. Marko-M
    Member
    Plugin Author

    Posted 1 year ago #

    Hi, long story short, line 1273 to 1240 of quick-chat.php states:

    public function add_dashboard_widgets() {
        if($this->user_status == 0)
            wp_add_dashboard_widget('quick_chat_dashboard_widget', __('Quick Chat Admin\'s Lounge','quick-chat'), array($this, 'dashboard_widget'));
    }

    To make "Author" (and more privileged roles) to be able to chat convert this code into something like:

    public function add_dashboard_widgets() {
        if(current_user_can('edit_published_posts'))
            wp_add_dashboard_widget('quick_chat_dashboard_widget', __('Quick Chat Admin\'s Lounge','quick-chat'), array($this, 'dashboard_widget'));
    }

    You can replace edit_published_posts with any capability from table here to make it more or less restrictive. I recommend placing 'edit_posts' for "Contributor" (and more privileged roles) and 'read' capability for "Subscriber" (and more privileged roles) but any role from table will work.

    Good luck!

  5. nbloggen
    Member
    Posted 1 year ago #

    Thank you! It Worked great!

  6. edurhetor
    Member
    Posted 1 year ago #

    Thanks, this would be a great feature to include, along with options for editing the dashboard widget like the other widgets.

  7. Peetje92
    Member
    Posted 1 year ago #

    Hi,

    I tried to convert the first code into the second code but i get a error and wordpress deactivates the plugin...

    I found the first code on line: 1298 - 1301.

    Please help?

    Regards,
    Peter

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.