| 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 |
function forum_page($tid = 0) {
|
| 13 |
$topics = '';
|
| 14 |
$forum_per_page = variable_get('forum_per_page', 25);
|
| 15 |
$sortby = variable_get('forum_order', 1);
|
| 16 |
|
| 17 |
$forums = forum_get_forums($tid);
|
| 18 |
$parents = taxonomy_get_parents_all($tid);
|
| 19 |
if ($tid && !in_array($tid, variable_get('forum_containers', array()))) {
|
| 20 |
$topics = forum_get_topics($tid, $sortby, $forum_per_page);
|
| 21 |
}
|
| 22 |
|
| 23 |
return theme('forums', array('forums' => $forums, 'topics' => $topics, 'parents' => $parents, 'tid' => $tid, 'sortby' => $sortby, 'forums_per_page' => $forum_per_page));
|
| 24 |
}
|