VersionLicenseFlatboard

Flatboard Pro Plugin - This plugin is part of Flatboard Pro edition.

A comprehensive private messaging system for Flatboard 5 that allows users to send and receive private messages within the forum.

Overview

The Private Messaging plugin provides a full-featured messaging system with support for:

  • One-on-one and group messaging
  • Message threads and replies
  • Read receipts and typing indicators
  • Message search and filtering
  • Favorites/starred messages
  • Auto-deletion of old messages
  • Email notifications
  • Admin dashboard with statistics

Version

Current Version: 1.0.6
Last Updated: December 27, 2025
License: GPL3
Edition: Flatboard Pro
Requires: Flatboard 5.0.0 or higher

Installation

  1. Ensure the plugin files are located in plugins/PrivateMessaging/
  2. The plugin should be automatically detected by Flatboard
  3. Activate the plugin from the admin panel: Admin > Plugins
  4. Configure the plugin settings: Admin > Plugins > Private Messaging > Settings

Configuration

General Settings

Access plugin settings via Admin > Plugins > Private Messaging > Settings

Email Notifications

  • Enable email notifications: Send email alerts when users receive new messages
  • Email for New Messages: Configure email notification preferences

Message Features

  • Allow file attachments: Enable users to attach files to messages (future feature)
  • Enable read receipts: Show when messages have been read by recipients
  • Enable typing indicator: Display when the other user is typing
  • Enable emoji picker: Allow users to insert emojis in messages
  • Enable message search: Allow users to search through their messages

Message Limits

  • Maximum subject length: Maximum characters allowed in message subject (default: 50)
  • Maximum message length: Maximum characters per message (default: 5000)
  • Messages per page: Number of messages displayed per page (default: 10)
  • Maximum number of PMs: Maximum messages per inbox (default: 100)
  • Maximum recipients: Maximum recipients per message (default: 1)

Auto-Deletion

  • Auto-delete old messages: Automatically delete messages after a specified period
  • Delete after (days): Number of days before auto-deletion (default: 60)

Display Options

  • Default view: Which page to display when opening messaging (Inbox, Sent, Compose)
  • Date format: How to display message dates (Relative, Absolute, Both)

User Management

  • Blocked users: List of usernames who cannot use messaging (comma-separated)
  • Welcome message: Message displayed to users when they first access messaging

Features

User Features

Inbox

  • View all received messages
  • Filter by: All, Unread, Read, Favorites
  • Search messages by sender, subject, or content
  • Mark messages as read/unread
  • Star/unstar messages as favorites
  • Delete individual or multiple messages
  • View message threads

Sent Messages

  • View all sent messages
  • Filter by: All, Read, Unread, Favorites
  • Search sent messages
  • Delete sent messages
  • View read receipts

Compose Message

  • Send messages to one or multiple recipients
  • Reply to existing messages (creates threads)
  • Autocomplete recipient usernames
  • Character counter for subject and message
  • Emoji picker (if enabled)
  • Rich text formatting support

Message View

  • View full message content
  • See message thread context
  • Reply directly from message view
  • Mark as read/unread
  • Star/unstar message
  • Delete message

Admin Features

Dashboard

Access the admin dashboard via Admin > Plugins > Private Messaging

The dashboard provides comprehensive statistics:

Global Statistics

  • Total messages
  • Read messages (with percentage)
  • Unread messages (with percentage)
  • Active users

Activity by Period

  • Today
  • Yesterday
  • This week
  • This month
  • Last 7 days
  • Last 30 days

Hourly Distribution

  • 24-hour activity chart
  • Peak hours identification

Activity Timeline

  • 30-day activity visualization
  • Daily message counts

Problematic Users

  • Spam score detection
  • Users with suspicious behavior
  • Metrics: messages sent, unique recipients, short messages, duplicates

Full Mailboxes

  • Users with mailboxes ≥ 80% full
  • Action required alerts
  • Mailbox statistics

Largest Threads

  • Threads with most messages
  • Thread size and participant information
  • Option to delete entire threads

Top 10 Users

  • Most active senders
  • Most active recipients
  • Total message counts

Detailed Information

  • Total message size
  • Average message length
  • Deleted messages count
  • Thread statistics
  • Average response time
  • Most active users

Recent Messages

  • Last 20 messages
  • Message status (read/unread)
  • Message length
  • Reply indicators

Permissions

The plugin includes the following permissions:

User Permissions

  • Send Private Messages (pm.send): Allows sending private messages to other users
  • Receive Private Messages (pm.receive): Allows receiving private messages from other users
  • Delete Own Messages (pm.deleteOwn): Allows deleting your own private messages

Moderator/Admin Permissions

  • Moderate Private Messages (pm.moderate): Allows viewing and moderating all private messages

