get_pm_info
Purpose: Returns information on a private message.
Availability: IPB SDK 0.1
Returns information on the private message messageid, in an array. If information cannot be retrieved, or the currently logged in user does not have sufficent permissions FALSE is returned.
From IPB SDK Version 0.4 and later, you can specify a markread attribute. If this is set to TRUE, the message will be marked read. By default, this is set to TRUE.
From IPB SDK Version 0.4 and later, you can specify a convert attribute. If this is set to TRUE, the message will be converted from raw BBCode into HTML before returning. By default, this is set to TRUE.
For example to display message 1337:
echo '<strong>Sender:</strong> '.$message['name'].'<br /><strong>Title:</strong> '.$message['mt_title'].'<br /><strong>Sent Date:</strong> '.date("M j Y, h:i A", $message['msg_date']).'<br /><br />'.$message['msg_post'];
}
else {
echo 'Could not display PM';
}
This function returns an array in the following structure:
[msg_id] => 1
[msg_date] => 1084870199
[msg_post] => testing <!--emo&:o--><img src='http://localhost/html/emoticons/ohmy.gif' border='0' style='vertical-align:middle' alt='ohmy.gif' /><!--endemo-->
[msg_cc_users] =>
[msg_sent_to_count] => 1
[msg_deleted_count] => 0
[msg_post_key] => 0
[msg_author_id] => 12
[mt_id] => 1
[mt_msg_id] => 1
[mt_date] => 1084870199 // Unix Send Date
[mt_title] => hey
[mt_from_id] => 12
[mt_to_id] => 1
[mt_owner_id] => 1
[mt_vid_folder] => in
[mt_read] => 1
[mt_hasattach] => 0
[mt_hide_cc] => 0
[mt_tracking] => 0
[mt_user_read] => 0
[name] => khlo // Message Sender Name
[recipient_name] => Pita // IPBK SDK 0.4 and later
)
User Contributed Notes
Documentation Generated at Sat, 16 Apr 2005 07:36:35 -0700
Find the latest version at http://ipbsdk.sourceforge.net
cow
It is recommended you use pm_mark_message rather then the markread attribute to mark messages as read/unread. Support for the markread attribute has not been dropped to keep compatibility with previous scripts however.