aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewonline.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-04-19 14:46:11 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-04-19 14:46:11 +0000
commit4c05450291d939f0d6bf4ea3ba538719cf3b43ba (patch)
tree7162c9ab11a4de1f959e96d0bff418df5dfdb2b8 /phpBB/viewonline.php
parent40640febbf1dae142443b44d59313181375f2996 (diff)
downloadforums-4c05450291d939f0d6bf4ea3ba538719cf3b43ba.tar
forums-4c05450291d939f0d6bf4ea3ba538719cf3b43ba.tar.gz
forums-4c05450291d939f0d6bf4ea3ba538719cf3b43ba.tar.bz2
forums-4c05450291d939f0d6bf4ea3ba538719cf3b43ba.tar.xz
forums-4c05450291d939f0d6bf4ea3ba538719cf3b43ba.zip
Replaced previously removed anon and non-logged-in user templating info
git-svn-id: file:///svn/phpbb/trunk@188 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewonline.php')
-rw-r--r--phpBB/viewonline.php31
1 files changed, 26 insertions, 5 deletions
diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php
index b074909e15..5f3eebab2e 100644
--- a/phpBB/viewonline.php
+++ b/phpBB/viewonline.php
@@ -91,17 +91,29 @@ if($online_count)
$row_color = "#DDDDDD";
}
- if($onlinerow[$i]['user_id'] != ANONYMOUS && $onlinerow[$i]['user_id'] != DELETED && $onlinerow[$i]['session_logged_in'])
+ if($onlinerow[$i]['user_id'] != ANONYMOUS && $onlinerow[$i]['user_id'] != DELETED)
{
- $username = $onlinerow[$i]['username'];
- $active_users++;
+ if($onlinerow[$i]['session_logged_in'])
+ {
+ $username = $onlinerow[$i]['username'];
+ $logged_on = TRUE;
+ $active_users++;
+ }
+ else
+ {
+ $username = $onlinerow[$i]['username'];
+ $logged_on = FALSE;
+ $guest_users++;
+ }
}
else
{
+ $username = $l_anonymous;
+ $logged_on = FALSE;
$guest_users++;
}
- if($onlinerow[$i]['forum_name'] == "" && $onlinerow[$i]['session_logged_in'])
+ if($onlinerow[$i]['forum_name'] == "")
{
switch($onlinerow[$i]['session_page'])
{
@@ -152,12 +164,21 @@ if($online_count)
$location = $onlinerow[$i]['forum_name'];
}
- if($onlinerow[$i]['session_logged_in'])
+ //
+ // What would be nice here is to let
+ // the template designer decide whether
+ // to display all users, registered users
+ // or just logged in users ... but we need
+ // if... constructs in the templating system
+ // for that ...
+ //
+ if($logged_on)
{
$template->assign_block_vars("userrow",
array("ROW_COLOR" => $row_color,
"USER_ID" => $onlinerow[$i]['user_id'],
"USERNAME" => $username,
+ "LOGGED_ON" => $logged_on,
"LASTUPDATE" => create_date($date_format, $onlinerow[$i]['session_time'], $sys_timezone),
"LOCATION" => $location,
"LOCATION_URL" => $location_url