diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-01-31 16:01:17 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-01-31 16:01:17 +0000 |
commit | 1126d5cfe9bcf385023e294624630e36ff7ec780 (patch) | |
tree | 7f8c50f846cb0b904a2fe3c26f109b34884d68c4 | |
parent | 05a708fb06137758cf7a15a623b4813af2fc005f (diff) | |
download | brdo-1126d5cfe9bcf385023e294624630e36ff7ec780.tar.gz brdo-1126d5cfe9bcf385023e294624630e36ff7ec780.tar.bz2 |
- Patch #40575 by Wesley: made it easier to theme the forum overview page.
-rw-r--r-- | CHANGELOG.txt | 2 | ||||
-rw-r--r-- | modules/forum/forum.css | 9 | ||||
-rw-r--r-- | modules/forum/forum.module | 17 |
3 files changed, 22 insertions, 6 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 3c4cfb8b8..0338ff998 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,7 +2,7 @@ Drupal 6.0, xxxx-xx-xx (development version) ------------------------ - +- made it easier to theme the forum overview page Drupal 5.0, 2007-01-15 ---------------------- diff --git a/modules/forum/forum.css b/modules/forum/forum.css index 8db306860..875cf608c 100644 --- a/modules/forum/forum.css +++ b/modules/forum/forum.css @@ -10,6 +10,15 @@ #forum td.posts, #forum td.topics, #forum td.replies, #forum td.pager { text-align: center; } +#forum tr td.forum { + padding-left: 25px; + background-position: 2px 2px; + background-image: url(../../misc/forum-default.png); + background-repeat: no-repeat; +} +#forum tr.new-topics td.forum { + background-image: url(../../misc/forum-new.png); +} .forum-topic-navigation { padding: 1em 0 0 3em; border-top: 1px solid #888; 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 .= "</div>\n"; - $rows[] = array( - array('data' => $description, 'class' => 'forum'), - array('data' => $forum->num_topics . ($new_topics ? '<br />'. 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 ? '<br />'. 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; } } |