comparison modules/forum/forum.pages.inc @ 1:c1f4ac30525a 6.0

Drupal 6.0
author Franck Deroche <webmaster@defr.org>
date Tue, 23 Dec 2008 14:28:28 +0100
parents
children
comparison
equal deleted inserted replaced
0:5a113a1c4740 1:c1f4ac30525a
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', $forums, $topics, $parents, $tid, $sortby, $forum_per_page);
24 }