Class: pm
Source Location: /lib/pm.inc.php
Class pm
Inherited Properties, Constants, and Methods
Method Summary
| bool |
addFolder() |
Creates a personal message folder. |
| array |
blockedList() |
Returns blocked members information. |
| bool |
delete() |
Deletes a Personal Message. |
| bool |
emptyFolder() |
Empties PMs in a personal message folder. |
| bool |
folderExists() |
Returns whether a PM folder exists for a given member. |
| string |
folderid2name() |
Returns folder name associated with folder id of a member. |
| array |
getFolders() |
Returns the current user's PM folders. |
| array |
getList() |
Lists PMs in a folder. |
| array |
info() |
Returns information on a Personal Message. |
| bool |
isBlocked() |
Returns whether a member has blocked another member. |
| bool |
mark() |
Marks a message read/unread. |
| bool |
move() |
Moves a personal message to another folder. |
| bool |
save() |
Saves a PM to the sent folder without sending it. |
| int |
spaceUsage() |
Returns PM space usage in percentage. |
Methods
bool addFolder(
$name, int
$folderID, string
$newName
)
|
|
Creates a personal message folder.
Parameters:
|
int |
$folderID: |
folder ID |
|
string |
$newName: |
folder name |
|
|
$name: |
|
API Tags:
| Return: | true on success, otherwise false |
| Access: | public |
Information Tags:
bool blockContact(
int
$userID, [string
$description = false]
)
|
|
Blocks a contact.
Parameters:
|
int |
$userID: |
Member ID to be added |
|
string |
$description: |
Description for the 'Buddy' |
API Tags:
| Return: | true on success, otherwise false |
| Access: | public |
Information Tags:
Returns blocked members information.
API Tags:
| Return: | Blocked Members Information |
| Access: | public |
Information Tags:
bool delete(
int
$messageID
)
|
|
Deletes a Personal Message.
Parameters:
|
int |
$messageID: |
Message to be deleted |
API Tags:
| Return: | true on success, otherwise false |
| Access: | public |
Information Tags:
bool emptyFolder(
int
$folderID, [
$keepUnread = 0], int
$keepunread
)
|
|
Empties PMs in a personal message folder.
Parameters:
|
int |
$folderID: |
folder ID |
|
int |
$keepunread: |
Default: 0=also delete unread msgs, 1=keep unread messages |
|
|
$keepUnread: |
|
API Tags:
| Return: | true on success, otherwise false |
| Access: | public |
Information Tags:
bool folderExists(
int
$folderID, [int
$userID = false]
)
|
|
Returns whether a PM folder exists for a given member.
Parameters:
|
int |
$folderID: |
folder ID |
|
int |
$userID: |
If $userID is ommited, the last known member is used. |
API Tags:
| Return: | Folder Existance Status |
| Access: | public |
Information Tags:
string folderid2name(
int
$folderID, [int
$userID = false]
)
|
|
Returns folder name associated with folder id of a member.
Parameters:
|
int |
$folderID: |
folder ID |
|
int |
$userID: |
If $userID is ommited, the last known member is used. |
API Tags:
| Return: | Folder Name associated with id |
| Access: | public |
Information Tags:
Returns the current user's PM folders.
API Tags:
| Return: | Current user's PM System Folders |
| Access: | public |
Information Tags:
array getList(
[string
$folder = 'in']
)
|
|
Lists PMs in a folder.
Parameters:
|
string |
$folder: |
Keyname of Inbox folder, 'in', 'sent' |
API Tags:
| Return: | Information of PMs in folder. |
| Access: | public |
Information Tags:
array info(
int
$ID, [int
$markRead = false], [int
$convert = true]
)
|
|
Returns information on a Personal Message.
Parameters:
|
int |
$ID: |
PM record ID |
|
int |
$markRead: |
Default: 0=keep unread, 1=mark read |
|
int |
$convert: |
Default: 1 convert BBCode to HTML |
API Tags:
| Return: | Information of a PM |
| Access: | public |
Information Tags:
Redefinition of:
- ipbwi::info()
- informations about the current IPBWI and PHP installation
bool isBlocked(
int
$by, int
$blocked
)
|
|
Returns whether a member has blocked another member.
Parameters:
|
int |
$by: |
Member ID of receiver (the one who blocked) |
|
int |
$blocked: |
Member ID of sender (the one who is blocked) |
API Tags:
| Return: | Block Status |
| Access: | public |
Information Tags:
bool mark(
int
$messageID, [int
$isRead = 1]
)
|
|
Marks a message read/unread.
Parameters:
|
int |
$messageID: |
Message ID to be marked |
|
int |
$isRead: |
Default: 1=mark read, 0=mark unread |
API Tags:
| Return: | true on success, otherwise false |
| Access: | public |
Information Tags:
bool move(
int
$messageID, int
$targetID
)
|
|
Moves a personal message to another folder.
Parameters:
|
int |
$messageID: |
Message ID to be moved |
|
int |
$targetID: |
Target folder ID. |
API Tags:
| Return: | true on success, otherwise false |
| Access: | public |
Information Tags:
int numFolderPMs(
int
$folderID
)
|
|
Returns number of PMs in a folder.
Parameters:
API Tags:
| Return: | Number of PMs in Folder |
| Access: | public |
Information Tags:
int numFolderUnreadPMs(
int
$folderID
)
|
|
Returns number of unread PMs in a folder.
Parameters:
API Tags:
| Return: | Number of unread PMs in Folder |
| Access: | public |
Information Tags:
Gets number of new PMs.
API Tags:
| Return: | New Unread Messages Count |
| Access: | public |
Information Tags:
Gets total number of PMs.
API Tags:
| Return: | Total Messages Count |
| Access: | public |
Information Tags:
bool removeFolder(
int
$folderID
)
|
|
Removes a personal message folder.
Parameters:
API Tags:
| Return: | true on success, otherwise false |
| Access: | public |
Information Tags:
bool renameFolder(
int
$folderID, string
$newName
)
|
|
Renames a personal message folder.
Parameters:
|
int |
$folderID: |
folder ID |
|
string |
$newName: |
New folder name |
API Tags:
| Return: | true on success, otherwise false |
| Access: | public |
Information Tags:
bool save(
int
$toID, string
$title, string
$message, [array
$cc = array()]
)
|
|
Saves a PM to the sent folder without sending it.
Parameters:
|
int |
$toID: |
Member ID to receive the message |
|
string |
$title: |
Message title |
|
string |
$message: |
Message body |
|
array |
$cc: |
Array of ID for carbon copies (CC) |
API Tags:
| Return: | true on success, otherwise false |
| Access: | public |
Information Tags:
bool send(
int
$toID, string
$title, string
$message, [array
$cc = array()], [int
$sentfolder = '0']
)
|
|
Sends a PM.
Parameters:
|
int |
$toID: |
Member ID to receive the message |
|
string |
$title: |
Message title |
|
string |
$message: |
Message body |
|
array |
$cc: |
Array of ID for carbon copies (CC) |
|
int |
$sentfolder: |
Default: 0=do not save message in Sent folder, 1=save message |
API Tags:
| Return: | true on success, otherwise false |
| Access: | public |
Information Tags:
Returns PM space usage in percentage.
API Tags:
| Return: | PM Space Usage in Percent |
| Access: | public |
Information Tags:
|
|