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 (int $ID_TOPIC, string $type)



Parameter $ID_TOPIC

Expected type: Integer
Description: The ID of the topic that this event occurred in



Parameter $type

Expected type: Enumerated String
Description: What type of notification this is (strangely enough there's no "unsticky"...)

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
'split' A topic was split
'sticky' A topic was made sticky
'unlock' A topic was unlocked


Notes

  • Uses the Post langauge file.
  • ID_TOPIC represents the topic 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.
Advertisement: