ocf_get_forum_tree_secure (line 138)
Generate a tempcode tree based selection list (ala nice_get_*) for choosing a forum OR a map of details. Also capable of getting comma-separated ancester forum lists. Also capable of displaying topic lists in the tree. In other words... this function is incredibly powerful, and complex.
mixed
ocf_get_forum_tree_secure
([?MEMBER $member_id = NULL], [?AUTO_LINK $base_forum = NULL], [boolean $field_format = false], [?array $selected_forum = NULL], [string $tree = ''], [?AUTO_LINK $skip = NULL], [?boolean $order_sub_alpha = NULL], [boolean $use_compound_list = false], [?integer $levels = NULL], [boolean $do_stats = false])
-
?MEMBER
$member_id: The member that the view privileges are done for (NULL: current member).
-
?AUTO_LINK
$base_forum: The forum we are starting from (NULL: capture the whole tree).
-
boolean
$field_format: Whether to get a tempcode list (as opposed to a list of maps).
-
?array
$selected_forum: The forum(s) to select by default (NULL: no preference). Only applies if !$topics_too. An array of AUTO_LINK's (for IDs) or strings (for names).
-
string
$tree: The ancester list at this point of the recursion (blank for the start).
-
?AUTO_LINK
$skip: ID of a forum to skip display/recursion for (NULL: none).
-
?boolean
$order_sub_alpha: Whether the child forums are ordered alphabetically (NULL: find from DB).
-
boolean
$use_compound_list: Whether to generate a compound list (a list of all the ancesters, for each point in the forum tree) as well as the tree.
-
?integer
$levels: The number of recursive levels to search (NULL: all)
-
boolean
$do_stats: Whether to generate tree statistics.
ocf_get_topic_tree (line 75)
Get a list of maps containing all the topics, and path information, under the specified forum - and those beneath it, recursively.
array
ocf_get_topic_tree
([?AUTO_LINK $forum_id = NULL], [?string $tree = NULL], [?ID_TEXT $title = NULL], [?integer $levels = NULL])
-
?AUTO_LINK
$forum_id: The forum being at the root of our recursion (NULL: true root forum)
-
?string
$tree: The tree up to this point in the recursion (NULL: blank, as we are starting the recursion)
-
?ID_TEXT
$title: The forum name of the $forum_id we are currently going through (NULL: look it up). This is here for efficiency reasons, as finding children IDs to recurse to also reveals the childs title
-
?integer
$levels: The number of recursive levels to search (NULL: all)
ocf_nice_get_categories (line 28)
Get a nice list for selection from the forum categories.
tempcode
ocf_nice_get_categories
([?AUTO_LINK $avoid = NULL], [?AUTO_LINK $it = NULL])
-
?AUTO_LINK
$avoid: Category to avoid putting in the list (NULL: don't avoid any).
-
?AUTO_LINK
$it: Category selected by default (NULL: no specific default).
ocf_nice_get_topic_tree (line 46)
Get a nice, formatted XHTML list of topics, in forum tree structure
tempcode
ocf_nice_get_topic_tree
([?AUTO_LINK $it = NULL])
-
?AUTO_LINK
$it: The currently selected topic (NULL: none selected)