function theme_advanced_forum_subcontainer_list in Advanced Forum 6.2
Same name and namespace in other branches
- 7.2 includes/theme.inc \theme_advanced_forum_subcontainer_list()
Theme function to a formatted list of subcontainers.
Parameters
$subcontainer_list: Array of subcontainers.
Return value
Formatted list of subcontainers.
1 theme call to theme_advanced_forum_subcontainer_list()
- _advanced_forum_preprocess_forum_list in includes/
advanced_forum_preprocess_forum_list.inc - @file Holds the contents of a preprocess function moved into its own file to ease memory requirements and having too much code in one file.
File
- includes/
theme.inc, line 194 - Holds theme functions and template preprocesses. Other style related functions are in style.inc
Code
function theme_advanced_forum_subcontainer_list($subcontainer_list) {
$subcontainers = array();
foreach ($subcontainer_list as $tid => $subcontainer) {
// Note: $subcontainer->name has not been run through check_plain because
// it ends up going through there when l() is called without the HTML
// option. If you change this to set HTML to TRUE, you must sanitize it.
$text = l($subcontainer->name, "forum/{$tid}");
$text .= ' (' . $subcontainer->total_posts;
if (empty($subcontainer->new_posts)) {
$text .= ')';
}
else {
$text .= ' - ' . l($subcontainer->new_posts_text, $subcontainer->new_posts_path, array(
'fragment' => 'new',
)) . ')';
}
$subcontainers[] = $text;
}
return implode(', ', $subcontainers);
}