function advanced_forum_menu in Advanced Forum 5
Same name and namespace in other branches
- 6.2 advanced_forum.module \advanced_forum_menu()
- 6 advanced_forum.module \advanced_forum_menu()
- 7.2 advanced_forum.module \advanced_forum_menu()
Implementation of hook_menu().
File
- ./
advanced_forum.module, line 21 - Enables the look and feel of other popular forum software.
Code
function advanced_forum_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array(
'path' => 'forum',
'title' => t('Forums'),
'callback' => 'advanced_forum_page',
'access' => user_access('access content'),
'type' => MENU_SUGGESTED_ITEM,
);
global $user;
$items[] = array(
'path' => "forum/markasread",
'title' => 'Helper page to mark forums read.',
'callback' => 'advanced_forum_markasread',
'access' => advanced_forum_markasread_access(),
'type' => MENU_CALLBACK,
);
// Add menu entry for settings page
$items[] = array(
'path' => "admin/settings/advanced-forum",
'title' => t('Advanced Forum'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'advanced_forum_settings_page',
),
'access' => user_access('administer advanced forum'),
);
}
return $items;
}