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). A array could specify container collapses. for ( $counter = 3; $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(); if($(\'img#toggleImage-'.$counter.'\').attr("src") == "sites/all/modules/advanced_forum/themes/advforum/images/minimize.gif") { $("img#toggleImage-'.$counter.'").attr("src","sites/all/modules/advanced_forum/themes/advforum/images/maximize.gif"); } else { $(\'img#toggleImage-'.$counter.'\').attr("src","sites/all/modules/advanced_forum/themes/advforum/images/minimize.gif"); } }); '."\n\t"; drupal_add_js ( ' $(document).ready(function() { '."$jQhide$jQtoggle". 'return false; });', 'inline' ); ?> $forum): ?> is_container) $container = $container +1; ?> "> is_container): ?>
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";?>
description): ?>
description; ?>
', $forum->depth); ?>
num_topics ?> new_topics): ?>
new_text; ?>
num_posts ?> last_reply ?>