TinyPortal

Development => Support => Topic started by: PokerOwnage on April 11, 2006, 10:36:05 PM

Title: Sorted Whos Online Box?
Post by: PokerOwnage on April 11, 2006, 10:36:05 PM
i noticed with mine at least, that the whos online box is listed probably by the order on which they signed in... is there some way to arrnage it so that it sorts by alphabetical oder?

ive been coding html my whole life and just getting into the php revolution so im not quite good enough to do this myself as of now... just a question with that...

also, im trying to combine both the whos online and the whos in chat blocks(flashchat) im thinking if i could just include the whosonline.php or whatever the block is in the flashchat code it would work fine... i have the flash chat one working the way i want.  any suggestions?
Title: Re: Sorted Whos Online Box?
Post by: RoarinRow on May 19, 2006, 09:35:17 PM
I like the idea of adding the flashchat status to the whos online screen.  To me it doesn't have to say what room they are in the flashchat, just that they're in there.

I currently use the flashchat box to tell me who's in what room.  But if they were combined, then I would just disable the flashchat box.

Did you find a fix PokerOwnage?
Title: Re: Sorted Whos Online Box?
Post by: PokerOwnage on May 20, 2006, 03:29:55 AM
here is the problem i am getting...

i...
            include('../../chat/info_embedded.php');
then
            $users = usersinroom($room['id']);

but when i go to the site... i think it is looking in the wrong file for the usersinroom.

QuoteFatal error: Call to undefined function: usersinroom() in /home/pokerown/public_html/smf/Sources/Load.php(1607) : eval()'d code on line 54

and really im not sure what it means :(  HELP!  :)
Title: Re: Sorted Whos Online Box?
Post by: RoarinRow on May 20, 2006, 03:47:50 AM
Quote from: PokerOwnage on May 20, 2006, 03:29:55 AM
here is the problem i am getting...

i...
            include('../../chat/info_embedded.php');
then
            $users = usersinroom($room['id']);

but when i go to the site... i think it is looking in the wrong file for the usersinroom.

QuoteFatal error: Call to undefined function: usersinroom() in /home/pokerown/public_html/smf/Sources/Load.php(1607) : eval()'d code on line 54

and really im not sure what it means :(  HELP!  :)

Not sure what the problem is, but in this part - include('../../chat/info_embedded.php');   is the extra '../' supposed to be there or did you do that yourself?
Title: Re: Sorted Whos Online Box?
Post by: PokerOwnage on May 20, 2006, 04:00:38 AM
my directory is like this...

smf/chat/info_embedded

smf/Themes/default/TPortalBlocks.template.php  (or whatever)

so i thought that was the correct structure for it...

this is my entire snip for the "Onlinebox"...


function TPortal_onlinebox()

{

    global $context, $settings, $options, $txt;


    echo '<span class="smalltext">';

    ssi_logOnline();

    echo '</span><br><br>';

    echo '<span class="smalltext">';

include('../../chat/info_embedded.php');

// $users = usersinroom();

echo ' Users Chatting';
                if ($users)
{
                    foreach( $users as $user )
{
    echo $user['login'];
if ($users != 1)
{
echo ", ";
}
}
}
    echo '</span>';
}


the indented code is mine straight from the info_embedded
Title: Re: Sorted Whos Online Box?
Post by: pheasant_plucker on May 20, 2006, 07:33:37 AM
try simply include('../../chat/info.php'); for the chat section. It will list users online but not rooms that they are in. We run our chat users in a centre block at the top of the forum the block is called "who's in chat" and all the block contains is  include('http://www.rcmf.co.uk/4um/chat/info.php');

Gerry
Title: Re: Sorted Whos Online Box?
Post by: PokerOwnage on May 20, 2006, 05:19:45 PM
lemme try including that in the file instead of the info embeded.

i will update
Title: Re: Sorted Whos Online Box?
Post by: shaun1967 on October 09, 2006, 08:42:51 PM
Quote from: pheasant_plucker on May 20, 2006, 07:33:37 AM
try simply include('../../chat/info.php'); for the chat section. It will list users online but not rooms that they are in. We run our chat users in a centre block at the top of the forum the block is called "who's in chat" and all the block contains is  include('http://www.rcmf.co.uk/4um/chat/info.php');



Gerry

that worked perfect.
cheers