Function __global->wiki_add_post
Definitions
sources/wiki.php
- Add a Wiki+ post.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: int
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $page_id | AUTO_LINK | No | No | required parameter | N/A | N/A | The page ID |
| $message | string | No | No | required parameter | N/A | N/A | The new post |
| $validated | BINARY | No | No | 1 | N/A | N/A | Whether the post will be validated |
| $member_id | ?MEMBER | No | No | Null | N/A | N/A | The member doing the action (null: current member) |
| $send_notification | boolean | No | No | True | N/A | N/A | Whether to send out a notification out |
| $add_time | ?TIME | No | No | Null | N/A | N/A | The add time (null: now) |
| $views | integer | No | No | 0 | N/A | N/A | The number of views so far |
| $edit_date | ?TIME | No | No | Null | N/A | N/A | The edit time (null: N/A) |
Returns
- The post ID
- Type: AUTO_LINK
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Add a Wiki+ post.
*
* @param AUTO_LINK $page_id The page ID
* @param string $message The new post
* @param BINARY $validated Whether the post will be validated
* @param ?MEMBER $member_id The member doing the action (null: current member)
* @param boolean $send_notification Whether to send out a notification out
* @param ?TIME $add_time The add time (null: now)
* @param integer $views The number of views so far
* @param ?TIME $edit_date The edit time (null: N/A)
* @return AUTO_LINK The post ID
*/
function wiki_add_post(int $page_id, string $message, int $validated = 1, ?int $member_id = null, bool $send_notification = true, ?int $add_time = null, int $views = 0, ?int $edit_date = null) : int
* Add a Wiki+ post.
*
* @param AUTO_LINK $page_id The page ID
* @param string $message The new post
* @param BINARY $validated Whether the post will be validated
* @param ?MEMBER $member_id The member doing the action (null: current member)
* @param boolean $send_notification Whether to send out a notification out
* @param ?TIME $add_time The add time (null: now)
* @param integer $views The number of views so far
* @param ?TIME $edit_date The edit time (null: N/A)
* @return AUTO_LINK The post ID
*/
function wiki_add_post(int $page_id, string $message, int $validated = 1, ?int $member_id = null, bool $send_notification = true, ?int $add_time = null, int $views = 0, ?int $edit_date = null) : int

