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

Class: pm

Source Location: /lib/pm.inc.php

Class pm

Class Overview

Located in /lib/pm.inc.php [line 11]

ipbwi
   |
   --pm
Author(s):
  • Matthias Reuter ($LastChangedBy: matthias $)
Information Tags:
Version:  $LastChangedDate: 2009-02-02 19:30:06 +0000 (Mo, 02 Feb 2009) $
Copyright:  2007-2008 IPBWI development team
Link:  http://ipbwi.com/examples/pm.php
Since:  2.0
License:  GNU General Public License

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From ipbwi

ipbwi::$DB
ipbwi::$ips

Inherited From 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::info()
informations about the current IPBWI and PHP installation
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::updateSession()
Update Member Session Informations

Inherited From ipbwi

ipbwi::DEV_TEAM
ipbwi::PROJECT_LEADER
ipbwi::TITLE
ipbwi::VERSION
ipbwi::WEBSITE

[ Top ]
Method Summary
bool   addFolder()   Creates a personal message folder.
bool   blockContact()   Blocks a contact.
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.
int   numFolderPMs()   Returns number of PMs in a folder.
int   numFolderUnreadPMs()   Returns number of unread PMs in a folder.
int   numNewPMs()   Gets number of new PMs.
int   numTotalPMs()   Gets total number of PMs.
bool   removeFolder()   Removes a personal message folder.
bool   renameFolder()   Renames a personal message folder.
bool   save()   Saves a PM to the sent folder without sending it.
bool   send()   Sends a PM.
int   spaceUsage()   Returns PM space usage in percentage.

[ Top ]
Methods
addFolder  [line 254]

  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:
Author:  Cow <khlo@global-centre.com>
Author:  Matthias Reuter
Author:  Pita <peter@randomnity.com>
Since:  2.0
Sample:  
  1.  $ipbwi->pm->addFolder('folder name');

[ Top ]
blockContact  [line 960]

  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:
Author:  Cow <khlo@global-centre.com>
Author:  Matthias Reuter
Author:  Pita <peter@randomnity.com>
Since:  2.0
Sample:  
  1.  $ipbwi->pm->blockContact(55,'do not bother me');

[ Top ]
blockedList  [line 998]

  array blockedList( )

Returns blocked members information.


API Tags:
Return:  Blocked Members Information
Access:  public

Information Tags:
Author:  Cow <khlo@global-centre.com>
Author:  Matthias Reuter
Author:  Pita <peter@randomnity.com>
Since:  2.0
Sample:  
  1.  $ipbwi->pm->blockedList();

[ Top ]
delete  [line 505]

  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:
Author:  Cow <khlo@global-centre.com>
Author:  Matthias Reuter
Author:  Pita <peter@randomnity.com>
Since:  2.0
Sample:  
  1.  $ipbwi->pm->delete(55);

[ Top ]
emptyFolder  [line 169]

  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:
Author:  Cow <khlo@global-centre.com>
Author:  Matthias Reuter
Author:  Pita <peter@randomnity.com>
Since:  2.0
Sample:  
  1.  $ipbwi->pm->emptyFolder(55,1);

[ Top ]
folderExists  [line 330]

  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:
Author:  Cow <khlo@global-centre.com>
Author:  Matthias Reuter
Author:  Pita <peter@randomnity.com>
Since:  2.0
Sample:  
  1.  $ipbwi->pm->folderExists(3,55);

[ Top ]
folderid2name  [line 301]

  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:
Author:  Cow <khlo@global-centre.com>
Author:  Matthias Reuter
Author:  Pita <peter@randomnity.com>
Since:  2.0
Sample:  
  1.  $ipbwi->pm->folderid2name('folder name');

[ Top ]
getFolders  [line 365]

  array getFolders( )

Returns the current user's PM folders.


API Tags:
Return:  Current user's PM System Folders
Access:  public

Information Tags:
Author:  Cow <khlo@global-centre.com>
Author:  Matthias Reuter
Author:  Pita <peter@randomnity.com>
Since:  2.0
Sample:  
  1.  $ipbwi->pm->getFolders();

[ Top ]
getList  [line 869]

  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:
Author:  Cow <khlo@global-centre.com>
Author:  Matthias Reuter
Author:  Pita <peter@randomnity.com>
Since:  2.0
Sample:  
  1.  $ipbwi->pm->getList(5);

[ Top ]
info  [line 821]

  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:
Author:  Cow <khlo@global-centre.com>
Author:  Matthias Reuter
Author:  Pita <peter@randomnity.com>
Since:  2.0
Sample:  
  1.  $ipbwi->pm->info(5,true,false);

