Class: post
Source Location: /lib/post.inc.php
Class post
Inherited Properties, Constants, and Methods
Method Summary
| 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. |
Methods
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:
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: |
|
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: |
$ipbwi->post->edit(77,'[i]post[/i]', true, true, false, true);
|
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: |
$ipbwi->post->getList(55,array('order' => 'DESC', 'orderby' => 'pid', 'start' => 10, 'limit' => 20),true,true);
|
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: |
|
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:
Redefinition of:
- ipbwi::info()
- informations about the current IPBWI and PHP installation
|
|