TinyPortal

Development => Support => Older SMF versions => Topic started by: jehod on October 28, 2006, 12:36:18 AM

Title: Counting hidden users as guests
Post by: jehod on October 28, 2006, 12:36:18 AM

A while back I modified my forum template to take hidden users and make them count as guests. Now that I have TP installed, this feature doesn't work anymore. I was wondering how I can accomplish it.

It's been a while since I did it and I had to do a lot of searching at the SMF forums since I don't know php really, but I believe the code I used in BoardIndex.template.php (above // "Users online" - in order of activity.):

    //Count any hidden users as guests.
   $context['num_guests'] = $context['num_guests'] + $context['num_users_hidden'];
   $context['num_users_online'] = $context['num_users_online'] - $context['num_users_hidden'];
   $context['num_users_hidden'] = 0;


How can I get the same result in the users online box? At the moment, if there is 5 users online and 0 guests, and one is hidden it would show as 5 total with 4 users shown. Thanks for any help.