Default Permissions

By default, these permissions are granted to:

  • Administrators
  • Moderators
  • Members

Configure permissions via Admin > Permissions > Plugins > Private Messaging

Usage

Sending a Message

  1. Click Messages in the navigation menu
  2. Click New Message or Compose
  3. Enter recipient username(s) (autocomplete available)
  4. Enter subject
  5. Write your message
  6. Click Send

Replying to a Message

  1. Open a message from your inbox
  2. Click Reply
  3. The original message context is included
  4. Write your reply
  5. Click Send Reply

Managing Messages

Mark as Read/Unread

  • Click the envelope icon on a message
  • Or use the bulk action in the toolbar

Star/Unstar Messages

  • Click the star icon on a message to add/remove from favorites
  • Filter by favorites using the "Favorites" filter button

Delete Messages

  • Select individual messages using checkboxes
  • Use "Select All" to select all visible messages
  • Click "Delete Selected" to remove multiple messages
  • Confirm deletion when prompted

Search Messages

  • Use the search bar in the toolbar
  • Search filters by sender/recipient, subject, and message content
  • Results update in real-time

Filters

Available filters:

  • All: Show all messages
  • Unread: Show only unread messages
  • Read: Show only read messages
  • Favorites: Show only starred messages

API Endpoints

The plugin provides the following API endpoints:

Get Unread Count

CODE
GET /api/messages/unread-count

Returns the number of unread messages for the authenticated user.

Toggle Star

CODE
POST /api/messages/toggle-star  
Body: { "message_id": "message_id_here" }

Adds or removes a message from favorites.

Mark as Read

CODE
POST /api/messages/mark-read  
Body: { "message_id": "message_id_here" }

Marks a message as read.

File Structure

CODE
PrivateMessaging/  
├── assets/
│ └── css/
│ └── private-messaging.css
├── langs/
│ ├── en.json
│ └── fr.json
├── messages/ # Message storage directory
├── index/ # User index files
├── template/
│ └── email_private_message.php
├── views/
│ ├── admin.php # Admin dashboard
│ ├── inbox.php # Inbox view
│ ├── sent.php # Sent messages view
│ ├── compose.php # Compose message view
│ └── view.php # Message view
├── PrivateMessagingController.php
├── PrivateMessagingService.php
├── PrivateMessagingPlugin.php
├── PrivateMessagingPermissionHelper.php
└── plugin.json

Data Storage


Messages are stored as individual JSON files in the messages/ directory. Each message file contains:

  • Message ID
  • Sender ID and username
  • Recipient ID and username
  • Subject
  • Message content
  • Timestamp
  • Read status
  • Read date (if read)
  • Starred status
  • Parent message ID (for replies)
  • Thread information

User indexes are stored in the index/ directory for efficient message retrieval.

Security Features

  • CSRF protection on all forms
  • Rate limiting on message sending
  • User blocking functionality
  • Permission-based access control
  • Input validation and sanitization
  • Atomic file operations for data integrity

Troubleshooting

Messages Not Appearing

  • Check user permissions
  • Verify plugin is activated
  • Check file permissions on messages/ and index/ directories
  • Review error logs

Email Notifications Not Working

  • Verify email notifications are enabled in settings
  • Check user notification preferences
  • Ensure email configuration is correct in Flatboard settings

Performance Issues

  • Enable auto-deletion of old messages
  • Regularly clean up large threads via admin dashboard
  • Monitor mailbox sizes and alert users approaching limits

Permission Issues

  • Verify permissions are correctly assigned in Admin > Permissions
  • Check user group permissions
  • Ensure plugin permissions are initialized

Best Practices

  1. Regular Cleanup: Enable auto-deletion to prevent mailbox overflow
  2. Monitor Usage: Use admin dashboard to monitor messaging activity
  3. Set Limits: Configure appropriate message limits based on your forum size
  4. User Education: Provide clear guidelines in the welcome message
  5. Moderation: Regularly review problematic users flagged in the dashboard

Support

For issues, questions, or contributions:

Changelog

Version 1.0.6 (December 27, 2025)

  • Fixed admin view language display
  • Improved translation system integration
  • Added comprehensive admin dashboard translations
  • Enhanced user experience with better language support

Version 1.0.5 (December 8, 2025)

  • Initial release
  • Core messaging functionality
  • Admin dashboard with statistics
  • Search and filtering
  • Favorites/starred messages
  • Read receipts
  • Typing indicators
  • Email notifications
  • Auto-deletion of old messages
  • Multi-language support (English, French)

License

This plugin is released under the GPL3 license, the same as Flatboard 5.

Note: This plugin is part of Flatboard Pro edition. Please ensure you have a valid Flatboard Pro license to use this plugin.

Edited on Dec 27, 2025 By Fred .