1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

The Staff Online Now Block

Discussion in 'XenForo Pre-Sales Questions' started by Brandon_R, Jul 31, 2010.

  1. Brandon_R

    Brandon_R Guest

    Is that statically coded in there or is it a *widget*. Also what about the online block. Can we add out or blocks?
     
  2. Erik

    Erik Well-Known Member

    I would think it's just part of the template that you can edit in or out. It would be cool if they had a 'block' system though, for adding little widgets or something. :)
     
    AlexandrosD likes this.
  3. Eric J.

    Eric J. Well-Known Member

    Looks like it's just hard-coded in right there. I'm sure you can add your own blocks, probably just a little HTML to copy+paste.
     
  4. Floris

    Floris Guest

    How does it look with 4 admins, 12 super mods and 24 moderators?
     
    Eriksrocks likes this.
  5. Mike

    Mike XenForo Developer Staff Member

    Probably very tall. :)

    Could probably just do with a max-height and an overflow in that case, or displaying only the top 5 - 10.
     
    AlexandrosD likes this.
  6. Brandon_R

    Brandon_R Guest

    How about the first 3 moderators and the "and 10 more" thing. I think that should be used wherever "unlimited" members,topics,items/nodes are displayed to keep things in order.

    First 50 online members and "x" more
    First Y new discussions and "x" more
    First Y new topics and "x" more

    I love how these guys are taking successful ideas from social networking sites and using them here.
     
  7. Erik

    Erik Well-Known Member

    What about Admins? IMO they should take precedence over moderators...

    Mike, were you thinking overflow:hidden or overflow:auto (scroll)? If you do overflow:hidden you have to make sure max-height is a multiple of the height of one row, so it doesn't cut somebody off in the middle. ;)

    Although it would probably be easier just to LIMIT the SELECT query. :)
     
  8. Brandon_R

    Brandon_R Guest

    Well yeah, when i say moderators i mean admins, mods, super mods etc.
     
  9. Floris

    Floris Guest

    It is the reality of a lot of sites.
     
  10. Ianto

    Ianto Member

    Yeah, our site has 8 admins and over 40 mods, that box would get ridiculously massive.
     
  11. Shamil

    Shamil Well-Known Member

    Maybe it could be configured as to only show the admins online?
     
  12. Kier

    Kier XenForo Developer Staff Member

    HTML:
    <xen:if hascontent="true">
        <div class="section staffOnline avatarList">
            <div class="secondaryContent">
                <h3>Staff Online Now</h3>
                <ul>
                    <xen:contentcheck>
                        <xen:foreach loop="$onlineUsers.records" value="$user">
                            <xen:if is="{$user.is_moderator} OR {$user.is_admin}">
                                <li>
                                    <xen:avatar user="$user" size="s" img="true" />
                                    <a href="{xen:link members, $user}" class="username">{$user.username}</a>
                                    <div class="muted">{xen:helper userTitle, $user}</div>
                                </li>
                            </xen:if>
                        </xen:foreach>
                    </xen:contentcheck>
                </ul>
            </div>
        </div>
    </xen:if>
    A first glimpse of XenForo template syntax for you...
     
    Dan, Rene, Ryzie and 6 others like this.
  13. Brandon_R

    Brandon_R Guest

    Nice, so it's like a static html block.
     
  14. John

    John Well-Known Member

    ^^ this opens up all kind of possibilities...brilliant!
     
  15. Cam2

    Cam2 Member

    Random 3 and link to staff page?????
     
  16. Floris

    Floris Guest

    I rather have accurate data, and not turn it in to say 'Some staff online', because people might be looking at who's online; which posts on xf don't indicate.
     
  17. Cam2

    Cam2 Member

    Good point!
     
  18. Forsaken

    Forsaken Well-Known Member

    Wouldn't it be possible to use 'pages' to display further staff, and to include a more link if there are more then 3 or 5 users online?

    People that are actually interested in seeing more staff will click to to the page, and those that aren't will ignore it, and it'll take up little space.
     
  19. Floris

    Floris Guest

    I believe so, you can make an 'online' page, and have a page node called 'online team members'.
     
  20. Sir nick

    Sir nick Well-Known Member

    An idea would maybe be to show only admins. Then maybe using Jquery; View More, It loads more of the staff team.
     

Share This Page