aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenry Sudhof <kellanved@phpbb.com>2007-04-27 14:07:24 +0000
committerHenry Sudhof <kellanved@phpbb.com>2007-04-27 14:07:24 +0000
commit9ee570aebd300a89daffc67e24d3e33caee4653e (patch)
tree94e29b5d4e8fd18a83960b6afbf929630c5fbc09
parentfc295f5f0eef6b761c7c2d825bc01501e8882a25 (diff)
downloadforums-9ee570aebd300a89daffc67e24d3e33caee4653e.tar
forums-9ee570aebd300a89daffc67e24d3e33caee4653e.tar.gz
forums-9ee570aebd300a89daffc67e24d3e33caee4653e.tar.bz2
forums-9ee570aebd300a89daffc67e24d3e33caee4653e.tar.xz
forums-9ee570aebd300a89daffc67e24d3e33caee4653e.zip
#10191
git-svn-id: file:///svn/phpbb/trunk@7410 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/includes/functions_display.php6
-rw-r--r--phpBB/styles/prosilver/template/forumlist_body.html4
-rw-r--r--phpBB/styles/subsilver2/template/forumlist_body.html6
3 files changed, 14 insertions, 2 deletions
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 251a7b9f0d..26e7f050a8 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -254,6 +254,8 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
get_moderators($forum_moderators, $forum_ids_moderator);
}
+ // Used to tell whatever we have to create a dummy category or not.
+ $last_catless = true;
foreach ($forum_rows as $row)
{
// Empty category
@@ -366,9 +368,11 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$s_subforums_list[] = '<a href="' . $subforum['link'] . '"' . (($subforum['unread']) ? ' class="subforum-unread"' : '') . '>' . $subforum['name'] . '</a>';
}
$s_subforums_list = (string) implode(', ', $s_subforums_list);
+ $catless = ($row['parent_id'] == $root_data['forum_id']) ? true : false;
$template->assign_block_vars('forumrow', array(
'S_IS_CAT' => false,
+ 'S_NO_CAT' => $catless && !$last_catless,
'S_IS_LINK' => ($row['forum_type'] == FORUM_LINK) ? true : false,
'S_UNREAD_FORUM' => $forum_unread,
'S_LOCKED_FORUM' => ($row['forum_status'] == ITEM_LOCKED) ? true : false,
@@ -409,6 +413,8 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
'S_UNREAD' => $subforum['unread'])
);
}
+
+ $last_catless = $catless;
}
$template->assign_vars(array(
diff --git a/phpBB/styles/prosilver/template/forumlist_body.html b/phpBB/styles/prosilver/template/forumlist_body.html
index 523e9bc5e1..3332d79421 100644
--- a/phpBB/styles/prosilver/template/forumlist_body.html
+++ b/phpBB/styles/prosilver/template/forumlist_body.html
@@ -1,13 +1,13 @@
<!-- BEGIN forumrow -->
- <!-- IF forumrow.S_IS_CAT and not forumrow.S_FIRST_ROW -->
+ <!-- IF (forumrow.S_IS_CAT and not forumrow.S_FIRST_ROW) or forumrow.S_NO_CAT -->
</ul>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- ENDIF -->
- <!-- IF forumrow.S_IS_CAT or forumrow.S_FIRST_ROW -->
+ <!-- IF forumrow.S_IS_CAT or forumrow.S_FIRST_ROW or forumrow.S_NO_CAT -->
<div class="forabg">
<div class="inner"><span class="corners-top"><span></span></span>
<ul class="topiclist">
diff --git a/phpBB/styles/subsilver2/template/forumlist_body.html b/phpBB/styles/subsilver2/template/forumlist_body.html
index bc335fad45..5454e63ffe 100644
--- a/phpBB/styles/subsilver2/template/forumlist_body.html
+++ b/phpBB/styles/subsilver2/template/forumlist_body.html
@@ -32,6 +32,12 @@
<!-- ENDIF -->
</tr>
<!-- ELSE -->
+ <!-- IF forumrow.S_NO_CAT -->
+ <tr>
+ <td class="cat" colspan="2"><h4>{L_FORUM}</h4></td>
+ <td class="catdiv" colspan="3">&nbsp;</td>
+ </tr>
+ <!-- ENDIF -->
<tr>
<td class="row1" width="50" align="center">{forumrow.FORUM_FOLDER_IMG}</td>
<td class="row1" width="100%">