Function __global->_helper_show_forum_topics
Definitions
sources/cns_forum_driver_helper.php
- Get an array of topics in the given forum. Each topic is an array with the following attributes:- id, the topic ID- title, the topic title- lastusername, the username of the last poster- lasttime, the timestamp of the last reply- closed, a Boolean for whether the topic is currently closed or not- firsttitle, the title of the first post- firstpost, the first post (only set if $show_first_posts was true)
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $this_ref | object | No | No | required parameter | N/A | N/A | Link to the real forum driver |
| $name | mixed | No | No | required parameter | N/A | N/A | The forum name or forum ID or an array of forum IDs (in such an array the KEYS are forum IDs, and the values ignored) |
| $limit | integer | No | No | required parameter | N/A | N/A | The limit |
| $start | integer | No | No | required parameter | N/A | N/A | The start position |
| &$max_rows | integer | Yes | No | required parameter | N/A | N/A | The total rows (not a parameter: returns by reference) |
| $filter_topic_title | SHORT_TEXT | No | No | required parameter | N/A | N/A | The topic title filter |
| $filter_topic_description | SHORT_TEXT | No | No | required parameter | N/A | N/A | The topic description filter; may apply to the topic title if there is no separate description field with additional wildcarding to match what make_post_forum_topic is doing |
| $show_first_posts | boolean | No | No | required parameter | N/A | N/A | Whether to show the first posts |
| $date_key | string | No | No | required parameter | lasttime firsttime | N/A | The date key to sort by |
| $hot | boolean | No | No | required parameter | N/A | N/A | Whether to limit to hot topics |
| $only_open | boolean | No | No | required parameter | N/A | N/A | Open topics only |
Returns
- The array of topics (null: error/none)
- Type: ?array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get an array of topics in the given forum. Each topic is an array with the following attributes:- id, the topic ID- title, the topic title- lastusername, the username of the last poster- lasttime, the timestamp of the last reply- closed, a Boolean for whether the topic is currently closed or not- firsttitle, the title of the first post- firstpost, the first post (only set if $show_first_posts was true)
*
* @param object $this_ref Link to the real forum driver
* @param mixed $name The forum name or forum ID or an array of forum IDs (in such an array the KEYS are forum IDs, and the values ignored)
* @param integer $limit The limit
* @param integer $start The start position
* @param integer $max_rows The total rows (not a parameter: returns by reference)
* @param SHORT_TEXT $filter_topic_title The topic title filter
* @param SHORT_TEXT $filter_topic_description The topic description filter; may apply to the topic title if there is no separate description field with additional wildcarding to match what make_post_forum_topic is doing
* @param boolean $show_first_posts Whether to show the first posts
* @param string $date_key The date key to sort by
* @set lasttime firsttime
* @param boolean $hot Whether to limit to hot topics
* @param boolean $only_open Open topics only
* @return ?array The array of topics (null: error/none)
*/
function _helper_show_forum_topics(object $this_ref, $name, int $limit, int $start, int &$max_rows, string $filter_topic_title, string $filter_topic_description, bool $show_first_posts, string $date_key, bool $hot, bool $only_open) : ?array
* Get an array of topics in the given forum. Each topic is an array with the following attributes:- id, the topic ID- title, the topic title- lastusername, the username of the last poster- lasttime, the timestamp of the last reply- closed, a Boolean for whether the topic is currently closed or not- firsttitle, the title of the first post- firstpost, the first post (only set if $show_first_posts was true)
*
* @param object $this_ref Link to the real forum driver
* @param mixed $name The forum name or forum ID or an array of forum IDs (in such an array the KEYS are forum IDs, and the values ignored)
* @param integer $limit The limit
* @param integer $start The start position
* @param integer $max_rows The total rows (not a parameter: returns by reference)
* @param SHORT_TEXT $filter_topic_title The topic title filter
* @param SHORT_TEXT $filter_topic_description The topic description filter; may apply to the topic title if there is no separate description field with additional wildcarding to match what make_post_forum_topic is doing
* @param boolean $show_first_posts Whether to show the first posts
* @param string $date_key The date key to sort by
* @set lasttime firsttime
* @param boolean $hot Whether to limit to hot topics
* @param boolean $only_open Open topics only
* @return ?array The array of topics (null: error/none)
*/
function _helper_show_forum_topics(object $this_ref, $name, int $limit, int $start, int &$max_rows, string $filter_topic_title, string $filter_topic_description, bool $show_first_posts, string $date_key, bool $hot, bool $only_open) : ?array

