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,970
  • Latest: bynw
Stats
  • Total Posts: 196,055
  • Total Topics: 21,337
  • Online today: 201
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 115
  • Total: 115

Stats block enhanced

Started by neoxes, July 09, 2012, 08:20:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

neoxes

Hi all!
I want to enhance my stats block showing:
- Number of users
- Number of guests
- Number of hidden users
- Number of spiders (if enabled)
- Total users


To achieve this I've edited TPsubs.template.php this way:
Original (start al line 561):
$online = ssi_whosOnline('array');
echo  $bullet. $txt['tp-users'].': '.$online['num_users']. '<br />
'. $bullet. $txt['tp-guests'].': '.$online['guests'].'<br />
'. $bullet. $txt['tp-total'].': '.$online['total_users'].'<br />
<div style="max-height: 23em; overflow: auto;">';


Modified:
$online = ssi_whosOnline('array');
echo  $bullet. $txt['tp-users'].': '.$online['num_users']. '<br />
'. $bullet. $txt['tp-guests'].': '.$online['guests'].'<br />
'. $bullet. $txt['tp-hidden'].': '.$online['num_users_hidden'].'<br />';
if (!empty($modSettings['show_spider_online']) && ($modSettings['show_spider_online'] < 3 || allowedTo('admin_forum')))
echo  $bullet. $txt['tp-spiders'].': '.$online['num_spiders'].'<br />';
echo  $bullet. $txt['tp-total'].': '.$online['total_users'].'<br />
<div style="max-height: 23em; overflow: auto;">';


I'm not a coder, but it works... Can you tell me if it's correct or absolutely wrong? Thak you!

IchBin


This website is proudly hosted on Crocweb Cloud Website Hosting.