Function __global->cns_get_forum_view

Definitions

sources/cns_forumview.php

  • Get a map of details relating to the view of a certain forum of a certain member.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$forum_id AUTO_LINK No No required parameter N/A N/A The forum ID
$forum_info array No No required parameter N/A N/A The forum row
$start integer No No 0 N/A N/A The start row for getting details of topics in the forum (i.e. 0 is newest, higher is starting further back in time).
$true_start integer No No 0 N/A N/A True offset when disconsidering keyset pagination
$max ?integer No No Null N/A N/A The maximum number of topics to get detail of (null: default)
$sql_sup string No No Blank (empty string) N/A N/A Extra SQL to append
$sql_sup_order_by string No No Blank (empty string) N/A N/A Extra SQL to append as order clause
$sort ?string No No Null N/A N/A Sort order (null: none)
$keyset_clause ?string No No Null N/A N/A Keyset clause (null: none)
$keyset_field ?string No No Null N/A N/A Keyset field name so that we can extract values from DB result sets (null: none)

Returns

  • The details
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get a map of details relating to the view of a certain forum of a certain member.
 *
 * @param  AUTO_LINK $forum_id The forum ID
 * @param  array $forum_info The forum row
 * @param  integer $start The start row for getting details of topics in the forum (i.e. 0 is newest, higher is starting further back in time).
 * @param  integer $true_start True offset when disconsidering keyset pagination
 * @param  ?integer $max The maximum number of topics to get detail of (null: default)
 * @param  string $sql_sup Extra SQL to append
 * @param  string $sql_sup_order_by Extra SQL to append as order clause
 * @param  ?string $sort Sort order (null: none)
 * @param  ?string $keyset_clause Keyset clause (null: none)
 * @param  ?string $keyset_field Keyset field name so that we can extract values from DB result sets (null: none)
 * @return array The details
 */

function cns_get_forum_view(int $forum_id, array $forum_info, int $start = 0, int $true_start = 0, ?int $max = null, string $sql_sup = '', string $sql_sup_order_by = '', ?string $sort = null, ?string $keyset_clause = null, ?string $keyset_field = null) : array