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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,992
  • Total Topics: 21,323
  • Online today: 476
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 200
  • Total: 200

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.

This website is proudly hosted on Crocweb Cloud Website Hosting.