Function __global->cns_get_forum_parent_or_list
Definitions
sources/cns_forums.php
- Get an OR list of a forums parents, suited for selection from the f_topics table.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $forum_id | AUTO_LINK | No | No | required parameter | N/A | N/A | The ID of the forum |
| $parent_id | ?AUTO_LINK | No | No | -1 | N/A | N/A | The ID of the parent forum (-1: get it from the DB) (null: there is no parent, as it is the root forum) |
Returns
- The OR list
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get an OR list of a forums parents, suited for selection from the f_topics table.
*
* @param AUTO_LINK $forum_id The ID of the forum
* @param ?AUTO_LINK $parent_id The ID of the parent forum (-1: get it from the DB) (null: there is no parent, as it is the root forum)
* @return string The OR list
*/
function cns_get_forum_parent_or_list(int $forum_id, ?int $parent_id = -1) : string
* Get an OR list of a forums parents, suited for selection from the f_topics table.
*
* @param AUTO_LINK $forum_id The ID of the forum
* @param ?AUTO_LINK $parent_id The ID of the parent forum (-1: get it from the DB) (null: there is no parent, as it is the root forum)
* @return string The OR list
*/
function cns_get_forum_parent_or_list(int $forum_id, ?int $parent_id = -1) : string

