function advanced_forum_forum_jump in Advanced Forum 7.2
Create a drop down list of forum hierarchy.
1 call to advanced_forum_forum_jump()
- advanced_forum_preprocess_views_view__advanced_forum_topic_list in includes/
theme.inc - Preprocess views forum topic list.
File
- ./
advanced_forum.module, line 1342 - Enables the look and feel of other popular forum software.
Code
function advanced_forum_forum_jump($tid = 0) {
global $user;
ctools_include('jump-menu');
$select = array();
$options = array();
$vid = variable_get('forum_nav_vocabulary', 0);
if ($tid > 0) {
$forum_tree = taxonomy_get_tree($vid);
foreach ($forum_tree as $forum) {
$select[url("forum/" . $forum->tid)] = str_repeat("-", $forum->depth) . $forum->name;
}
}
$options['choose'] = t("- Select a forum -");
// Create and return the jump menu.
$form = drupal_get_form('ctools_jump_menu', $select, $options);
return drupal_render($form);
}