Redefinition of:
ipbwi::info()
informations about the current IPBWI and PHP installation

[ Top ]
isBlocked  [line 480]

  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:
Author:  Cow <khlo@global-centre.com>
Author:  Matthias Reuter
Author:  Pita <peter@randomnity.com>
Since:  2.0
Sample:  
  1.  $ipbwi->pm->isBlocked(55,77);

[ Top ]
mark  [line 84]

  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:
Author:  Cow <khlo@global-centre.com>
Author:  Matthias Reuter
Author:  Pita <peter@randomnity.com>
Since:  2.0
Sample:  
  1.  $ipbwi->pm->mark(55,0);

[ Top ]
move  [line 37]

  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:
Author:  Cow <khlo@global-centre.com>
Author:  Matthias Reuter
Author:  Pita <peter@randomnity.com>
Since:  2.0
Sample:  
  1.  $ipbwi->pm->move(5,4);

[ Top ]
numFolderPMs  [line 454]

  int numFolderPMs( int $folderID  )

Returns number of PMs in a folder.

Parameters:
int   $folderID:  Folder ID

API Tags:
Return:  Number of PMs in Folder
Access:  public

Information Tags:
Author:  Cow <khlo@global-centre.com>
Author:  Matthias Reuter
Author:  Pita <peter@randomnity.com>
Since:  2.0
Sample:  
  1.  $ipbwi->pm->numFolderPMs(55);

[ Top ]
numFolderUnreadPMs  [line 424]

  int numFolderUnreadPMs( int $folderID  )

Returns number of unread PMs in a folder.

Parameters:
int   $folderID:  Folder ID

API Tags:
Return:  Number of unread PMs in Folder
Access:  public

Information Tags:
Author:  Cow <khlo@global-centre.com>
Author:  Matthias Reuter
Author:  Pita <peter@randomnity.com>
Since:  2.0
Sample:  
  1.  $ipbwi->pm->numFolderUnreadPMs(55);

[ Top ]
numNewPMs  [line 910]

  int numNewPMs( )

Gets number of new PMs.


API Tags:
Return:  New Unread Messages Count
Access:  public

Information Tags:
Author:  Cow <khlo@global-centre.com>
Author:  Matthias Reuter
Author:  Pita <peter@randomnity.com>
Since:  2.0
Sample:  
  1.  $ipbwi->pm->numNewPMs();

[ Top ]
numTotalPMs  [line 934]

  int numTotalPMs( )

Gets total number of PMs.


API Tags:
Return:  Total Messages Count
Access:  public

Information Tags:
Author:  Cow <khlo@global-centre.com>
Author:  Matthias Reuter
Author:  Pita <peter@randomnity.com>
Since:  2.0
Sample:  
  1.  $ipbwi->pm->numTotalPMs();

[ Top ]
removeFolder  [line 123]

  bool removeFolder( int $folderID  )

Removes a personal message folder.

Parameters:
int   $folderID:  folder ID

API Tags:
Return:  true on success, otherwise false
Access:  public

Information Tags:
Author:  Cow <khlo@global-centre.com>
Author:  Matthias Reuter
Author:  Pita <peter@randomnity.com>
Since:  2.0
Sample:  
  1.  $ipbwi->pm->removeFolder(55);

[ Top ]
renameFolder  [line 211]

  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:
Author:  Cow <khlo@global-centre.com>
Author:  Matthias Reuter
Author:  Pita <peter@randomnity.com>
Since:  2.0
Sample:  
  1.  $ipbwi->pm->renameFolder(55,'new folder name');

[ Top ]
save  [line 539]

  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:
Author:  Cow <khlo@global-centre.com>
Author:  Matthias Reuter
Author:  Pita <peter@randomnity.com>
Since:  2.0
Sample:  
  1.  $ipbwi->pm->save(5,'message title','message content,array('55','77));

[ Top ]
send  [line 670]

  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:
Author:  Cow <khlo@global-centre.com>
Author:  Matthias Reuter
Author:  Pita <peter@randomnity.com>
Since:  2.0
Sample:  
  1.  $ipbwi->pm->send(5,'message title','message content,array('55','77),3);

[ Top ]
spaceUsage  [line 401]

  int spaceUsage( )

Returns PM space usage in percentage.


API Tags:
Return:  PM Space Usage in Percent
Access:  public

Information Tags:
Author:  Cow <khlo@global-centre.com>
Author:  Matthias Reuter
Author:  Pita <peter@randomnity.com>
Since:  2.0
Sample:  
  1.  $ipbwi->pm->spaceUsage();

[ Top ]

Documentation generated on Mon, 02 Mar 2009 23:51:01 +0100 by phpDocumentor 1.4.0