WordPress.org

Ready to get started?Download WordPress

Forums

Quick Chat
Hide Quick Chat if the user is NOT registered (7 posts)

  1. atiquetedevelopers
    Member
    Posted 3 years ago #

    Hi!

    I want hide ALL the Quick Chat in my sidebar if the user is not registered in my WordPress. I put the Quick Chat as Widget.
    Any help?

    Thanks!

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

  2. Marko-M
    Member
    Plugin Author

    Posted 3 years ago #

    Hi. This isn't built into Quick Chat so you or someone who knows how to do this will need to tweak Quick Chat code. If you really need this and have nobody to do this you can contact me and I will do it for peanuts in the form of small donation. Good luck!

  3. atiquetedevelopers
    Member
    Posted 3 years ago #

    Solved:

    In sidebar.php

    <?php if ( is_user_logged_in() ) : ?>
       <div class="STYLE OF YOUR SIDEBAR">
    	<?php echo quick_chat_display_chat(350,'Chat',0,''); ?>
       </div>
    <?php endif; ?>

    350 = Height
    'Chat' = Name of the Chat
    0/1 = No List Users/List Users
    Last parameter = Where will user list be placed ('right', 'left' or 'top') if third parameter = 1.

  4. Marko-M
    Member
    Plugin Author

    Posted 3 years ago #

    I would have integrate it into other options a little but this way will do ;) Glad you got it working

  5. common8308
    Member
    Posted 3 years ago #

    For the users who want to use this option before the official version is released..

    In quick-chat.php : line 1261

    function quick_chat_display_chat($height = 300, $room = 'default', $userlist = 1, $userlist_position = 'left', $gravatars = 1, $gravatars_size = 32) {
      (..contents..)
    }

    add the if..else codes in the start and the end of the function.

    function quick_chat_display_chat($height = 300, $room = 'default', $userlist = 1, $userlist_position = 'left', $gravatars = 1, $gravatars_size = 32) {
      if ( is_user_logged_in() ) {
        (..contents..)
      }else {
        return "You must login if you want to participate in chat.";
      }
    }
  6. Marko-M
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks to Dave who donated 50$ Quick Chat now has shortcode attributes and sidebar widget check boxes to control chat room visibility separately for guest and logged in user. This feature will be inside next QC version that will be released in a few days. Thanks again Dave!

  7. Marko-M
    Member
    Plugin Author

    Posted 2 years ago #

    Amongst other changes Quick Chat 2.33 has following features:

    • Add "loggedin_visible" and "guests_visible" shortcode attributess for embedded chat (see FAQ for more)
    • Add "Visible to logged in users" and "Visible to guest users" check boxes to Quick Chat widget settings (see FAQ for more)

    Enjoy!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags