[BUG] Hidden Members Visible in "Who is Online"

Support for IntegraMOD 140

Moderator: Integra Moderator

[BUG] Hidden Members Visible in "Who is Online"

PostAuthor: Dr. Bantham » Sat May 20, 2006 4:02 am

I have discovered that the problem with hidden members being visible to all within the "Who is Online" block only occurs when the member has set "Show me online" to "Only friends". The function appears to work correctly when set to "No". I believe that all functions work correctly when viewing the online list by clicking on "View complete list" (viewonline.php).

I tested this out on my site and here at IM2 by changing the settings for my account and viewing the results through another browser platform which viewed the site from a non-member perspective. It plainly showed me as online within the "Who is Online" block when I set "Show me online" to "Only friends" for my account at PCP-->Profile-->Profile Settings-->Privacy.

[strike]As a side note, and quite possibly a different problem altogether, my installation of IM 1.4 only shows the above setting option under the Privacy section of PCP. I noticed the following additional variables here at IM2:
  • Always show my e-mail address
  • Accept private message
  • Display my web information
  • Display my messengers references
  • Display my personal information
Is this normal, or do I have a problem with my installation?[/strike]

After viewing my settings in ACP, I realised that I had set the above variables as constants by setting "Override user choices" to "Yes" for these options.
Last edited by Dr. Bantham on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Dr. Bantham
Integra Member
Integra Member
 
Posts: 152
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 6:25 pm
Cash on hand: 0.00

Re: [BUG] Hidden Members Visible in "Who is Online"

PostAuthor: Dr. Bantham » Sat Jun 24, 2006 7:09 am

Is this problem unique to me? It appeared not to be the case, since I tested with the same results here at IM2. Not that the edit above was only nullifying the side issue, not the main problem.
Last edited by Dr. Bantham on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Dr. Bantham
Integra Member
Integra Member
 
Posts: 152
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 6:25 pm
Cash on hand: 0.00

PostAuthor: computerskillz » Tue Jun 27, 2006 3:40 am

Let me take a look at the code for you Dr. Bantham. Which block are you using? There are two... online_users and online_users2

