[Membership 2 Pro] Simple chat

Hello,
I would like to know if the Membership 2 Pro plugin is either a chat or are you offering a simple plugin to chat between two members that also keeps track of communication history?
And also if it is possible in Membership 2 Pro searching for members of the filter in the frontend?
Thank you for answer

  • Adam Czajczyk

    Hi david

    I hope you're well today and thank you for your question!

    The Membership 2 Pro plugin is not a chat plugin and it doesn't include any chat features. It's a plugin that let's you build a subscription-based site where users can register (for free or as paying members, either for one time fee or for recurring payments) and get access to otherwise inaccessible content on your site.

    The Membership 2 Pro plugin can protect pretty much every content you got on site so if there's for example a page where the chat is embedded, it can be protected in that way that only paying members have access to it. But there's no chat itself built-in.

    We don't have any chat plugin currently, I'm afraid. There's quite a lot of nice chat plugins available in wordpress.org plugin repository though so I'm sure one of them should suit your needs. Take a look here, please:

    https://wordpress.org/plugins/search/chat/

    And also if it is possible in Membership 2 Pro searching for members of the filter in the frontend?

    No, that's not possible currently either. The Membership 2 Pro plugin is not a "members directory" kind of plugin so it doesn't provide any front-end members list. But it's possible to add a shortocde that would list all the active members with just a bit of a custom code. You could put a code like this into the "functions.php" file of your current theme:

    # LIST OF ACTIVE MEMBERS
    /**
     * ShortCode to use: [ms-members-directory]
     * optional attribute:
     *		membership_id - an ID of a membership to show members off
     * 						if not set, shows all active members of all memberships
     */
    add_shortcode( 'ms-members-directory', 'ms_members_directory' );
    function ms_members_directory( $atts )
    {
    
    	$atts = shortcode_atts( array(
    		'membership_id' => null
    	), $atts, 'ms-members-directory' );
    
    	//$html = $atts['membership_id'];
    
    	$html .= '<table cellpadding="0" cellspacing="0">';
        $html .= '<tr>';
        $html .= '<td><b>User ID</b></td>';
        $html .= '<td><b>Username</b></td>';
        $html .= '<td><b>Display Name</b></td>';
        $html .= '<td><b>Membership(s)</b></td>';
        $html .= '</tr>';
        $members = MS_Model_Member::get_members( array( 'membership_id' => $atts['membership_id'], 'subscription_status' => 'active' ) );
        foreach( $members as $member )
        {		
    
    		if ( count( $member->subscriptions ) > 0 ) {
    
            $html .= '<tr>';
            $html .= '<td>' . $member->id . '</td>';
            $html .= '<td>' . $member->username . '</td>';
            $html .= '<td>' . $member->name . '</td>';
    
            $html .= '<td>';
            $temp = array();
            foreach( $member->subscriptions as $subscription )
            {
                $membership = MS_Factory::load( 'MS_Model_Membership', $subscription->membership_id );
                $temp[] = $membership->name;
                $html .= implode( ', ', $temp );
            }
            $html .= '</td>';
            $html .= '</tr>';
    
    		}
    
        }
        $html .= '</table>';
    
        return $html;
    }

    See the shortcode usage explanation at the start of that code. It's a relatively simple list, without search and filters but can be a foundation for further modifications.

    Best regards,
    Adam

    • david

      Thank you for your advice! It is very helpful.
      I'd like to ask closer to the shortcode for the filter. Can you please explain the shortcode modification for example for location / state filtering? And is it possible to implement into the shortcode all the required fields that the members have to fill and then filter according to them?
      And is it possible to address the specific problems to support when I'll modify this shortcode?

  • Adam Czajczyk

    Hi david

    The shortocde that I provided is quite simple and gives only a basic list. It could be a base for further modification but adding things like searching/filtering or additional fields that are taken from the user profiles (especially custom ones) would require quite a bit of additional custom coding. I'm afraid this is a bit outside of the scope of this forum and that's as far as I can get with this.

    https://premium.wpmudev.org/docs/getting-started/getting-support/

    If you feel like giving it a try yourself, sure - please feel free to ask any specific questions (possibly about as detailed, narrow aspects as possible) and I can ask our developers to share some tips on this. If you need this developed for you instead, you might consider posting a job request, for example at Codeable.io for which you can also grab a nice discount from our Partners page here:

    https://premium.wpmudev.org/partners/

    Kind regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.