• MODX.com

    1,685 downloads

PersonalMessages

PersonalMessages is an extra by createit, first released on 2012-04-24.

Package Description

Initial release.

Usage/Installation Instructions

Examples:

1. List of received (sent) messages:

[[!pmInbox:default=`No messages`? &mode=`receive` &tpl=`pmMessageTpl` &markAsRead=`0` &targetId=`111`]]

where: - mode - 'receive' or 'sent' - tpl - template for the output of each message - markAsRead - unreaded messages will be marked as read - targetId - page with call of 'pmRead' snippet

2. Reading the message.

[[!pmRead]] 

Subject: [[+pm.subject]]Message: [[+pm.message]]User: [[+pm.sender.username]] - [[+pm.sender.profile.fullname]]

You can use any fields in your page from modUserMessage, modUser, modUserProfile

3. Sending a message.

Load recipient details from request, example "/send/?recipient=15", where 15 -  user identifier.

[[!pmRecipientDetails?&placeholderPrefix=`pm.recipient.`&paramName=`recipient`]]

[[!FormIt? &hooks=`pmSend` &validate=`recipient:required:isNumber,subject:required,message:required` &submitVar=`send`]]

<form action="[[~[[*id]]]]" method="post">  To: [[+pm.recipient.username]]  <input type="hidden" name="recipient" value="[[+pm.recipient.id]]"/>  <label>Subject:</label>  <input type="text" name="subject" value="[[!+fi.subject]]"/>  <span class="error">[[!+fi.error.subject]]</span>  <label>Message:</label>  <textarea name="message">[[!+fi.message]]</textarea>  <span class="error">[[!+fi.error.message]]</span>  <div class="form-buttons">   <input type="submit" name="send" value="Send"/>  </div></form>

4. The number of unread messages

[[!pmUnreadCount? &toPlaceholder=`0`]] // this is default

or

[[!pmUnreadCount? &toPlaceholder=`1` &placeholderPrefix=`pm.`]][[+pm.unread]]

Details

Developer(s)
createit
Released
2012-04-24
First seen
2012-04-24
License
GPLv2
Supported databases
MySQL SQL Server
Minimum MODX Requirement
2.1

PersonalMessages Releases

Vendor Signature Released on
MODX.com 0.1.0-beta1 2012-04-24 (6 years ago)