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,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 206
  • Total: 206

Stats Module

Started by Evolution81, October 14, 2008, 08:08:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Evolution81

Having problems trying to get my "Stats Box" right I changed the images to match the forum skin but I can't seem to get it right

Edit: I found a example of what I would like my Stats box to look like http://www.realitysucks.eu  if this helps.

// TPortal stats box
function TPortal_statsbox()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;

echo'
<div class="tp_statsblock">';

if(isset($context['TPortal']['userbox']['stats']))
// members stats
echo '
<h5 class="mlist"><a href="'.$scripturl.'?action=mlist">'.$txt[19].'</a></h5>
<ul>
<li>' .$txt[488].': ' , isset($modSettings['memberCount']) ? $modSettings['memberCount'] : $modSettings['totalMembers'] , '</li>
<li>' .$txt['tp-latest']. ': <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '"><strong>', $modSettings['latestRealName'], '</strong></a></li>
</ul>';
if(isset($context['TPortal']['userbox']['stats_all']))
// more stats
echo '
<h5 class="stats"><a href="'.$scripturl.'?action=stats">'.$txt['tp-stats'].'</a></h5>
<ul>
<li>'. $txt[489].': '.$modSettings['totalMessages']. '</li>
<li>'. $txt[490].': '.$modSettings['totalTopics']. '</li>
<li>' .$txt['tp-mostonline-today'].': '.$modSettings['mostOnlineToday'].'</li>
<li>' .$txt['tp-mostonline'].': '.$modSettings['mostOnline'].'</li>
<li>('.timeformat($modSettings['mostDate']).')</li>
</ul>';

if(isset($context['TPortal']['userbox']['online']))
{
// add online users
echo '
<h5 class="online"><a href="'.$scripturl.'?action=who">'.$txt[158].'</a></h5>
<ul>
<li>';

$online = ssi_whosOnline('array');
echo $txt['tp-users'].': '.$online['num_users']. '
</li>
<li>'.$txt['tp-guests'].': '.$online['guests'].'</li>
<li>'.$txt['tp-total'].': '.$online['total_users'].'</li>
<li style="width: 100%; ' , $online['num_users']>14 ? 'height: 23ex;overflow: auto;' : '' ,'">';

foreach($online['users'] as $user)
{
echo $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo '<br />';
}
echo '
</li>
</ul>';
}
echo '
</div>';
}

G6Cad

If you ask on Dezignerstudio that have made the theme, you will get the best support for it as they know the code in the theme.

Evolution81

Sorry I clarified my Question abit, I said what I was thinking instead of thinking of what I was saying.. Started the topic out all wrong.

G6Cad

Confusing..
What is it that dont work for you ?   Screenshot ? link to your site please

Usually it's just a matter of replacing the images to get a diffrent look, but as you have it described now, "not look right" is not exactly helping us to see what it is not working  ;)

Evolution81

I got it working now. used statsblock function from TP 0.9. per bikken.. It was just for some reason with the newer statsblock function it was not spacing the options out did not show lines the dots and the images were over lapping the titles but all works great now.

This website is proudly hosted on Crocweb Cloud Website Hosting.