is_container: Is TRUE if the forum can contain other forums. Is * FALSE if the forum can contain only topics. * - $forum->depth: How deep the forum is in the current hierarchy. * - $forum->zebra: 'even' or 'odd' string used for row class. * - $forum->name: The name of the forum. * - $forum->link: The URL to link to this forum. * - $forum->description: The description of this forum. * - $forum->new_topics: True if the forum contains unread posts. * - $forum->new_url: A URL to the forum's unread posts. * - $forum->new_text: Text for the above URL which tells how many new posts. * - $forum->old_topics: A count of posts that have already been read. * - $forum->num_posts: The total number of posts in the forum. * - $forum->last_reply: Text representing the last time a forum was posted or * commented in. * * @see template_preprocess_forum_list() * @see theme_forum_list() */ ?> $forum) //count containers if ($forum->is_container) $containerN += 1; //create the hideString, for which containers to hide (this should be made much smarter :-), so the user can specify which containers are collapsed at default). An array could specify container collapses. if(variable_get('advanced_forum_collapse_settings', 0) == 0) //if zero then collapse, else don't collapse. for ( $counter = 1; $counter <= $containerN; $counter += 1) //create the hide string $jQhide .='$(\'.forum-child-'.$counter.'\').hide();'."\n\t"; for ($counter = 1; $counter <= $containerN; $counter += 1) //create the toggle string $jQtoggle .='$(\'#containerID-'.$counter.'\').click(function(){$(\'.forum-child-'.$counter.'\').toggle()});'."\n\t"; drupal_add_js ( //include the jQuery stuff, don't know if this is the correct place to put this? ' $(document).ready(function() { '."$jQhide$jQtoggle". 'return false; });', 'inline' ); ?>
| is_container) {
print 'colspan="4" class="container"';
} elseif ($forum->new_topics) {
// Special class when the forum has new topics for changing icon
print 'class="forum forum-list-new"';
}else{
print 'class="forum"';
}
?>>
', $forum->depth); ?>
name; ?> is_container) print " show/hide";?>
description): ?>
description; ?>
', $forum->depth); ?>
|
is_container): ?>
num_topics ?>
new_topics): ?>
new_text; ?> |
num_posts ?> | last_reply ?> |