| [ Index ] |
PHP Cross Reference of Drupal 6 (yi-drupal) |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @file forum-list.tpl.php 5 * Default theme implementation to display a list of forums and containers. 6 * 7 * Available variables: 8 * - $forums: An array of forums and containers to display. It is keyed to the 9 * numeric id's of all child forums and containers. 10 * - $forum_id: Forum id for the current forum. Parent to all items within 11 * the $forums array. 12 * 13 * Each $forum in $forums contains: 14 * - $forum->is_container: Is TRUE if the forum can contain other forums. Is 15 * FALSE if the forum can contain only topics. 16 * - $forum->depth: How deep the forum is in the current hierarchy. 17 * - $forum->zebra: 'even' or 'odd' string used for row class. 18 * - $forum->name: The name of the forum. 19 * - $forum->link: The URL to link to this forum. 20 * - $forum->description: The description of this forum. 21 * - $forum->new_topics: True if the forum contains unread posts. 22 * - $forum->new_url: A URL to the forum's unread posts. 23 * - $forum->new_text: Text for the above URL which tells how many new posts. 24 * - $forum->old_topics: A count of posts that have already been read. 25 * - $forum->num_posts: The total number of posts in the forum. 26 * - $forum->last_reply: Text representing the last time a forum was posted or 27 * commented in. 28 * 29 * @see template_preprocess_forum_list() 30 * @see theme_forum_list() 31 */ 32 ?> 33 <table id="forum-<?php print $forum_id; ?>"> 34 <thead> 35 <tr> 36 <th><?php print t('Forum'); ?></th> 37 <th><?php print t('Topics');?></th> 38 <th><?php print t('Posts'); ?></th> 39 <th><?php print t('Last post'); ?></th> 40 </tr> 41 </thead> 42 <tbody> 43 <?php foreach ($forums as $child_id => $forum): ?> 44 <tr id="forum-list-<?php print $child_id; ?>" class="<?php print $forum->zebra; ?>"> 45 <td <?php print $forum->is_container ? 'colspan="4" class="container"' : 'class="forum"'; ?>> 46 <?php /* Enclose the contents of this cell with X divs, where X is the 47 * depth this forum resides at. This will allow us to use CSS 48 * left-margin for indenting. 49 */ ?> 50 <?php print str_repeat('<div class="indent">', $forum->depth); ?> 51 <div class="name"><a href="<?php print $forum->link; ?>"><?php print $forum->name; ?></a></div> 52 <?php if ($forum->description): ?> 53 <div class="description"><?php print $forum->description; ?></div> 54 <?php endif; ?> 55 <?php print str_repeat('</div>', $forum->depth); ?> 56 </td> 57 <?php if (!$forum->is_container): ?> 58 <td class="topics"> 59 <?php print $forum->num_topics ?> 60 <?php if ($forum->new_topics): ?> 61 <br /> 62 <a href="<?php print $forum->new_url; ?>"><?php print $forum->new_text; ?></a> 63 <?php endif; ?> 64 </td> 65 <td class="posts"><?php print $forum->num_posts ?></td> 66 <td class="last-reply"><?php print $forum->last_reply ?></td> 67 <?php endif; ?> 68 </tr> 69 <?php endforeach; ?> 70 </tbody> 71 </table>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Jul 9 18:01:44 2012 | Cross-referenced by PHPXref 0.7 |