I have a code for the .098 TP Stats Block, and was wondering if anyone knew how to code it for TP 1.0.5??
In the default theme
languages/TPortal.english.php
Find:
$txt['tp-users'] = 'Users';
Add this after:
$txt['tp-hidden'] = 'Hidden';
$txt['tp-buddies'] = 'Buddies';
$txt['tp-spiders'] = 'Spiders';
default/TPortalBlocks.template.php
Find:
echo '<br />'.$bullet.$txt['tp-guests'].': '.$online['guests'];
echo '<br />'.$bullet.$txt['tp-total'].': '.$online['total_users'].'<hr />
Replace with:
echo '<br />'.$bullet.$txt['tp-hidden'].': '.$online['hidden'];
echo '<br />'.$bullet.$txt['tp-buddies'].': '.$online['buddies'];
echo '<br />'.$bullet.$txt['tp-guests'].': '.$online['guests'];
echo '<br />'.$bullet.$txt['tp-spiders'].': '.$online['num_spiders'];
echo '<br />'.$bullet.$txt['tp-total'].': '.$online['total_users'].'<hr />
Hey Smurfy have you seen my modification of this?
http://www.tinyportal.net/index.php/topic,22854.0.html
Also, can you get a screenshot of yours so I can peek at?
Quote from: Lord Anubis on December 20, 2008, 12:39:38 AM
Hey Smurfy have you seen my modification of this?
http://www.tinyportal.net/index.php/topic,22854.0.html
Also, can you get a screenshot of yours so I can peek at?
They look like nice blocks Anubis, but this code modifies the Stats Block that comes with TP, only thing is the new TP doesn't have bullet calls, and uses < li > calls? I tried to reode it to match but I kept screwing up something.
this is what the old tp block looked like when modified -
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.2inchpvc.com%2Fimages%2Fstatsblock.gif&hash=f85daf8ba0e4c289646899121eb9cc491a2103ff)
I want the current version of TP to be able to modified the same way, right now the normal view is like this -
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.2inchpvc.com%2Fimages%2Fstats1.gif&hash=6615f565197805d2b6b38a5d3d5f075aff7e77d0)
I would like it to use the bullets and images, but just can't get the coding right, and to list the different user categories
This is the current code in the TPBlocks.template.php
// add online users
echo '
<h5><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>';
}
:'(
Why not use my modified block...the first one is exactly what you want...and if you use Earcade or Chat you can use the others....
Quote from: Lord Anubis on December 20, 2008, 05:25:10 PM
Why not use my modified block...the first one is exactly what you want...and if you use Earcade or Chat you can use the others....
Your code to FIND is not in the new TP php template, that's why I am looking for someone to write it to match the NEW TP.
Well I finally figured out how to do it!!
In the default theme
languages/TPortal.english.php
Find:
$txt['tp-users'] = 'Users';
Add this after:
$txt['tp-hidden'] = 'Hidden';
$txt['tp-buddies'] = 'Buddies';
$txt['tp-spiders'] = 'Spiders';
default/TPortalBlocks.template.php
Find:
<li>'.$txt['tp-guests'].': '.$online['guests'].'</li>
Replace with:
<li>'.$txt['tp-hidden'].': '.$online['hidden'].'</li>
<li>'.$txt['tp-buddies'].': '.$online['buddies'].'</li>
<li>'.$txt['tp-guests'].': '.$online['guests'].'</li>
<li>'.$txt['tp-spiders'].': '.$online['num_spiders'].'</li>
<li>'.$txt['tp-total'].': '.$online['total_users'].'</li>
;D