Check the block file under block edit and let me know, so I can look at the right code for you.
Last edited by computerskillz on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
testing apostrophe''s in the singature''''s

computerskillz
Members
Members
 
Posts: 45
Likes: 0 post
Liked in: 0 post
Joined: Thu May 18, 2006 1:23 pm
Cash on hand: 0.00

Re: [BUG] Hidden Members Visible in "Who is Online"

PostAuthor: Dr. Bantham » Tue Jun 27, 2006 3:50 am

Mine is set up to use online_users:
Code: Select all
<php>get('jadmin', 200000, 'jadmin');         }         if($jadmin_ary === FALSE)         {             $sql = "SELECT user_id FROM " . JR_ADMIN_TABLE . "                     WHERE user_jr_admin <if>sql_query($sql) )             {                 message_die(GENERAL_ERROR, 'Could not obtain junior admin status', '', __LINE__, __FILE__, $sql);             }               while( $row = $db->sql_fetchrow($result) )             {                 $jadmin_ary[] = $row['user_id'];             }             if($db->sql_fetchrow($result) == 0)             {                 $jadmin_ary[] = -10;             }             if($portal_config['cache_enabled'])             {                 $var_cache->save($jadmin_ary, 'jadmin', 'jadmin');             }         }           $sql = "SELECT u.username, u.user_id, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_ip             FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s             WHERE u.user_id = s.session_user_id                 AND s.session_time >= ".( time() - 300 ) . "             ORDER BY u.username ASC, s.session_ip ASC";         if( !($result = $db->sql_query($sql)) )         {             message_die(GENERAL_ERROR, 'Could not obtain user/online information', '', __LINE__, __FILE__, $sql);         }           $userlist_ary = array();         $userlist_visible = array();           $prev_user_id = 0;         $prev_user_ip = '';           while( $row = $db->sql_fetchrow($result) )         {             // User is logged in and therefor not a guest             if ( $row['session_logged_in'] )             {                 // Skip multiple sessions for one user                 if ( $row['user_id'] != $prev_user_id )                 {                     $style_color = '';                     if ( ($row['user_level'] == ADMIN) && ($row['user_id'] == 2) )                     {                         $row['username'] = '<b>' . $row['username'] . '</b>';                         $style_color = 'foundercolor';                     }                     else if ($row['user_level'] == ADMIN)                     {                         $row['username'] = '<b>' . $row['username'] . '</b>';                         $style_color = 'admincolor';                     }                     else if (is_array($jadmin_ary))                     {                         if (in_array($row['user_id'], $jadmin_ary))                         {                             $row['username'] = '<b>' . $row['username'] . '</b>';                             $style_color = 'jadmincolor';                         }                         else if ($row['user_level'] == MOD)                         {                             $row['username'] = '<b>' . $row['username'] . '</b>';                             $style_color = 'modcolor';                         }else{                             $row['username'] = '<b>' . $row['username'] . '</b>';                             $style_color = 'usercolor';                         }                     }                     else if ($row['user_level'] == MOD)                     {                         $row['username'] = '<b>' . $row['username'] . '</b>';                         $style_color = 'modcolor';                     }else{                         $row['username'] = '<b>' . $row['username'] . '</b>';                         $style_color = 'usercolor';                     }                       /*if ( $row['user_level'] == ADMIN )                     {                         $row['username'] = '<b>' . $row['username'] . '</b>';                         $style_color = 'style="color] . '"';                     }                     else if ( $row['user_level'] == MOD )                     {                         $row['username'] = '<b>' . $row['username'] . '</b>';                         $style_color = 'style="color:#' . $theme['fontcolor2'] . '"';                     }*/                       if ( $row['user_allow_viewonline'] )                     {                         $user_online_link = '<a><span>' . $row['username'] . '</span></a>';                         $logged_visible_online++;                     }                     else                     {                         $user_online_link = '<a><span><i>' . $row['username'] . '</span></i></a>';                         $logged_hidden_online++;                     }                       if ( $row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )                     {                         $online_userlist .= ( $online_userlist != '' ) ? '<br>' . $user_online_link : $user_online_link;                     }                 }                   $prev_user_id = $row['user_id'];             }             else             {                 // Skip multiple sessions for one user                 if ( $row['session_ip'] != $prev_session_ip )                 {                     $guests_online++;                 }             }               $prev_session_ip = $row['session_ip'];         }         $db->sql_freeresult($result);         if ( empty($online_userlist) )         {             $online_userlist = $lang['None'];         }         $online_userlist = $lang['Registered_users'] . ' ' . $online_userlist;           $total_online_users = $logged_visible_online + $logged_hidden_online + $guests_online;           if ( $total_online_users > $board_config['record_online_users'])         {             $board_config['record_online_users'] = $total_online_users;             $board_config['record_online_date'] = time();               $sql = "UPDATE " . CONFIG_TABLE . "                 SET config_value = '$total_online_users'                 WHERE config_name = 'record_online_users'";             if ( !$db->sql_query($sql) )             {                 message_die(GENERAL_ERROR, 'Could not update online user record (nr of users)', '', __LINE__, __FILE__, $sql);             }               $sql = "UPDATE " . CONFIG_TABLE . "                 SET config_value = '" . $board_config['record_online_date'] . "'                 WHERE config_name = 'record_online_date'";             if ( !$db->sql_query($sql) )             {                 message_die(GENERAL_ERROR, 'Could not update online user record (date)', '', __LINE__, __FILE__, $sql);             }         }           if ( $total_online_users == 0 )         {             $l_t_user_s = $lang['Online_users_zero_total'];         }         else if ( $total_online_users == 1 )         {             $l_t_user_s = $lang['Online_user_total'];         }         else         {             $l_t_user_s = $lang['Online_users_total'];         }           if ( $logged_visible_online == 0 )         {             $l_r_user_s = $lang['Reg_users_zero_total'];         }         else if ( $logged_visible_online == 1 )         {             $l_r_user_s = $lang['Reg_user_total'];         }         else         {             $l_r_user_s = $lang['Reg_users_total'];         }           if ( $logged_hidden_online == 0 )         {             $l_h_user_s = $lang['Hidden_users_zero_total'];         }         else if ( $logged_hidden_online == 1 )         {             $l_h_user_s = $lang['Hidden_user_total'];         }         else         {             $l_h_user_s = $lang['Hidden_users_total'];         }           if ( $guests_online == 0 )         {             $l_g_user_s = $lang['Guest_users_zero_total'];         }         else if ( $guests_online == 1 )         {             $l_g_user_s = $lang['Guest_user_total'];         }         else         {             $l_g_user_s = $lang['Guest_users_total'];         }           $l_online_users = sprintf($l_t_user_s, $total_online_users);         $l_online_users .= sprintf($l_r_user_s, $logged_visible_online);         $l_online_users .= sprintf($l_h_user_s, $logged_hidden_online);         $l_online_users .= sprintf($l_g_user_s, $guests_online);           if(!$userdata['session_logged_in'])         {             $chat_link = $lang['Login_to_join_chat'];         }         else         {             $chat_link = "<a>" . $lang['Click_to_join_chat'] . "</a>";         }           require_once( $phpbb_root_path . 'chatspot_front.' . $phpEx );           $template->assign_vars(array(// ******************** BEGIN phpBBChatSpot MOD ********************             'CHATSPOT_IDENTIFICATION' => $lang[ 'ChatSpot_id' ],             'TOTAL_CHATTERS_ONLINE' => sprintf( $lang[ 'How_Many_Chatters' ], $num_users_in_chat ),             'CHATTERS_LIST' => '<b>' . $users_in_chat . '</b>',             'L_CHAT_LINK' => $chat_link,// ********************  END phpBBChatSpot MOD  ********************               'B_L_VIEW' => $lang['View_complete_list'],             'B_TOTAL_USERS_ONLINE' => $l_online_users,             'B_LOGGED_IN_USER_LIST' => $online_userlist,             'B_U_VIEWONLINE' => append_sid('viewonline.'.$phpEx),             'B_RECORD_USERS' => sprintf($lang['Record_online_users'], $board_config['record_online_users'], create_date($board_config['default_dateformat'], $board_config['record_online_date'], $board_config['board_timezone']))                         )         );     }}  $sql = "SELECT u.username, u.user_level, u.user_idFROM ". CONNECTIONS ." c, ". USERS_TABLE ." uWHERE u.user_id = c.useridORDER BY u.username ASC";if ( !($result = $db->sql_query($sql)) ){   message_die(GENERAL_ERROR, 'Could not get user data', '', __LINE__, __FILE__, $sql);}   $chatnums = $db->sql_numrows($result);   $user = array();   while ( $row = $db->sql_fetchrow($result) )   {     $user[] = $row;   }     for($i = 0; $i </b>assign_vars(array(         'B_FLASHCHAT' => "javascriptvoid window.open('http://www.ligotti.net/flashchat/ciadl.php','tloChat','fullscreen,resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no')",         'USERNAMES' => $userlist,         'CHATCOUNT' => sprintf($l_chat_user_s, $chatnums))     );  imp_online_users_block_func();  ?>
Upon testing, it appears that the same problem is occuring here at IM2. Thanks for having a look!
Last edited by Dr. Bantham on Tue Jun 27, 2006 4:33 am, edited 1 time in total.
User avatar
Dr. Bantham
Integra Member
Integra Member
 
Posts: 152
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 6:25 pm
Cash on hand: 0.00

Re: [BUG] Hidden Members Visible in "Who is Online"

PostAuthor: Dr. Bantham » Tue Jun 27, 2006 3:53 am

I don't know why, but the top part of the code is being cut from the post above.
Last edited by Dr. Bantham on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Dr. Bantham
Integra Member
Integra Member
 
Posts: 152
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 6:25 pm
Cash on hand: 0.00

PostAuthor: Adrian Rea » Tue Jun 27, 2006 4:06 am

Dr, can you post the code using the [ code ] bbcode button, not the php button as this is causing the problem.

Thanks

A
Last edited by Adrian Rea on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Adrian Rea
Sr Integra Member
Sr Integra Member
 
Posts: 1263
Likes: 0 post
Liked in: 0 post
Joined: Sun Mar 12, 2006 12:59 am
Cash on hand: 0.00

Re: [BUG] Hidden Members Visible in "Who is Online"

PostAuthor: Dr. Bantham » Tue Jun 27, 2006 4:35 am

Same result. The section of code is also missing when you edit.
Last edited by Dr. Bantham on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Dr. Bantham
Integra Member
Integra Member
 
Posts: 152
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 6:25 pm
Cash on hand: 0.00

PostAuthor: Adrian Rea » Tue Jun 27, 2006 5:28 am

Apologies Dr, I thought it was the php block playing up. This does not look good and I wonder if it is the phpbb update, but I am surprised.

A
Last edited by Adrian Rea on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Adrian Rea
Sr Integra Member
Sr Integra Member
 
Posts: 1263
Likes: 0 post
Liked in: 0 post
Joined: Sun Mar 12, 2006 12:59 am
Cash on hand: 0.00

Re: [BUG] Hidden Members Visible in "Who is Online"

PostAuthor: Teelk » Tue Jun 27, 2006 10:43 pm

Seems the 2.0.20 update has messed posting with php/HTML code. The update to 2.0.21 seems to resolve it, which leads me to believe that's why phpBB has been releasing updates so quickly.
Last edited by Teelk on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Teelk
Dev Team
Dev Team
 
Posts: 1309
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 14, 2006 6:25 pm
Cash on hand: 0.00
Location: Canada


Return to IntegraMOD 140

Who is online

Registered users: App360MonitorBot, Bing [Bot], Google [Bot]