pm
[ class tree: pm ] [ index: pm ] [ all elements ]

Class: ipbwi_pm

Source Location: /ipbwi/lib/pm.inc.php

Class Overview

ipbwi
   |
   --ipbwi_pm



Author(s):

  • Matthias Reuter ($LastChangedBy: matthias $)

Version:

  • $LastChangedDate: 2009-08-26 19:19:41 +0200 (Mi, 26 Aug 2009) $

Copyright:

  • 2007-2010 IPBWI development team

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: ipbwi

ipbwi::addSystemMessage()
adds a system message
ipbwi::date()
Returns textual/timestamp offsetted date by board and by member offset and DST setting.
ipbwi::getBoardVar()
gets the requested board-var
ipbwi::getLibLang()
gets the language-var from actual requested native language-bit
ipbwi::makeSafe()
filtering html-strings, e.g. for db-queries
ipbwi::printSystemMessages()
prints system messages
ipbwi::properXHTML()
filtering HTML strings
ipbwi::setLang()
Set's current SDK language
ipbwi::sysInfo()
informations about the current IPBWI and PHP installation
ipbwi::__destruct()

Class Details

[line 11]


Tags:

author:  Matthias Reuter ($LastChangedBy: matthias $)
version:  $LastChangedDate: 2009-08-26 19:19:41 +0200 (Mi, 26 Aug 2009) $
copyright:  2007-2010 IPBWI development team
link:  http://ipbwi.com/examples/pm.php
since:  2.0
license:  GNU General Public License


[ Top ]


Class Methods


method addFolder [line 242]

bool addFolder( $name, int $folderID, string $newName)

Creates a personal message folder.



Tags:

return:  true on success, otherwise false
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->pm->addFolder('folder name');
access:  public


Parameters:

int   $folderID   folder ID
string   $newName   folder name
   $name  

[ Top ]

method blockContact [line 818]

bool blockContact( int $userID, [string $description = false])

Blocks a contact.



Tags:

return:  true on success, otherwise false
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->pm->blockContact(55,'do not bother me');
access:  public


Parameters:

int   $userID   Member ID to be added
string   $description   Description for the 'Buddy'

[ Top ]

method blockedList [line 854]

array blockedList( )

Returns blocked members information.



Tags:

return:  Blocked Members Information
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->pm->blockedList();
access:  public


[ Top ]

method delete [line 477]

bool delete( int $messageID)

Deletes a Personal Message.



Tags:

return:  true on success, otherwise false
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->pm->delete(55);
access:  public


Parameters:

int   $messageID   Message to be deleted

[ Top ]

method emptyFolder [line 161]

bool emptyFolder( int $folderID, [ $keepUnread = 0], int $keepunread)

Empties PMs in a personal message folder.



Tags:

return:  true on success, otherwise false
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->pm->emptyFolder(55,1);
access:  public


Parameters:

int   $folderID   folder ID
int   $keepunread   Default: 0=also delete unread msgs, 1=keep unread messages
   $keepUnread  

[ Top ]

method folderExists [line 314]

bool folderExists( int $folderID, [int $userID = false])

Returns whether a PM folder exists for a given member.



Tags:

return:  Folder Existance Status
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->pm->folderExists(3,55);
access:  public


Parameters:

int   $folderID   folder ID
int   $userID   If $userID is ommited, the last known member is used.

[ Top ]

method folderid2name [line 287]

string folderid2name( int $folderID, [int $userID = false])

Returns folder name associated with folder id of a member.



Tags:

return:  Folder Name associated with id
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->pm->folderid2name('folder name');
access:  public


Parameters:

int   $folderID   folder ID
int   $userID   If $userID is ommited, the last known member is used.

[ Top ]

method getFolders [line 347]

array getFolders( )

Returns the current user's PM folders.



Tags:

return:  Current user's PM System Folders
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->pm->getFolders();
access:  public


[ Top ]

method getList [line 733]

array getList( [string $folder = 'in'])

Lists PMs in a folder.



Tags:

return:  Information of PMs in folder.
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->pm->getList(5);
access:  public


Parameters:

string   $folder   Keyname of Inbox folder, 'in', 'sent'

