Can I hide the Who\'s Online list?

Started by Lillian, September 04, 2008, 08:48:08 PM

Previous topic - Next topic

Lillian

Can I hide it only from guests?

That is, can I change some setting so that my members can use the Who's Online list, but guests viewing the forum from the outside cannot see the names listed?

Thanks :)

ccbtimewiz

Open BoardIndex.template.php

Find:
// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
if (!empty($context['users_online']))
echo '
', $txt[140], ':<br />', implode(', ', $context['list_users_online']);


Replace with:
// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
if( (!empty($context['users_online'])) && ($context['user']['is_logged']) )
echo '
', $txt[140], ':<br />', implode(', ', $context['list_users_online']);


Lillian

Okay, but don't laugh at me ... where do I find this boardindex template thingy you speak of?

ccbtimewiz

BoardIndex.template.php is the template file that controls that section of your board.

To access this file, you need to download it from your server using an FTP connection.

Refer to: How do I use FTP? / What is FTP?

The file location is found in ./Themes/{theme name}/BoardIndex.template.php

However if that file doesn't exist in your custom theme's folder, then look in:

./Themes/default/BoardIndex.template.php

Lillian


Advertisement: