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

Class: ipbwi_post

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

Class Overview

ipbwi
   |
   --ipbwi_post



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/post.php
since:  2.0
license:  GNU General Public License


[ Top ]


Class Methods


method create [line 40]

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.



Tags:

return:  New post ID or false on failure
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->post->create(55,'[b]post[/b]');
  2.  $ipbwi->post->create(77,'[i]post[/i]'truetruetrue'Mr. Guest');
access:  public


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  

[ Top ]

method delete [line 132]

bool delete( int $postID)

Deletes Topic-Post contains delivered post_id



Tags:

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


Parameters:

int   $postID   ID of the Post

[ Top ]

method edit [line 161]

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)



Tags:

return:  true on success, false on failure
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->post->edit(55,'[b]post[/b]');
  2.  $ipbwi->post->edit(77,'[i]post[/i]'truetruefalsetrue);
access:  public


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  

[ Top ]

method getList [line 369]

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

Lists posts in a topic.



Tags:

return:  Topic Posts
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);
access:  public


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 replacePostVars replace attachment post vars with attachment-code, default: true
  • string ipbwiLink If you want to use IPBWI for attachment-downloading, you are able to define the attachment-link here. The var %id% is required and will be replaced with the attachment-ID.
bool   $bypassPerms   Default: false = respect board permission, true = bypass permissions
bool   $countView   Default: false = do not add view count, true = add the view count

[ Top ]

method getListIDs [line 323]

array getListIDs( int $topicIDs)

array with post IDs of the given Topics



Tags:

return:  Post IDs
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->post->getListIDs(array(55,22,77,99));
access:  public


Parameters:

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

[ Top ]

method info [line 244]

array info( int $postID, [bool $replacePostVars = true], [string $ipbwiLink = false], [ $list = false])

Returns information on a post.



Tags:

return:  Post Information
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->post->info(55);
access:  public


Parameters:

int   $postID   ID of the Post
bool   $replacePostVars   replace attachment post vars with attachment-code, default: true
string   $ipbwiLink   If you want to use IPBWI for attachment-downloading, you are able to define the attachment-link here. The var %id% is required and will be replaced with the attachment-ID.
   $list  

[ Top ]


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