| 1 | | <?php |
| 2 | | // $Id: forum.pages.inc,v 1.2 2007/07/26 06:48:03 dries Exp $ |
| 3 | | |
| 4 | | /** |
| 5 | | * @file |
| 6 | | * User page callbacks for the forum module. |
| 7 | | */ |
| 8 | | |
| 9 | | /** |
| 10 | | * Menu callback; prints a forum listing. |
| 11 | | */ |
| 12 | 12 | function forum_page($tid = 0) { |
| 13 | 12 | $topics = ''; |
| 14 | 12 | $forum_per_page = variable_get('forum_per_page', 25); |
| 15 | 12 | $sortby = variable_get('forum_order', 1); |
| 16 | | |
| 17 | 12 | $forums = forum_get_forums($tid); |
| 18 | 12 | $parents = taxonomy_get_parents_all($tid); |
| 19 | 12 | if ($tid && !in_array($tid, variable_get('forum_containers', array()))) { |
| 20 | 8 | $topics = forum_get_topics($tid, $sortby, $forum_per_page); |
| 21 | 8 | } |
| 22 | | |
| 23 | 12 | return theme('forums', $forums, $topics, $parents, $tid, $sortby,
$forum_per_page); |
| 24 | 0 | } |
| 25 | 12 | |