function theme_advanced_forum_node_type_create_list in Advanced Forum 7.2
Same name and namespace in other branches
- 6.2 includes/theme.inc \theme_advanced_forum_node_type_create_list()
Theme function to show list of types that can be posted in forum.
3 theme calls to theme_advanced_forum_node_type_create_list()
- advanced_forum_forum_node_create_list_content_type_render in plugins/
content_types/ forum_node_create_list.inc - Render the content.
- advanced_forum_preprocess_views_view__advanced_forum_topic_list in includes/
theme.inc - Preprocess views forum topic list.
- _advanced_forum_preprocess_forums in includes/
advanced_forum_preprocess_forums.inc - Preprocess forum.
File
- includes/
theme.inc, line 46 - Holds theme functions and template preprocesses. Other style related functions are in style.inc
Code
function theme_advanced_forum_node_type_create_list(&$variables) {
$forum_id = $variables['forum_id'];
// Get the list of node types to display links for.
$type_list = advanced_forum_node_type_create_list($forum_id);
$output = '';
if (is_array($type_list)) {
foreach ($type_list as $type => $item) {
$output .= '<div class="forum-add-node forum-add-' . $type . '">';
$output .= theme('advanced_forum_l', array(
'text' => t('New @node_type', array(
'@node_type' => $item['name'],
)),
'path' => $item['href'],
'options' => NULL,
'button_class' => 'large',
));
$output .= '</div>';
}
}
else {
// User did not have access to create any node types in this fourm so
// we just return the denial text / login prompt.
$output = $type_list;
}
return $output;
}