TinyPortal
Development => Feedback => Topic started by: fak3 on June 21, 2009, 12:07:47 AM
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg10.imageshack.us%2Fimg10%2F883%2Fstatsbox.jpg&hash=118b75a8aebef56eb266033335830d27654f42f3)
Hi developers and co., have you ever noticed that font-sizes in TP stats box are different (under Users Online are bigger)? I don't know if it's supposed to be, but the fix is really quick. :)
Just open /Themes/default/TPBlocks.template.php and search for:
if(isset($context['TPortal']['userbox']['online']))
{
// add online users
echo '
<h5 class="online"><a href="'.$scripturl.'?action=who">'.$txt[158].'</a></h5>
<div>';
$online = ssi_whosOnline('array');
echo $txt['tp-users'].': '.$online['num_users']. '<br />
'.$txt['tp-guests'].': '.$online['guests'].'<br />
'.$txt['tp-total'].': '.$online['total_users'].'<br />
<div ' , $online['num_users']>14 ? ' style="height: 23ex; overflow: auto;"' : '' ,'>';
foreach($online['users'] as $user)
{
echo $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo '<br />';
}
echo '
</div></div>';
}
Replace it with:
if(isset($context['TPortal']['userbox']['online']))
{
// add online users
echo '
<h5 class="online"><a href="'.$scripturl.'?action=who">'.$txt[158].'</a></h5>';
$online = ssi_whosOnline('array');
echo '
<ul>
<li>'. $txt['tp-users'].': '.$online['num_users']. '</li>
<li>'. $txt['tp-guests'].': '.$online['guests'].'</li>
<li>'. $txt['tp-total'].': '.$online['total_users'].'</li>
</ul>
<div ' , $online['num_users']>14 ? ' style="height: 23ex; overflow: auto;"' : '' ,'>';
foreach($online['users'] as $user)
{
echo $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo '<br />';
}
echo '
</div>';
}
Hope the code is ok (it's working in my TP website), have fun! ;D
Yes, I know ..that code bit needs some cleaning up. Using a list(which is defined with font-size in tp-style.css already) is way better than just using break tags.
I'll be sure to use this in beta5.