diff options
-rw-r--r-- | phpBB/templates/PSO/viewonline_body.tpl | 19 | ||||
-rw-r--r-- | phpBB/viewonline.php | 43 |
2 files changed, 40 insertions, 22 deletions
diff --git a/phpBB/templates/PSO/viewonline_body.tpl b/phpBB/templates/PSO/viewonline_body.tpl index 2064a9a294..7d7b6a460a 100644 --- a/phpBB/templates/PSO/viewonline_body.tpl +++ b/phpBB/templates/PSO/viewonline_body.tpl @@ -1,3 +1,4 @@ + <table width="98%" cellspacing="0" cellpadding="4" border="0" align="center"> <tr> <td align="left"><span class="gensmall"><a href="{U_INDEX}">{SITENAME} {L_INDEX}</a></span></td> @@ -8,27 +9,29 @@ <tr> <td class="tablebg"><table width="100%" cellpadding="4" cellspacing="1" border="0"> <tr> - <td class="cat" colspan="3" align="center"><span class="gen"><b>{TOTAL_USERS_ONLINE}</b></span><br /><span class="gensmall">This data is based on users active over the past five minutes</span></td> + <td class="cat" colspan="3" align="center"><span class="gen"><b>{TOTAL_USERS_ONLINE}</b></span><br /><span class="gensmall">{L_ONLINE_EXPLAIN}</span></td> </tr> <tr> <th width="35%"> {L_USERNAME} </th> <th width="25%"> {L_LAST_UPDATE} </th> <th width="40%"> {L_LOCATION} </th> </tr> - <!-- BEGIN userrow --> - <tr bgcolor="{userrow.ROW_COLOR}"> - <td width="35%"> <span class="gen"><a href="{userrow.U_USER_PROFILE}">{userrow.USERNAME}</a></span> </td> - <td width="25%" align="center"> <span class="gen">{userrow.LASTUPDATE}</span> </td> - <td width="40%"> <span class="gen"><a href="{userrow.U_FORUM_LOCATION}">{userrow.LOCATION}</a></span> </td> + <!-- BEGIN reguserrow --> + <tr bgcolor="{reguserrow.ROW_COLOR}"> + <td width="35%"> <span class="gen"><a href="{reguserrow.U_USER_PROFILE}">{reguserrow.USERNAME}</a></span> </td> + <td width="25%" align="center"> <span class="gen">{reguserrow.LASTUPDATE}</span> </td> + <td width="40%"> <span class="gen"><a href="{reguserrow.U_FORUM_LOCATION}">{reguserrow.LOCATION}</a></span> </td> </tr> - <!-- END userrow --> + <!-- END reguserrow --> </table></td> </tr> </table> +<br clear="all" /> + <table cellspacing="2" border="0" width="98%" align="center"> <tr> <td width="40%" valign="top"><span class="gensmall"><b>{S_TIMEZONE}</b></span></td> - <td align="right" valign="top" nowrap>{JUMPBOX}</td> + <td align="right" valign="top" nowrap="nowrap">{JUMPBOX}</td> </tr> </table> diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php index e809556244..31d81df294 100644 --- a/phpBB/viewonline.php +++ b/phpBB/viewonline.php @@ -50,6 +50,9 @@ $template->set_filenames(array( $jumpbox = make_jumpbox(); $template->assign_vars(array( + "L_GO" => $lang['Go'], + "L_JUMP_TO" => $lang['Jump_to'], + "L_SELECT_FORUM" => $lang['Select_forum'], "JUMPBOX_LIST" => $jumpbox, "SELECT_NAME" => POST_FORUM_URL) ); @@ -85,6 +88,7 @@ else $template->assign_vars(array( "L_WHOSONLINE" => $lang['Who_is_online'], + "L_ONLINE_EXPLAIN" => $lang['Online_explain'], "L_USERNAME" => $lang['Username'], "L_LOCATION" => $lang['Location'], "L_LAST_UPDATE" => $lang['Last_updated']) @@ -96,7 +100,8 @@ $guest_users = 0; $online_count = $db->sql_numrows($result); if($online_count) { - $count = 0; + $count_reg = 0; + $count_anon = 0; for($i = 0; $i < $online_count; $i++) { @@ -198,24 +203,34 @@ if($online_count) if( $logged_on && ( !$hidden || $userdata['user_level'] == ADMIN ) ) { - if(!($count % 2)) - { - $row_color = "#" . $theme['td_color1']; - } - else - { - $row_color = "#" . $theme['td_color2']; - } - $count++; + $row_color = ( !($count_reg % 2) ) ? $theme['td_color1'] : $theme['td_color2']; + $row_class = ( !($count_reg % 2) ) ? $theme['td_class1'] : $theme['td_class2']; + $count_reg++; - $template->assign_block_vars("userrow", array( - "ROW_COLOR" => $row_color, + $template->assign_block_vars("reguserrow", array( + "ROW_COLOR" => "#" . $row_color, + "ROW_CLASS" => $row_class, "USERNAME" => $username, - "LOGGED_ON" => $logged_on, "LASTUPDATE" => create_date($board_config['default_dateformat'], $onlinerow[$i]['session_time'], $board_config['default__timezone']), "LOCATION" => $location, - "U_USER_PROFILE" => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $onlinerow[$i]['user_id']), + "U_USER_PROFILE" => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $onlinerow[$i]['user_id']), + "U_FORUM_LOCATION" => append_sid($location_url)) + ); + } + else if( !$hidden || $userdata['user_level'] == ADMIN ) + { + $row_color = ( !($count_reg % 2) ) ? $theme['td_color1'] : $theme['td_color2']; + $row_class = ( !($count_reg % 2) ) ? $theme['td_class1'] : $theme['td_class2']; + $count_reg++; + + $template->assign_block_vars("anonuserrow", array( + "ROW_COLOR" => "#" . $row_color, + "ROW_CLASS" => $row_class, + "USERNAME" => $lang['Guest'], + "LASTUPDATE" => create_date($board_config['default_dateformat'], $onlinerow[$i]['session_time'], $board_config['default__timezone']), + "LOCATION" => $location, + "U_FORUM_LOCATION" => append_sid($location_url)) ); } |