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

Class: ipbwi_topic

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

Class Overview

ipbwi
   |
   --ipbwi_topic



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


[ Top ]


Class Methods


method create [line 42]

int create( int $forumID, string $title, string $post, [string $desc = false], [bool $useEmo = true], [bool $useSig = true], [bool $bypassPerms = false], [string $guestName = false])

creates a new topic



Tags:

return:  topic ID if topic was created, otherwise false
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->topic->create(55,'topic title','topic post');
  2.  $ipbwi->topic->create(55,'topic title','topic post','topic description',false,false,true,true);
access:  public


Parameters:

int   $forumID   Forum-ID where topic will be created
string   $title   Topic-Title
string   $post   Topic-Post
string   $desc   Topic-Description
bool   $useEmo   set to true to enable emoticons in post
bool   $useSig   set to true to enable signature in post
bool   $bypassPerms   set to true to bypass permissions
string   $guestName   Author's name for Guest

[ Top ]

method delete [line 250]

bool delete( int $topicID)

deletes a topic



Tags:

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


Parameters:

int   $topicID   Topic-ID which has to be deleted

[ Top ]

method edit [line 138]

bool edit( int $topicID, string $title, string $post, [string $desc = false], [string $reason = false], [bool $close = false], [bool $pin = false], [bool $approve = true], [bool $useEmo = true], [bool $useSig = true], [bool $bypassPerms = false])

edits a topic



Tags:

return:  true on success, otherwise false
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->topic->edit(55,'topic title','topic post');
  2.  $ipbwi->topic->edit(55,'topic title','topic post','topic description','Reason',true,true,true,true,false,false,true);
access:  public


Parameters:

int   $topicID   Topic-ID which has to be edited
string   $title   Topic-Title
string   $post   Topic-Post
string   $desc   Topic-Description
string   $reason   reason for editing
bool   $close   Close the topic
bool   $pin   Pin the topic
bool   $approve   Make the topic approved or not
bool   $useEmo   set to true to enable emoticons in post
bool   $useSig   set to true to enable signature in post
bool   $bypassPerms   set to true to bypass permissions

[ Top ]

method getList [line 427]

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

lists topics from several forums and get topic-informations



Tags:

return:  Topic-Informations as multidimensional array
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->topic->getList(55);
  2.  $ipbwi->topic->getList(55,array('memberid' => 66));
  3.  $ipbwi->topic->getList(array(55,22,77,99));
  4.  $ipbwi->topic->getList('*');
  5.  $ipbwi->topic->getList(55,array('order' => 'DESC''orderby' => 'pid''start' => 10'limit' => 20'linked' => true'ignoreapproval' => true));
access:  public


Parameters:

mixed   $forumIDs   The forum IDs where the topics should be retrieved from (array-list, int or '*' for topics from all forums)
array   $settings   optional query settings. Settings allowed: order, orderby limit and start
  • string order = ASC or DESC, default ASC
  • string orderby = 'tid', 'title', 'posts', 'starter_name', 'starter_id', 'start_date', 'last_post', 'views', 'post_date'. Default: start_date
  • int start = Default: 0
  • int limit = Default: 15
  • bool linked = Get moved & linked topics, too. Default: false
  • bool ignoreapproval = Do not get topics which need to be approved. Default: false
  • int memberid = Default: false. Deliver Member ID to get topics of this member only
  • bool allsubs = Default: false. Retrieve topics from all subforums of delivered Forum-IDs
  • 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 $countView set to true to count topic views
bool   $bypassPerms   set to true to bypass permissions

[ Top ]

method getListIDs [line 362]

array getListIDs( mixed $forumIDs, [int $start = false], [int $limit = false], [bool $bypassPerms = false])

array with topic IDs of the given Forums



Tags:

return:  Topic-Informations as array
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->topic->getListIDs(55);
  2.  $ipbwi->topic->getListIDs(array(55,77,99));
  3.  $ipbwi->topic->getListIDs('*',10,20,true);
access:  public


Parameters:

mixed   $forumIDs   The forum IDs where the topic IDs should be retrieved from (array-list, int or '*' for topics from all forums)
int   $start   For performance purposes, you are able to set a start parameter to set a section of the attachment list. This is used for forum-attachment-list only.
int   $limit   For performance purposes, you are able to set a limit parameter to set a section of the attachment list. This is used for forum-attachment-list only.
bool   $bypassPerms   set to true, to ignore permissions

[ Top ]

method id2title [line 771]

string id2title( int $id)

Converts topic ID to topic-title



Tags:

return:  Topic Title
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->topic->title2id('topic title');
access:  public


Parameters:

int   $id   Topic ID

[ Top ]

method info [line 279]

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

get's topic informations



Tags:

return:  Topic-Informations as array
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->topic->info(55);
  2.  $ipbwi->topic->info(55,true,true,download.php?id=%id%');
access:  public


Parameters:

int   $topicID   Topic-ID
bool   $countView   set to true to count topic views
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 ]

method merge [line 604]

bool merge( int $topic1id, int $topic2id, $title, string $desc, [bool $bypassPerms = false])

merges several topics



Tags:

return:  true on success, otherwise false
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->topic->rate(55,77,'merged topic title''merged topic description');
  2.  $ipbwi->topic->rate(55,77,'merged topic title''merged topic description'true);
access:  public


Parameters:

int   $topic1id   ID('s) of the topic(s) to be merged
int   $topic2id   ID of topic that $topic1id will be merged into
string   $desc   Topic-Description
bool   $bypassPerms   set to true to bypass permissions
   $title  

[ Top ]

method move [line 794]

bool move( int $topicID, $destForumID, [int $bypassPerms = false], int $destforumid)

Moves a topic to a specified destination forum



Tags:

return:  true on success, false on failure
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->topic->move(55,33);
  2.  $ipbwi->topic->move(55,33,true);
access:  public


Parameters:

int   $topicID   Topic ID
int   $destforumid   Destination Forum ID
int   $bypassPerms   set to true to bypass permissions
   $destForumID  

[ Top ]

method rate [line 546]

bool rate( int $topicID, int $rating, [bool $bypassPerms = false])

rates a topic



Tags:

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


Parameters:

int   $topicID   ID of the topic which has to be rated
int   $rating   rating for the topic
bool   $bypassPerms   set to true to bypass permissions

[ Top ]

method title2id [line 749]

mixed title2id( string $title)

Converts topic title to topic-IDs



Tags:

return:  int Topic ID, array Topic IDs or false
author:  Matthias Reuter
since:  2.0
sample:  
  1.  $ipbwi->topic->title2id('topic title');
access:  public


Parameters:

string   $title   Topic Title

[ Top ]


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