markMessages

Description

Internal function used to mark PMs as read.

Syntax

void markMessages ([mixed $personal_messages[, mixed $owner]])



Parameter $personal_messages

Expected type: Mixed
Description: An array of IDs corresponding to the PMs that should be marked read. If not specified, all PMs will be marked read.

Allowed types for $personal_messages
Allowed values Description
Null Default value. Causes SMF to mark all of the user's PMs as read
Array of Integers The IDs of the PMs that should be marked read



Parameter $owner

Expected type: Mixed
Description: The member ID of the user who owns these PMs. If not specified, the current member will be used ($ID_MEMBER).

Allowed types for $owner
Allowed values Description
Null Default value. SMF uses $ID_MEMBER for the owner in this case.
Integer The ID of a specific member. Only needed if you want to mark PMs read for someone other than the current member (not sure if SMF actually uses this anywhere)


Notes

  • Called whenever you view a page in the PM center, but only if you have new PMs
  • Updates the "unreadMessages" count for the specified member
  • Can be used to mark specific messages read
  • Can be called externally (great for integration with a CMS/portal) - no session or permission checks
  • Does not return anything or redirect anyplace
  • Assumes that the data is valid, but won't return any errors if it isn't.
Advertisement: