Function Forum_driver_wbb22->show_forum_topics

Definitions

sources/forum/wbb22.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
$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 Blank (empty string) N/A N/A The topic title filter (blank: no filter)
$filter_topic_description SHORT_TEXT No No Blank (empty string) 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 (blank: no filter)
$show_first_posts boolean No No False N/A N/A Whether to show the first posts
$date_key string No No lasttime lasttime firsttime N/A The date key to sort by
$hot boolean No No False N/A N/A Whether to limit to hot topics
$only_open boolean No No False N/A N/A Open topics only

Returns

  • The array of topics (null: error)
  • 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  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 (blank: no 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 (blank: no filter)
 * @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)
 */

public function show_forum_topics($name, int $limit, int $start, int &$max_rows, string $filter_topic_title = '', string $filter_topic_description = '', bool $show_first_posts = false, string $date_key = 'lasttime', bool $hot = false, bool $only_open = false) : ?array