• Welcome to Simple Machines Community Forum. Please login or sign up.

prepareMessageContext

Description

Loads up all the info for either a single message or several PMs

Syntax

array prepareMessageContext ([bool $type[, bool $reset]])



Parameter $type

Expected type: Boolean
Description: Defaults to 'subject'.



Parameter $reset

Expected type: Boolean
Description: If true, starts over from the beginning of the results.



Return value

Expected type: Array
Description:

Array Elements
Key Optional Expected type Description
fully_labeld no Boolean Whether or not all available labels have been applied to this PM
id no Integer The ID of this PM
is_replied_to no Boolean Whether or not the user has replied to this PM
is_selected no Boolean Whether or not this PM has been selected
labels no Array An array of information about any labels applied to this PM
member no Array An array of information about the member who sent this PM
number_recipients no Integer How many recipients the PM has
recipients no Array An array of information about the PM's recipients
subject no String The subject of the PM
time no String The date and time when this PM was sent, formatted and adjusted based on the user's settings
timestamp no Integer The timestamp corresponding to when the PM was sent, with both global and user time offsets applied
alternate yes Integer Whether or not to alternate the background color (only set if display mode is 0, $subjects_request is empty or $type is something other than 'subject')
body yes String The text of the PM. Only set if display mode is 0, $subjects_request is empty or $type is something other than 'subject'
counter yes Integer Internal counter (only set if display mode is 0, $subjects_request is empty or $type is something other than 'subject')


Notes

  • Loads up data based on either the $subjects_request or $messages_request global variables, depending on the desired display type
  • Returns false if there's nothing to display.
  • Contents of returned array vary slightly depending on whether or not we're actually displaying a PM
Advertisement: