From 1126d5cfe9bcf385023e294624630e36ff7ec780 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 31 Jan 2007 16:01:17 +0000 Subject: - Patch #40575 by Wesley: made it easier to theme the forum overview page. --- modules/forum/forum.module | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'modules/forum/forum.module') diff --git a/modules/forum/forum.module b/modules/forum/forum.module index de845a837..b191bcc61 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -969,11 +969,18 @@ function theme_forum_list($forums, $parents, $tid) { } $description .= "\n"; - $rows[] = array( - array('data' => $description, 'class' => 'forum'), - array('data' => $forum->num_topics . ($new_topics ? '
'. l(format_plural($new_topics, '1 new', '@count new'), "forum/$forum->tid", NULL, NULL, 'new') : ''), 'class' => 'topics'), - array('data' => $forum->num_posts, 'class' => 'posts'), - array('data' => _forum_format($forum->last_post), 'class' => 'last-reply')); + $row = array( + 'data' => array( + array('data' => $description, 'class' => 'forum'), + array('data' => $forum->num_topics . ($new_topics ? '
'. l(format_plural($new_topics, '1 new', '@count new'), "forum/$forum->tid", NULL, NULL, 'new') : ''), 'class' => 'topics'), + array('data' => $forum->num_posts, 'class' => 'posts'), + array('data' => _forum_format($forum->last_post), 'class' => 'last-reply'), + ), + ); + if ($new_topics > 0) { + $row['class'] = 'new-topics'; + } + $rows[] = $row; } } -- cgit v1.2.3