When you download the CMFMessage package from the CMF Collective, two actual elements are present: CMFMessage and CMFUserTrackTool. Each of these elements performs very different tasks , but they work in tandem to enhance the value of the other. CMFUserTrackTool simply displays the usernames of all currently logged-in members of your Plone site, in a slot on the right side of the template, underneath the standard calendar. CMFMessage also adds a slot to the right side of the template that displays links to instant messages sent to a member, along with a link allowing members to send a message of their own.
Instant messaging is a very popular form of communication. Integrating it in this way within your Plone community helps foster a sense of a "living" community, providing members with even more reasons to continually participate in discussions, document sharing, and other community activities. As with installing CMFBoard in the previous sections, adding CMFMessage and CMFUserTrackTool is a very simple process.
Installing CMFMessage and CMFUserTrackTool
The CMFMessage package is part of the CMF Collective, and CMFUserTrackTool is included in the CMFMessage package. To install it, first download this package from the CMF Collective and use your unzip utility of choice (perhaps WinZip on Windows, gunzip on Linux/Unix) to extract the files into a subfolder within the Data/Products folder in the Plone installation directory.
To finish the installation of CMFMessage and CMFUserTrackTool, use the Add/Remove Products option in the Plone setup section, available to the Plone administrator user only. For CMFMessage and CMFUserTrackTool to show up as an element to be added, you must restart Plone. After restarting, log in as the Plone administrator and follow the Plone Setup link in the navigation; then follow the Add/Remove Products link. You will see a list of available products to install, two of which are CMFMessage and CMFUserTrackTool. Check the boxes for both, and press the Install button. The installation actions occur, and you should see a message indicating the successful installation of each package.
Unlike CMFBoard, there are no additional options to configure, so no elements are added to the Add-on Product Configuration section of the Plone setup menu. After CMFMessage and CMFUserTrackTool are installed, their functionality is available to you upon your next login.
Viewing the CMFMessage and CMFUserTrackTool Slots
The default location of the CMFMessage and CMFUserTrackTool slots is the right side of the standard template, beneath the calendar, as shown in Figure 4.7.
Figure 4.7. Showing the CMFMessage and CMFUserTrackTool slots.
In Chapter 5, "Customizing Plone," you'll learn how to change the location of slots.
In this example, two members ”janedoe and jcmeloni ”are currently authenticated within the Plone site. No messages have been sent to the particular user who was logged in at the time of the screenshot ”in this case, janedoe. The usernames in the Active Users slot are clickable; the links lead to the member home page of the user. The Mail icon next to the username is also clickable and leads to the form for sending an instant message to the user.
Sending an Instant Message
The form for sending an instant message is invoked by clicking the Mail icon next to a username in the Active Users slot or by clicking the New Message button in the Messages slot. This is a very simple form, as you can see in Figure 4.8.
Figure 4.8. Sending an instant message.
In this example, user janedoe completes the form to send an instant message to user jcmeloni. The simple form contains only these fields:
To ” Enter the Plone username of the user to whom you want to send the message.
Subject ” Enter the subject of your message.
Message ” Enter the text of your message, in plain text.
Attach URL of Current Location ” If this is checked, the URL of the page you are currently browsing also is sent. This is useful if you are viewing content and want to send a message to its owner without utilizing the content discussion feature, or if you want to alert another member to a piece of content.
When the instant message is sent, its subject, sender, and date sent appear in the recipient user's Messages slot. This is shown in Figure 4.9.
Figure 4.9. The user has received an instant message.
Taking Action After Receiving an Instant Message
Clicking on the subject of an instant message in the Messages slot takes the user to the message-display screen, as shown in Figure 4.10.Additionally, all instant messages are stored in a member's Personal Messages subfolder, inside a Personal Items folder within the member's master folder.
Figure 4.10. Viewing an instant message.
This set of folders is automatically created the first time an instant message is received. The folders remain as long as a message is kept inside them. If you delete all your instant messages, the folders also are removed, but they reappear the next time a message is received.
The recipient has several options when reading the instant message, but no action is required:
Remove ” Clicking the Remove button deletes the message from the Personal Messages folder and the entry from the Messages slot. In other words, it's really removed.
Acknowledge ” If this button is clicked, the message remains in the Personal Messages folder of the recipient, but the entry no longer appears in the Messages slot.
Reply ” The same actions are performed as when clicking the Acknowledge button, but the user is also shown a prefilled instant-message form for sending a reply to the original message sender.
The CMFMessage and CMFUserTrackTool elements are simple but useful items that enable members to see that they're not the only ones hanging out in your Plone community. They also enable members to interact with each other outside of more structured elements such as content discussion or discussion forums.