How can I hide the list of online users from public view?

There are currently 1 user and 16 guests online.

Online users
Admin

I want to hide the Online users list.
Is that any way to short the text to "1 user and 16 guests online." to appear on one line at the top?

Comments

Ashford’s picture

I don't use the "Online Users List" feature; however, I have found most of those types of functions are displayed as a Block. You can make a block visible to specific Roles.

admin>site building>blocks

Find the block and click [configure].
Look for "Role Specific Visibility Settings".
Check the boxes.
Scroll down and click the [Save block] button.

droshani’s picture

I wanted to keep the number of people on the site visible to everyone but just hid the the second part which list the names of users online from Public. I does not seams you can do this.

May be next version Drupal 7.x should allow to costumes this further.

Bananoide’s picture

If you want to take out the online users list just block>configure on the block and choose 0 on the field that says "extension of the list"

I have a rather more complex problem in hands. I want users to be able to hide themselfs from that online list but not to remove the list itself.

Anyone knows how to solve this one?

Ashford’s picture

I am using Drupal ver 5 and still consider myself a beginner. Here is what I would try on a test site. Maybe someone more experienced will offer a method to do the same thing without hacking the module's code.

admin/user/profile
Use the Profile module that comes in Core to create a field for "online_list".
Do you wish your UserName to appear on the on-line list when logged in? Yes - No

Add custom lines to the module that generates the online users list.

// Get the preference value
   $val = $profile["Personal Information"]["profile_online_list"]->value;

   If $val == 'yes' {
      // whatever the original module's code is to add the UserName

  }