forum_page
- Versions
- 4.6 – 7
forum_page($tid = 0)
Menu callback; prints a forum listing.
Code
modules/forum.module, line 826
<?php
function forum_page($tid = 0) {
if (module_exist('taxonomy') && module_exist('comment')) {
$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('forum_display', $forums, $topics, $parents, $tid, $sortby, $forum_per_page);
}
else {
drupal_set_message(t('The forum module requires both the taxonomy module and the comment module to be enabled and configured.'), 'error');
return ' ';
}
}
?>Login or register to post comments 