Could someone pls tell me the code for showing users online, without showing the whole stats box?
create a php block and use ssi function
ssi_whosOnline()
Fel
I've been trying that but just get an empty box.
I chhose PHP box and enter exactly what u said.
try it like this in php box ssi_whosOnline();
yes thank you that worked! :)
spend crip many, many ";" for all I forgott :2funny:
lol
by the way is there a way to make the font smaller within this box?
Quote from: haktanir on February 21, 2006, 10:25:03 AM
lol
by the way is there a way to make the font smaller within this box?
not sure, i think it goes along with whatever your Theme font size is..?
yup it goes with standard font size
I was hoping og having the names smaller like in the default stats box
try this in your box:
echo '<span class="smalltext">';
ssi_whosOnline();
echo '</span>';
Fel
Excellent! Thank you very much. :)
Quote from: feline on February 21, 2006, 10:49:29 AM
try this in your box:
echo '<span class="smalltext">';
ssi_whosOnline();
echo '</span>';
Fel
I really like this code Fel. How do you make it so that you can click on the first line that tells you the number of Guests and Users, that it brings you to the '?action=who' screen. That would save me a couple of clicks. ;)
Quote from: RoarinRow on May 20, 2006, 04:20:01 PM
Quote from: feline on February 21, 2006, 10:49:29 AM
try this in your box:
echo '<span class="smalltext">';
ssi_whosOnline();
echo '</span>';
Fel
I really like this code Fel. How do you make it so that you can click on the first line that tells you the number of Guests and Users, that it brings you to the '?action=who' screen. That would save me a couple of clicks. ;)
Bump. Anyone? :uglystupid2:
thanks
In the next release of TP it will be there in the Stats block (I hope) as it is on here
The specific code line you want is
<a href="'.$scripturl.'?action=who"><b>'.$txt[158].'</b></a>
Quote from: nokonium on June 20, 2006, 07:16:10 AM
In the next release of TP it will be there in the Stats block (I hope) as it is on here
The specific code line you want is
<a href="'.$scripturl.'?action=who"><b>'.$txt[158].'</b></a>
How would you combine the two with what you have and
ssi_whosOnline();
like this...
echo '<a href="'.$scripturl.'?action=who"><b>'.$txt[158].'</b></a><br>
<span class="smalltext">';
ssi_whosOnline();
echo '</span>';
Quote from: akulion on August 30, 2006, 06:22:38 PM
like this...
echo '<a href="'.$scripturl.'?action=who"><b>'.$txt[158].'</b></a><br>
<span class="smalltext">';
ssi_whosOnline();
echo '</span>';
Awesome!! thank you! :up:
ur welcome
Quote from: akulion on August 30, 2006, 06:22:38 PM
like this...
echo '<a href="'.$scripturl.'?action=who"><b>'.$txt[158].'</b></a><br>
<span class="smalltext">';
ssi_whosOnline();
echo '</span>';
Could this be done using the icon as well, how would that be coded?
If you want the image to be part of the link:
echo '<a href="'.$scripturl.'?action=who"><img src="'.$settings['actual_images_url'].'/icons/online.gif'.'" /> <b>'.$txt[158].'</b></a><br>
<span class="smalltext">';
ssi_whosOnline();
echo '</span>';
Otherwise:
echo '<img src="'.$settings['actual_images_url'].'/icons/online.gif'.'" /> <a href="'.$scripturl.'?action=who"><b>'.$txt[158].'</b></a><br>
<span class="smalltext">';
ssi_whosOnline();
echo '</span>';
Great thank you so much
Can you make it show in a list, like it does in the TP block?
u mean scroll?
No, in the TP Stats Block, it has:
Users online
user one
user two
user there
and so on
That's a function of the SSI.php code. You would have to change the function there.
ok thanks
Going to try this one. ;D
I'd be interested in a snippet that will show you the Avatar (as a link to the user's profile) and the user name to the avatar's right. =D thank you!
Quote from: mcardo99 on December 21, 2008, 08:27:29 AM
I'd be interested in a snippet that will show you the Avatar (as a link to the user's profile) and the user name to the avatar's right. =D thank you!
mcardo,
How about user name below the avatar? Have a look at my site. I have 2 blocks setup that show the avatar as a link with name below, one near the top of the front page (users online for the last 60 minutes) and one at the bottom of the front page (users online in the last 24 hours). If you want to see how it looks, my page is at http://forum.talesofthehavenexpanse.com
If this is what you want, this is a block code snippet done recently by Ichbin. You can find it here ---> http://www.tinyportal.net/index.php/topic,27231.msg216822.html#msg216822
Suggest you read the whole thread. ;D
ZarPrime
Thank you so much!!! =)
it pisses me of that when i use this code shows other stuff like how many are guests and buddies
is there any way i can just show ONLINE members?
There are a few of the online members ones. I have a couple of them that show avatars and member name of members online. What exactly are you looking for? Just names?
name and avatar
with option of scrolling or not
--
and a way to show avatars on buddy list
i'm using this code:
Quote
global $scripturl, $db_prefix, $user_info, $txt;
echo '<center><img src="URL-OF-FORUM/TITTLE-IMAGE.png" border="0" /><p>';
// Load the users online right now.
$result = db_query("
SELECT
lo.ID_MEMBER, lo.logTime, mem.realName, mem.memberName, mem.showOnline,
mg.onlineColor, mg.ID_GROUP
FROM {$db_prefix}log_online AS lo
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = lo.ID_MEMBER)
LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP))", __FILE__, __LINE__);
$return['users'] = array();
$return['buddies'] = 0;
$show_buddies = !empty($user_info['buddies']);
while ($row = mysql_fetch_assoc($result))
{
if (in_array($row['ID_MEMBER'], $user_info['buddies']) && (!empty($row['showOnline']) || allowedTo('moderate_forum')))
{
$return['buddies']++;
// Some basic color coding...
if (!empty($row['onlineColor']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" style="color: ' . $row['onlineColor'] . ';">' . $row['realName'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>';
$return['users'][$row['logTime'] . $row['memberName']] = array(
'id' => $row['ID_MEMBER'],
'username' => $row['memberName'],
'name' => $row['realName'],
'group' => $row['ID_GROUP'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => $link,
'hidden' => empty($row['showOnline']),
'is_last' => false,
);
}
}
mysql_free_result($result);
if (!empty($return['users']))
{
krsort($return['users']);
$userlist = array_keys($return['users']);
$return['users'][$userlist[count($userlist) - 1]]['is_last'] = true;
foreach ($return['users'] as $user)
echo $user['hidden'] ? '' . $user['link'] . '' : $user['link'], $user['is_last'] ? '' : ', ';
}
else
echo '<span class="smalltext" >None of your friends are online.</span>';
echo '
<p><li><a href="http://URL-OF-FORUM/index.php?action=profile;sa=editBuddies" ><span class="smalltext" >Edit buddies</span></a></li><li><a href="http://URL-OF-FORUM/index.php?action=mlist;sa=search" ><span class="smalltext" >Find your buddies</span></a></li>
';
echo '<img src="http://URL-OF-FORUM/TITTLE-IMAGE.png" border="0" /><p>';
ssi_whosOnline();
echo '</center>';
i'm using smf 1.1.11 and tp 1.0 beta 4
http://www.tinyportal.net/index.php?topic=31671.0
http://www.tinyportal.net/index.php?topic=31672.0
Quote from: IchBinâ„¢ on May 28, 2010, 04:24:46 PM
http://www.tinyportal.net/index.php?topic=31671.0
http://www.tinyportal.net/index.php?topic=31672.0
how about one of those but to show buddies online..? (with avatar)
thanks for the links ; )
You should put a request in the requests board if you're looking for something specific.
cool, thanks tho.