function advanced_forum_theme in Advanced Forum 7.2
Same name and namespace in other branches
- 6.2 advanced_forum.module \advanced_forum_theme()
- 6 advanced_forum.module \advanced_forum_theme()
Implements hook_theme().
File
- ./
advanced_forum.module, line 107 - Enables the look and feel of other popular forum software.
Code
function advanced_forum_theme() {
advanced_forum_load_style_includes();
// Bulk read all available (active) style templates.
$existing_items = advanced_forum_find_style_templates();
$items['advanced_forum_l'] = array(
'variables' => array(
'text' => NULL,
'path' => NULL,
'options' => array(),
'button_class' => NULL,
),
);
$items['advanced_forum_topic_header'] = array(
'variables' => array(
'node' => NULL,
'comment_count' => NULL,
),
);
$items['advanced_forum_active_poster'] = array(
'variables' => array(
'forum' => NULL,
'account' => NULL,
'posts' => NULL,
'topics' => NULL,
'last_post' => NULL,
),
);
$items['advanced_forum_user_picture'] = array(
'variables' => array(
'account' => NULL,
),
);
$items['advanced_forum_reply_link'] = array(
'variables' => array(
'node' => NULL,
),
);
$items['advanced_forum_topic_pager'] = array(
'variables' => array(
'pagecount' => NULL,
'topic' => NULL,
),
);
$items['advanced_forum_shadow_topic'] = array(
'variables' => array(
'title' => NULL,
'nid' => NULL,
'new_forum' => NULL,
),
);
$items['advanced_forum_subforum_list'] = array(
'variables' => array(
'subforum_list' => NULL,
),
);
$items['advanced_forum_subcontainer_list'] = array(
'variables' => array(
'subcontainer_list' => NULL,
),
);
$items['advanced_forum_simple_author_pane'] = array(
'variables' => array(
'context' => NULL,
),
);
$items['advanced_forum_post_edited'] = array(
'variables' => array(
'who' => NULL,
'when' => NULL,
'why' => NULL,
),
);
$items['advanced_forum_node_type_create_list'] = array(
'variables' => array(
'forum_id' => NULL,
),
);
/*
// Templates for features added by Views
// style
$items['views_view_forum_topic_list__advanced_forum_topic_list'] = array(
'variables' => array('view' => NULL, 'options' => NULL, 'rows' => NULL, 'title' => NULL),
'template' => 'advanced-forum-topic-list-view',
//'base hook' => 'views_view_forum_topic_list',
);
*/
// Display.
$items['views_view__advanced_forum_topic_list'] = array(
'variables' => array(
'view' => NULL,
),
'template' => 'advanced-forum-topic-list-outer-view',
);
// Display group.
$items['views_view__advanced_forum_group_topic_list'] = array(
'variables' => array(
'view' => NULL,
),
'template' => 'advanced-forum-group-topic-list-outer-view',
);
// Return merged items found in style folder with new ones
// array_merge_recursive doesn't work as desired.
foreach ($items as $key => $item) {
if (array_key_exists($key, $existing_items)) {
$existing_items[$key] += $item;
}
else {
$existing_items[$key] = $item;
}
}
return $existing_items;
}