TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 19, 2024, 02:40:49 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,164
  • Total Topics: 21,219
  • Online today: 108
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 86
  • Total: 86

Counting hidden users as guests

Started by jehod, October 28, 2006, 12:36:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jehod


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.