TinyPortal
Development => Support => Topic started by: cepsi on February 04, 2009, 10:51:05 PM
hi, im trying to get a small block that simply shows total users online, without showing any names or guest/user divisions so it would look something like;
Total Users Online: 223
i have tried a php block with the following code but it brings up more than i need.
ssi_whosOnline();
and also tried getting it from an old post on here Users Online (http://www.tinyportal.net/index.php/topic,2958.30.html) but no joy.
The reason being is that i am running out of space on my side panel and have made the stats box collapsable, but would like to show users online at the top on its own. Im no good with php, or much else really :(
ty for any guidance
Link to my site: http://www.thepokerpod.com
SMF version: SMF ver. 1.1.7
TP version: TP ver. 1.0.5
Theme name and version: Dark_4 by Fussilet
Try
$who = ssi_whosOnline('return');
echo $who['total_users'];
that great thx Jeni, it only shows just the number online atm tho ( 25) could you show me how to put the words "Users Online:" in front of it if thats possible please? (sorry i know very very little about php) :(
You might try something like this ...
$who = ssi_whosOnline('return');
echo 'Total Users Online: ', $who['total_users'];
ZarPrime
sweeeet! thats perfect exactly whatt i was after thx very much for your help both :D
Wow JP,....im amazed by you. Its crazy on how you can whip up a code by snappin fingers lol.
You rock!
:2funny: ZarPrime filled it out. But it's really just knowing how to read it the code. Experience. Anybody could do it.
You're too modest Ms. JPD. You're brilliant, and you know it. So does everybody else. ;) :2funny:
ZarPrime