You are here

function theme_advanced_forum_node_type_create_list in Advanced Forum 6.2

Same name and namespace in other branches
  1. 7.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
_advanced_forum_preprocess_forums in includes/advanced_forum_preprocess_forums.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 32
Holds theme functions and template preprocesses. Other style related functions are in style.inc

Code

function theme_advanced_forum_node_type_create_list($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', t('New @node_type', array(
        '@node_type' => $item['name'],
      )), $item['href'], NULL, '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;
}