home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / CMS / drupal-6.0.exe / drupal-6.0 / modules / forum / forum.pages.inc < prev    next >
Encoding:
Text File  |  2007-07-26  |  645 b   |  25 lines

  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. }
  25.