[ Top ]

method info [line 687]

array info( int $ID, [int $markRead = false], [int $convert = true])

Returns information on a Personal Message.



Tags:

return:  Information of a PM
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->pm->info(5,true,false);
access:  public


Parameters:

int   $ID   PM record ID
int   $markRead   Default: 0=keep unread, 1=mark read
int   $convert   Default: 1 convert BBCode to HTML

[ Top ]

method isBlocked [line 454]

bool isBlocked( int $by, int $blocked)

Returns whether a member has blocked another member.



Tags:

return:  Block Status
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->pm->isBlocked(55,77);
access:  public


Parameters:

int   $by   Member ID of receiver (the one who blocked)
int   $blocked   Member ID of sender (the one who is blocked)

[ Top ]

method mark [line 80]

bool mark( int $messageID, [int $isRead = 1])

Marks a message read/unread.



Tags:

return:  true on success, otherwise false
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->pm->mark(55,0);
access:  public


Parameters:

int   $messageID   Message ID to be marked
int   $isRead   Default: 1=mark read, 0=mark unread

[ Top ]

method move [line 35]

bool move( int $messageID, int $targetID)

Moves a personal message to another folder.



Tags:

return:  true on success, otherwise false
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->pm->move(5,4);
access:  public


Parameters:

int   $messageID   Message ID to be moved
int   $targetID   Target folder ID.

[ Top ]

method numFolderPMs [line 430]

int numFolderPMs( int $folderID)

Returns number of PMs in a folder.



Tags:

return:  Number of PMs in Folder
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->pm->numFolderPMs(55);
access:  public


Parameters:

int   $folderID   Folder ID

[ Top ]

method numFolderUnreadPMs [line 402]

int numFolderUnreadPMs( int $folderID)

Returns number of unread PMs in a folder.



Tags:

return:  Number of unread PMs in Folder
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->pm->numFolderUnreadPMs(55);
access:  public


Parameters:

int   $folderID   Folder ID

[ Top ]

method numNewPMs [line 772]

int numNewPMs( )

Gets number of new PMs.



Tags:

return:  New Unread Messages Count
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->pm->numNewPMs();
access:  public


[ Top ]

method numTotalPMs [line 794]

int numTotalPMs( )

Gets total number of PMs.



Tags:

return:  Total Messages Count
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->pm->numTotalPMs();
access:  public


[ Top ]

method removeFolder [line 117]

bool removeFolder( int $folderID)

Removes a personal message folder.



Tags:

return:  true on success, otherwise false
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->pm->removeFolder(55);
access:  public


Parameters:

int   $folderID   folder ID

[ Top ]

method renameFolder [line 201]

bool renameFolder( int $folderID, string $newName)

Renames a personal message folder.



Tags:

return:  true on success, otherwise false
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->pm->renameFolder(55,'new folder name');
access:  public


Parameters:

int   $folderID   folder ID
string   $newName   New folder name

[ Top ]

method save [line 509]

bool save( int $toID, string $title, string $message, [array $cc = array()])

Saves a PM to the sent folder without sending it.



Tags:

return:  true on success, otherwise false
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->pm->save(5,'message title','message content,array('55','77'));
access:  public


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)

[ Top ]

method send [line 638]

bool send( int $toID, string $title, string $message, [ $inviteUsers = array()], [int $sentfolder = '0'], array $cc)

Sends a PM.



Tags:

return:  true on success, otherwise false
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->pm->send(5,'message title','message content,array('55','77'),3);
access:  public


Parameters:

int   $toID   Member ID to receive the message
string   $title   Message title
string   $message   Message body
array   $cc   Array of Display User Names for carbon copies (CC)
int   $sentfolder   Default: 0=do not save message in Sent folder, 1=save message
   $inviteUsers  

[ Top ]

method spaceUsage [line 381]

int spaceUsage( )

Returns PM space usage in percentage.



Tags:

return:  PM Space Usage in Percent
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->pm->spaceUsage();
access:  public


[ Top ]


Documentation generated on Sat, 23 Oct 2010 23:36:04 +0200 by phpDocumentor 1.4.3