diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-03-10 17:48:08 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-03-10 17:48:08 +0000 |
commit | c75d5d7bf370a3340a00cb6cfaebb2a83515b2ac (patch) | |
tree | f5527475e8529720b46e5a22291859660c60a641 /phpBB/index.php | |
parent | 12828d376e8d51d9c104bf3f97c7242bf29caa1b (diff) | |
download | forums-c75d5d7bf370a3340a00cb6cfaebb2a83515b2ac.tar forums-c75d5d7bf370a3340a00cb6cfaebb2a83515b2ac.tar.gz forums-c75d5d7bf370a3340a00cb6cfaebb2a83515b2ac.tar.bz2 forums-c75d5d7bf370a3340a00cb6cfaebb2a83515b2ac.tar.xz forums-c75d5d7bf370a3340a00cb6cfaebb2a83515b2ac.zip |
Various additions and fixes
git-svn-id: file:///svn/phpbb/trunk@3628 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/index.php')
-rw-r--r-- | phpBB/index.php | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/phpBB/index.php b/phpBB/index.php index 8aa06f3a98..eeb7e53156 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -99,18 +99,25 @@ else } - -$sql = "SELECT group_name, group_colour +// Grab group details for legend display +$sql = "SELECT group_name, group_colour, group_type FROM " . GROUPS_TABLE . " - WHERE group_colour <> ''"; -$result = $db->sql_query($sql, 300); - + WHERE group_colour <> '' + AND group_display = 1"; +$result = $db->sql_query($sql, 120); +$legend = ''; +while ($row = $db->sql_fetchrow($result)) +{ + $legend .= (($legend != '') ? ', ' : '') . '<span style="color:#' . $row['group_colour'] . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</span>'; +} +// Assign index specific vars $template->assign_vars(array( - 'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts), - 'TOTAL_USERS' => sprintf($l_total_user_s, $total_users), - 'NEWEST_USER' => sprintf($user->lang['Newest_user'], "<a href=\"memberlist.$phpEx$SID&mode=viewprofile&u=$newest_uid \">", $newest_user, '</a>'), + 'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts), + 'TOTAL_USERS' => sprintf($l_total_user_s, $total_users), + 'NEWEST_USER' => sprintf($user->lang['Newest_user'], "<a href=\"memberlist.$phpEx$SID&mode=viewprofile&u=$newest_uid \">", $newest_user, '</a>'), + 'LEGEND' => $legend, 'FORUM_IMG' => $user->img('forum', 'NO_NEW_POSTS'), 'FORUM_NEW_IMG' => $user->img('forum_new', 'NEW_POSTS'), @@ -119,7 +126,7 @@ $template->assign_vars(array( 'U_MARK_READ' => "index.$phpEx$SID&mark=forums") ); -// Start output of page +// Output page $page_title = $user->lang['Index']; include($phpbb_root_path . 'includes/page_header.'.$phpEx); |