function forum_page
7.x forum.pages.inc | forum_page( |
6.x forum.pages.inc | forum_page($tid = 0) |
Menu callback; prints a forum listing.
1 string reference to 'forum_page'
- forum_menu in drupal-6.x/
modules/ forum/ forum.module - Implementation of hook_menu().
File
- drupal-6.x/
modules/ forum/ forum.pages.inc, line 11 - User page callbacks for the forum module.
Code
function forum_page($tid = 0) {
if (!is_numeric($tid)) {
return MENU_NOT_FOUND;
}
$tid = (int) $tid;
$topics = '';
$forum_per_page = variable_get('forum_per_page', 25);
$sortby = variable_get('forum_order', 1);
$forums = forum_get_forums($tid);
$parents = taxonomy_get_parents_all($tid);
if ($tid && !in_array($tid, variable_get('forum_containers', array()))) {
$topics = forum_get_topics($tid, $sortby, $forum_per_page);
}
return theme('forums', $forums, $topics, $parents, $tid, $sortby, $forum_per_page);
}