sendNotifications
Description
Sends a notification to members who have elected to receive emails when things happen to a topic, such as when replies are posted.
Syntax
void sendNotifications (array $topics, string $type[, array $exclude[, array $members_only]])
Parameter $topics
Expected type: Array of Integers
Description: The topic(s) to send notifications for
Parameter $type
Expected type: Enumerated String
Description: What type of notification this is
Possible string values | |
Allowed values | Description |
'lock' | A topic was locked |
'merge' | A topic was merged with another topic |
'move' | A topic was moved |
'remove' | A topic was removed |
'reply' | A new reply was posted to a topic |
'split' | A topic was split |
'sticky' | A topic was stickied |
'unlock' | A topic was unlocked |
Parameter $exclude
Expected type: Array
Description: An array of topic id => member id pairs indicating that a member shouldn't be notified for a particular topic.
Parameter $members_only
Expected type: Array of Integers
Description: An array of member IDs indicating that only these members should be notified
Notes
- Uses the Post langauge file.
- Topics represents the topics the action is happening to.
- The type can be any of reply, sticky, lock, unlock, remove, move, merge, and split. An appropriate message will be sent for each.
- Automatically finds the subject and its board, and checks permissions for each member who is "signed up" for notifications.
- Will not send 'reply' notifications more than once in a row.
- Members in the exclude array will not be processed for the topic with the same key.
- Members_only are the only ones that will be sent the notification if they have it on.