Whish: online overview

  • KlassenClown

    KlassenClown - 2008-03-19


    by using the chat in my phpBB3-bord, a lot of chatrooms are created by the chat
    along all that areas we are using - that's great - we like it.
    What would be also great to have is a simple overview who is on and where.
    We know how to get the info, but it take some klicks and just for one user at the time.
    Our suggest for a further version is an online-list in the right column like that:

    nick1 (room1)
    nick2 (room1)
    nick3 (room5)

    ideal wise the roomname is a seperate link for fast browsing / roomchange ...

    just a suggest.
    Best, KlasenClown

    • Sebastian Tschan

      If I understand you right you would like the online users list display the online users of all channels, not just the current channel.

      It is unlikely that I'll add this for the official version, but the changes on server-side are minimal to achieve something similar to what you want:

      Edit lib/class/CustomAJAXChat.php and override the method getChatViewXMLMessages() from class AJAXChat by adding the following:
          function getChatViewXMLMessages() {
              $xml = '<?xml version="1.0" encoding="UTF-8"?>';
              $xml .= '<root>';
              $xml .= $this->getInfoMessagesXML();
              $xml .= $this->getChatViewOnlineUsersXML($this->getChannels());
              $xml .= $this->getChatViewMessagesXML();
              $xml .= '</root>';       
              return $xml;

      Now you'll have all online users in the list.

      To add the channel name behind the user name would be a bit more complicated, as only the channelID is available for every online user.
      You can see the XML data containing the online user list by adding ?ajax=true to the chat URL.

      As a starting point how to access the channelIDs have a look at the JavaScript method ajaxChat.handleOnlineUsers in js/chat.js - that's where the online user data is processed (currently the channelID is not used).

    • KlassenClown

      KlassenClown - 2008-03-22

      Hi again,

      yes, you understood me in a right way.
      And you are right not to take this in further versions as
      >> Now you'll have all online users in the list. <<
      which is not very usefull of course.

      My first suggest was, hmmm, not really a good one.
      But what about this:

      Just to explain the reason why I am suggesting it:
      In my forum & chat user will be automaticly logged in the chat
      in a certain room by using a link at the top of our board.
      The basic-link is also forwarded to user who are not member of the board
      (and for sure would not be a member of the board / browsergame, ally-board)
      but still will be invitet to our chat sometimes.
      Now the situation: members of our board are in the chat, in a certain room.
      An external guest is logging in, of course in the puplic-room only.
      Nobody is recognizing him as they are chatting in an other room ...
      .. I guess you can imagine now what I mean. ;)
      Maybe it could be another button at bottom right for an other online-list?

      Sorry for long posting ^^ Please do not take me too serious, it's just a suggest ...



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks