Private Messages Setup

This document provides instructions on how to set up the Private Messages extension. This extension adds a private messaging system to your site and allow users to privately message each other.

Contents

Settings #

Extension's settings #

When the extension Private Messages is activated, it adds the Private Messaging tab to the page wp-admin > Ultimate Member > Settings > Extensions. In this tab you should see the following options:

  • Show messages button in member directory - Enable/disable buttons "Message" on the Members page. Note: "Message" buttons can be disabled for a certain directory using the "Hide message button in the directory" option.
  • Show unread messages first - Show conversation with unread messages first.
  • Hide a "Download Chats History" link - Enable/disable the download history in the messages profile tab.
  • Message character limit - You can set the maximum number of characters allowed in each conversation reply.
  • Block users from sending/receiving messages - You can add user IDs that cannot send or received messages on the site. Use a comma to separate the list.
  • Primary color - You can also select the color of the message box outline, links, and send message button.
  • How often do you want the AJAX refresh conversation (in seconds) - AJAX timeout. Too small a value may slow down the site.
  • Send email notifications If user did not login for - You can set the last log-in time period to send email notifications about new messages if the user's last login time exceeds that period.
  • Send email notifications If user didn't read message for [n] hours - Send email notifications about the unread messages if the user didn't read it during that period.
  • Send email notifications not more then [m] times - Email notifications about unread messages will be sent every [n] hour but no more than [m] times.
  • Show messages button in individual job post - When enabled, the user can message the job author.

Image - Settings on wp-admin > Ultimate Member > Settings > Extensions > Private Messaging.

Profile Menu settings #

The extension adds settings to the page wp-admin > Ultimate Member > Settings > Appearance > Profile Menu.

  • Messages Tab – Allows enabling/disabling the "Messages" item in the profile menu.

Note: only profile owners and administrators can see the "Messages" item in the Profile menu.

User Role settings #

The extension adds a widget to the user role page, so you can give each user role unique permissions. To modify settings on a specific role, go to wp-admin > Ultimate Member > User Roles and choose the user role to modify. You will be navigated to the page "Edit Role". On this page scroll down to the Private Messages options:

  • Enable Messaging feature? - Enable or disable a messaging feature for this role.
    • Can start conversations? - Allow users to start a conversation with other users.
      • Can start conversations with - Allow users to start conversations with everyone or specific user roles.
        • Can start conversations with selected user roles - When a specific user role is selected, you can select which role the user can start a conversation with.
    • Can read private messages? - Allow users to read private messages from other users.
      • Can reply private messages? - Allow users to reply to other users.
        • Can reply private messages to - Allow users to reply to everyone or specific user roles.
          • Can reply private messages to selected user roles - When a specific user role is selected, you can select which role the user can reply to.
    • Maximum number of messages they can send - Limit the maximum number of messages a user can send.

Image - Settings on  wp-admin > Ultimate Member > User Roles > Edit Role.

Member Directories #

The extension can add the "Message" button to each member card in the members directory. There are two settings that controls these buttons:

  • Show messages button in member directory on wp-admin > Ultimate Member > Settings > Extensions > Private Messaging. This setting can enable/disable buttons "Message" for all member directories.
  • Hide message button in the directory on wp-admin > Ultimate Member > Member Directories > Edit Member Directory, in the Profile Card section. This setting can disable buttons "Message" for the certain directory.

Note: The "Message" button may be hidden by user role settings if current user can not start conversation with the target user or if the target user can not read private messages.

Image - Buttons "Message" in the members directory.

User profile #

The extension adds these elements to profiles:

  • "Message" button on other members Profile pages.
  • "Messages" menu item and the tab.

Users can start a new conversation by clicking the "Message" button in the other user profile header or in the profile card shown in the member directory. Once the message button is clicked, a pop-up appears where users can easily exchange texts, links and emojis.

Image - The "Message" button in the other member profile header.

Image - The messaging pop-up.

Note: The "Message" button is shown for guests and logged-in members with proper settings. The button is hidden if:
 - current user is a recipient;
 - current user or recipient is blocked by the setting "Block users from sending/receiving messages";
 - current user is blocked by recipient or recipient is blocked by the current user;
 - the messaging feature is blocked by the setting "Who can send me private messages?" in the recipient's account;
 - the messaging feature is disabled for the current user role or for the recipient user role;
 - the recipient user role can't read private messages;

Image - The "Messages" tab in profile.

Users that are active are marked with a green dot next to their name to indicate that they are online. This optional feature requires the Online Users extension.

User account #

Privacy #

Users can use the "Who can send me private messages?" setting in the account Privacy tab to control who can send them private messages. Pre-defined options: "Everyone", "Nobody". If the Followers extension is activated, users are given additional options "Only people I follow" and "Followers". If the Friends extension is activated, users are given additional option "Friends".

Image - The account Privacy tab.

Users can block someone in messages by clicking on the "Block user" icon. They can review blocked users and unblock them in the Blocked Users section in the account Privacy tab.

Image - The Blocked Users section in the account Privacy tab.

Notifications #

The extension has two email templates:

  • New Message Notification - notification sent to users when they receive new private messages;
  • New Message Reminder - notification sent to users when they have unread private messages.

The extension sends the New Message Notification email immediately if:

  • the first message is added in a new conversation;
  • the second (or next) message is added in the existing conversation and the recipient did not login for the period selected by the setting "Send email notifications If user did not login for".

The extension sends the New Message Reminder email periodically with timeout selected by the setting "Send email notifications If user didn't read message for [n] hours" several times. The maximum number of reminders depends on "Send email notifications not more than [m] times". The extension stops sending reminder email once the recipient read the message.

Administrators can edit email templates: enable, disable, change subject or body. Go to wp-admin > Ultimate Member > Settings > Email, find the needed email template, and click the "Edit" button (gear icon). You'll see email template settings. Change what you want and save changes.

Image - Settings on wp-admin > Ultimate Member > Settings > Email.

Users can turn on/off receiving email notifications using settings in the account Notifications tab:

  • Someone sends me a private message - turn on/off receiving the New Message Notification email.
  • I have an unread message - turn on/off receiving the New Message Reminder email.

Image - The account Notifications tab.

Web notifications #

If the Real-time Notifications extension is activated, the user can control if they want to receive real-time notifications for new messages in their account settings. Users can turn on/off receiving a notification for new conversations using the "When someone sends a private message to me" setting in the account Web notifications tab.

Image - The account Web notifications tab.

Shortcodes and menu patterns #

You can use the {new_messages} menu pattern to display an amount of unread messages in your menu. Read the instructions here.

The extension adds these shortcodes:

You can paste these shortcodes to the post (page) content and to the text or shortcode widget.

[ultimatemember_message_button] #

This shortcode is used to display a message button of a specific user.

Example:

[ultimatemember_message_button user_id="123"]

The shortcode attributes:

  • user_id (integer) - the identification number of the user - recipient. Required. Default value: the post author ID (if post or page) or 0.

[ultimatemember_message_count] #

This shortcode is used to display a total amount of unread messages of a specific user.

Example:

[ultimatemember_message_count user_id="123"]

The shortcode attributes:

  • user_id (integer) - the identification number of the user. Required. Default value: current user ID.

[ultimatemember_messages] #

This shortcode is used to display a message box of a specific user.

Example:

[ultimatemember_messages user_id="123"]

The shortcode attributes:

  • user_id (integer) - the identification number of the user - recipient. Required. Default value: current user ID.