68 Classifieds API

Features
class tree: 68Classifieds | index: 68Classifieds | all elements

 Class PrivateMessage

Description

Handles the Private Message System.

Located in /includes/classes/kernel/Private.php (line 16)


	
			
Method Summary
 PrivateMessage PrivateMessage ()
 mixed countUserSentMessages (integer $userid)
 void deleteMessage (int $pmid)
 int findUserID (string $name)
 int getOwnerByListingID (int $id)
 array getUsernameBySearch (string $username)
 int listMessages (array $options, int $current_row)
 array listMessagesByID (int $userid)
 void markAsNotSpam (int $pmid, int $userid)
 void markAsSpam (int $pmid, int $userid)
 void readMessage (int $id)
 boolean sendMessage (array $data)
 boolean updateSettings (array $data)
Methods
Constructor PrivateMessage (line 34)

Private Message Constructor

PrivateMessage PrivateMessage ()
countUserSentMessages (line 469)

Gets the total number of sent pm's for a specific user by id

  • return: false on failure integer on success
  • access: public
mixed countUserSentMessages (integer $userid)
  • integer $userid
deleteMessage (line 114)

Delete a PM

void deleteMessage (int $pmid)
  • int $pmid: The pm's unique id.
findUserID (line 162)

Find a user by name

  • return: User id or FALSE on failure
int findUserID (string $name)
  • string $name: A user name
getOwnerByListingID (line 246)

Get Owner from listing id.

  • return: Owner id or FALSE on failure
int getOwnerByListingID (int $id)
  • int $id: The listing id
getUsernameBySearch (line 290)

Get a username by searching

array getUsernameBySearch (string $username)
  • string $username: The search string
listMessages (line 322)

List Messages

int listMessages (array $options, int $current_row)
  • array $options: The search options
  • int $current_row: The current row.
listMessagesByID (line 268)

Gets a list of messages for a user

array listMessagesByID (int $userid)
  • int $userid: User ID
markAsNotSpam (line 96)

Mark a message as not spam

void markAsNotSpam (int $pmid, int $userid)
  • int $pmid: The pm's unique id.
  • int $userid: The user id reporting it.
markAsSpam (line 77)

Mark a message as spam

void markAsSpam (int $pmid, int $userid)
  • int $pmid: The pm's unique id.
  • int $userid: The user id reporting it.
readMessage (line 128)

Read a message

void readMessage (int $id)
  • int $id: The pm's unique id.
sendMessage (line 187)

Send a PM

boolean sendMessage (array $data)
  • array $data: The array data
updateSettings (line 51)

Updates the PM Settings

  • return: True or False
boolean updateSettings (array $data)
  • array $data: An array of data