What is the [pm_user] shortcode for?

I've installed the Private Messaging plugin, and I've looked at the instructions.
I've set up a page for the Inbox - using the [message_inbox] shortcode.
I can't for the life of me understand what the [pm_user] shortcode is about.
What is it for and do you have any examples of how the options are specified.
I've managed to send a message to a dummy user from admin by typing the user name in the compose box. But you have to know what the name is! There's no dropdown of users, or address book...
I principally want to be able to exchange messages with my subscribers (who are my clients), for example if they need to cancel an appointment. How do I pick them from a list?
Help!
Joe.

  • Vinod Dalvi

    Hi Joe,

    I hope you are well today and thank you for your question.

    I can't for the life of me understand what the [pm_user] shortcode is about.

    Sorry for any inconvenience caused.

    The shortcode pm_user is used to display the button "Message me" that allows users to send messages to any particular user whose user_id or user_name is passed to this shortcode as arguments.

    You will find more information about the arguments of this shortcode on the following path.

    Admin Area -> Messaging -> Settings -> Shortcodes

    I have also notified the plugin developer to include more information about the usage of this shortcode there.

    But you have to know what the name is! There's no dropdown of users, or address book...

    The dropdown is displayed listing the list of users when you type any character in the compose message form option Send To as shown in the attached screenshot.

    Please advise if you have more questions.

    Best Regards,
    Vinod Dalvi

  • Hoang Ngo

    Hi @Joe,

    I hope you are well today and many thanks for your question.

    Some cases the [pm_user] shortcode become handy, example:
    - You can add the shortcode into post content, this will create a contact me button, which user can quickly use it to send a message to the author. Example [pm_user in_the_loop=1]
    - You have a services page, which you list many service providers there, and each service provider, you can append this shortcode like this [pm_user user_name="service_provider_username"]. So users can quickly send a message to them.

    But for normal usage, the [message_inbox] would be enough :slight_smile:

    If you have any issues please don't hesitate to let us know so we can assist

    Best regards,
    Hoang

  • Joe

    Hi guys,
    Thanks for you speedy reply. [pm_user] looks useful for me for clients to PM me: I don't need them to be able to PM each other. More information about what you mean by "in_the_loop" would be useful: what loop? The other options are more obvious.

    As far as the compose message form, the list that drops down from the "Send To" box only gets populated as you try to message someone for the first time.
    You also have to know the user name, which is hard to guess if someone's been cryptic in their choice.

    An example might be: user_name="CoolJake" when their actual name is Jake Smith for instance. Or maybe you have more than one Jake Smith. If you only know the recipient's name, you only have trial and error to guess their user name.

    What would be much more useful would be if the drop down could be pre-populated with "First Name, Last Name" or "Last Name, First Name". Maybe an option could be added to choose the format you want and the sort order?

    Is there a way of sending a message to all users? This would be really useful for admin for engaging with clients.

    I've attached the email received by my dummy user that a message has been received. You'll see that the FROM_NAME seems to just pick up my surname and that the SITE_NAME placeholder in the subject line and the first line of the message doesn't appear. Where does this information come from and how can I configure what appears?

    I've also attached screenshots of my message page with the "Read" and "Sent" tabs open. I was a bit confused at first - the sender and recipient both have the surname King here, so it looked like the message showed who sent it rather than who received it. That wasn't the case - I changed the name of the recipient and it's now as expected. In the "Read" tab, I wouldn't expect the message to be present - it should only show messages sent to me. Again, it doesn't say who the recipient is. Or is it that the Read tab indicates who has read my messages?

    Kind regards,
    Joe King.

  • Hoang Ngo

    Hi @Joe,

    I hope you are well today.

    Thanks for you speedy reply. [pm_user] looks useful for me for clients to PM me: I don't need them to be able to PM each other. More information about what you mean by "in_the_loop" would be useful: what loop? The other options are more obvious.

    If you place the shortcode inside your post content or page content, and you want to display a button, for your users can contact the post author, the parameter in_the_loop will be required. If you already have user_id or user_name parameter, so you can go without the in_the_loop

    As far as the compose message form, the list that drops down from the "Send To" box only gets populated as you try to message someone for the first time.
    You also have to know the user name, which is hard to guess if someone's been cryptic in their choice.

    Yes, you need to know the user name, but you don't have to remember exactly, when you type a character in the send to text field, it will auto suggest you the usernames contain the character.

    What would be much more useful would be if the drop down could be pre-populated with "First Name, Last Name" or "Last Name, First Name". Maybe an option could be added to choose the format you want and the sort order?

    Thanks for this idea, very interesting. I will check what does it need (technical side), and if possible, I will include it in next version :slight_smile:

    Is there a way of sending a message to all users? This would be really useful for admin for engaging with clients.

    Another cool feature for future release.

    The First Name, Last Name is getting from your profile, please check my screenshot for more info.

    Also, the sent tab is right, but the read tab, if you opened a conversation, and the receipt still not reply, the message should not there. I will check and if it is a bug, I will release a new version for fix this bug ASAP.

    Thanks again for your suggestions :slight_smile:

    Best regards,
    Hoang

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.