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

Class: post

Source Location: /lib/post.inc.php

Class post

Class Overview

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

ipbwi
   |
   --post
Author(s):
  • Matthias Reuter ($LastChangedBy: matthias $)
Information Tags:
Version:  $LastChangedDate: 2009-03-02 22:08:15 +0000 (Mo, 02 Mrz 2009) $
Copyright:  2007-2008 IPBWI development team
Link:  http://ipbwi.com/examples/post.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
int   create()   Adds a new post.
bool   delete()   Deletes Topic-Post contains delivered post_id
bool   edit()   Edits a post (adapted from add_post)
array   getList()   Lists posts in a topic.
array   getListIDs()   array with post IDs of the given Topics
array   info()   Returns information on a post.

[ Top ]
Methods
create  [line 42]

  int create( $topicid, string $post, [ $useEmo = false], [ $useSig = false], [bool $bypassPerms = false], [string $guestname = false], int $topicID, bool $disableemos, bool $disablesig  )

Adds a new post.

Parameters:
int   $topicID:  Topic ID of the Post
string   $post:  Message body
bool   $disableemos:  Default: false = disable emoticons, true = enable
bool   $disablesig:  Default: false = disable signatures, true = enable
bool   $bypassPerms:  Default: false = repect board permission, true = bypass permissions
string   $guestname:  Name for Guest user, Default: false
   $topicid: 
   $useEmo: 
   $useSig: 

API Tags:
Return:  New post ID or false on failure
Access:  public

Information Tags:
Author:  Cow <khlo@global-centre.com>
Author:  Matthias Reuter
Author:  Pita <peter@randomnity.com>
Since:  2.0
Sample:  
  1.  $ipbwi->post->create(55,'[b]post[/b]');
  2.  $ipbwi->post->create(77,'[i]post[/i]'truetruetrue'Mr. Guest');

[ Top ]
delete  [line 132]

  bool delete( int $postID  )

Deletes Topic-Post contains delivered post_id

Parameters:
int   $postID:  ID of the Post

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

Information Tags:
Author:  Matthias Reuter
Since:  2.0
Sample:  
  1.  $ipbwi->post->delete(55);

[ Top ]
edit  [line 162]

  bool edit( int $postID, string $post, [ $useEmo = false], [ $useSig = false], [bool $bypassPerms = false], [bool $appendedit = true], bool $disableemos, bool $disablesig  )

Edits a post (adapted from add_post)

Parameters:
int   $postID:  ID of the Post
string   $post:  Message body
bool   $disableemos:  Default: false = disable emoticons, true = enable
bool   $disablesig:  Default: false = disable signatures, true = enable
bool   $bypassPerms:  Default: false = repect board permission, true=bypass permissions
bool   $appendedit:  Default: true = adds the 'edited' line afer the post, false = doesn't add
   $useEmo: 
   $useSig: 

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

Information Tags:
Author:  Pita <peter@randomnity.com>
Author:  Matthias Reuter
Since:  2.0
Sample:  
  1.  $ipbwi->post->edit(55,'[b]post[/b]');
  2.  $ipbwi->post->edit(77,'[i]post[/i]'truetruefalsetrue);

[ Top ]
getList  [line 320]

  array getList( mixed $topicID, [array $settings = array()], [bool $bypassPerms = false], [bool $countView = false]  )

Lists posts in a topic.

Parameters:
mixed   $topicID:  The topic ID (array-list, int or '*' for all board topics)
array   $settings:  optional query settings. Settings allowed: order, orderby limit and start
  • string order = ASC or DESC, default ASC
  • string orderby = pid, author_id, author_name, post_date, post or random. Default: post_date
  • int start = Default: 0
  • int limit = Default: 15
bool   $bypassPerms:  Default: false = respect board permission, true = bypass permissions
bool   $countView:  Default: false = do not add view count, true = add the view count

API Tags:
Return:  Topic Posts
Access:  public

Information Tags:
Author:  Matthias Reuter
Since:  2.0
Sample:  
  1.  $ipbwi->post->getList(55);
  2.  $ipbwi->post->getList(array(55,22,77,99));
  3.  $ipbwi->post->getList('*');
  4.  $ipbwi->post->getList(55,array('order' => 'DESC''orderby' => 'pid''start' => 10'limit' => 20),true,true);

[ Top ]
getListIDs  [line 276]

  array getListIDs( int $topicIDs  )

array with post IDs of the given Topics

Parameters:
int   $topicIDs:  The topic IDs where the post IDs should be retrieved from

API Tags:
Return:  Post IDs
Access:  public

Information Tags:
Author:  Matthias Reuter
Since:  2.0
Sample:  
  1.  $ipbwi->post->getListIDs(array(55,22,77,99));

[ Top ]
info  [line 240]

  array info( int $postID  )

Returns information on a post.

Parameters:
int   $postID:  ID of the Post

API Tags:
Return:  Post 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->post->info(55);

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

[ Top ]

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