Hidden users


  -----  
Author Message

Heynow
Member

Sat Jul 02, 2005 7:24 pm   Post subject: Hidden users
Is there any way to stop hidden users from showing in ones buddy list?

btw, great Mod! Very Happy

Thanks!
 

Thoul
Administrator

Sun Jul 03, 2005 1:37 am   Post subject: re: Hidden users
Find this line in page_header.php:

Code:

               if( array_key_exists($row['user_id'], $contact_list->buddy) )


Change it to:

Code:

               if( array_key_exists($row['user_id'], $contact_list->buddy) && ($row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN) )


And that should take care of it. Smile
 

siebenschlaefer
Member

Sun Mar 11, 2007 9:49 am   Post subject:
it works, but i need the same for the online notification of the contact list mod?!
 

siebenschlaefer
Member

Sun Mar 11, 2007 4:06 pm   Post subject: Re: Hidden users
the username links in the online/offline notification window open the profile of the users in this little notification window, is it possible that the window close and the profile of the user open in the main browser window, as the pm popup notification works?
 

siebenschlaefer
Member

Tue Mar 13, 2007 10:28 am   Post subject: Re: Hidden users
no idea?!
 

Thoul
Administrator

Wed Mar 14, 2007 3:20 pm   Post subject: Re: Hidden users
Sorry, I've been very ill lately and didn't have a chance to look at this until now.

The profiles should open in a new, full size browser window. You can find the code that controls this in functions_contact.php, on these lines:

Code:

      if( in_array($val['user_id'], $offline) )
      {
         $offline_names .= ( ($offline_names == '') ? '' : ', ' ) . '<a href="' . append_sid($temp_url, true) . '" target="profile">' . $val['username'] . '</a>';
      }
      elseif( in_array($val['user_id'], $online) )
      {
         $online_names .= ( ($online_names == '') ? '' : ', ' ) . '<a href="' . append_sid($temp_url, true) . '" target="profile">' . $val['username'] . '</a>';
      }


If it's not opening in a new window, your browser may be blocking new windows.

So, change that code above to this:

Code:

      if( in_array($val['user_id'], $offline) )
      {
         $offline_names .= ( ($offline_names == '') ? '' : ', ' ) . '<a href="' . append_sid($temp_url, true) . '" onclick="javascript:jump_profile(\'" . append_sid($temp_url, true) . "\')">' . $val['username'] . '</a>';
      }
      elseif( in_array($val['user_id'], $online) )
      {
         $online_names .= ( ($online_names == '') ? '' : ', ' ) . '<a href="' . append_sid($temp_url, true) . '" onclick="javascript:jump_profile(\'" . append_sid($temp_url, true) . "\')">' . $val['username'] . '</a>';
      }


Then add this to the beginning of alert_popup.tpl:

Code:

<script language="javascript" type="text/javascript">
<!--
function jump_profile(url)
{
   opener.document.location.href = url;
   window.close();
}
//-->
</script>
 

Page 1 of 1
Display posts from previous: