1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
    Dismiss Notice
  3. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Show user is online

Discussion in 'Template Modifications [Archive]' started by CyberAP, Nov 20, 2010.

  1. CyberAP

    CyberAP Well-Known Member

    Choose the style you want and you're ready to go!

    What you need to do:
    1. Download User Online Indicator
    2. Download instructions.txt
    3. Open Instructions.txt and follow them!
    Thanks to Arik for making this hack!

    Attached Files:

    emngoc, secrectvnn, KC2T and 54 others like this.
  2. Sir nick

    Sir nick Well-Known Member

    Like how it uses the ribbon used in new posts :)
  3. ArnyVee

    ArnyVee Well-Known Member

    Kinda cool way to show the user being online. Hope you find someone to help you code this :D
  4. Peggy

    Peggy Well-Known Member

    It's "ok". Perhaps if it was smaller...
    Otherwise, if there must be something on the postbit, the green dot or simply Status: Online beneath the usertitle would be better imo.
  5. Brogan

    Brogan XenForo Moderator Staff Member

    I personally would prefer something far more subtle, such as the green dot I proposed a while ago.
    That's easily done using css though.

    However, here's an alternative location for the ribbon which doesn't require any additional space and doesn't overlap the avatar, user name or title.

    Rob Fritz, M@rc, Shelley and 3 others like this.
  6. CyberAP

    CyberAP Well-Known Member

    Here is what I've got while playing with CSS :)
    float: inherit;
    font-size: 10px;
    margin-left: -5px;

    Brogan's version:

    <span class="userOnline">
    height: 36px;
    margin-right: -5px;
    margin-top: -70px;
    padding-bottom: 1px;
    padding-left: 1px;
    padding-right: 5px;
    padding-top: 1px;
    Lilybet, Michael Dance and arabic like this.
  7. Dan

    Dan Well-Known Member

    I was thinking maybe just a small green border around the avatar?
  8. Floris

    Floris Guest

    Looks great :)
  9. Brogan

    Brogan XenForo Moderator Staff Member

    Well as soon as the code is written each person will be able to adapt the css for their own uses.

    The relevant code is in sidebar_online_users so it's just a matter of adapting that and adding it to the thread_view or message_user_info template.
  10. CyberAP

    CyberAP Well-Known Member

    Yes, we're waiting for the code. Unfortunately I'm not a coder, so I have no idea at the moment how to detect for each user if he/she is online.
  11. Dan

    Dan Well-Known Member

    Right ;) Just brainstorming
  12. CyberAP

    CyberAP Well-Known Member

    XenForo have a variable called $onlineUsers, so what we need is to make an <xen:if> or <xen:foreach> for this label. (We don't have a manual so I don't really know the right syntax of xenforo system)
    I've found an example in online_list template:

    <xen:foreach loop="$onlineUsers.records" value="$user">
    xen:avatar user="$usersize="s" img="true" />
  13. whitetigergrowl

    whitetigergrowl Active Member

    Kinda don't like how it shows online for everyone regardless of if they are online or not.
  14. Dan

    Dan Well-Known Member

    We/They are still working on the code to call on online users. This is just the design element, not the function.
  15. Brogan

    Brogan XenForo Moderator Staff Member

    How do you mean?

    Currently there is no indicator in the message template so you have no idea if the member is online or offline.

    This add-on will add an indicator for those members who are online and don't have their status set to hidden.
  16. Mikey

    Mikey Well-Known Member

    thats because this is not complete, see cyberap's post above
  17. CyberAP

    CyberAP Well-Known Member

    Another example :)

    <span class="userOnline">
      <span class="firstSpan"></span>
      <span class="secondSpan"></span>
    delete: .userOnline {...} and .userOnline span {...}
            font-weight: bold;
            font-size: 10px;
            color: @contentBackground;
            background: @primaryLight url('@imagePath/xenforo/gradients/category-23px-light.png') repeat-x top;
            padding: 1px 5px;
            margin: -5px -5px 5px -5px;
            border: 1px solid @primaryLight;
            border-radius: 3px;
            border-top-right-radius: 0px;
            border-top-left-radius: 0px;
            display: block;
            float: inherit;
            position: relative;
            box-shadow: 0px 1px 3px rgba(0,0,0, 0.25);
            .userOnline .firstSpan
                background-color: @primaryLight;
                border-top-right-radius: 3px;
                position: absolute;
                top: -4px;
                right: -1px;
                width: 5px;
                height: 4px;
            .userOnline .secondSpan
                background-color: @primaryLight;
                border-top-left-radius: 3px;
                position: absolute;
                top: -4px;
                left: -1px;
                width: 5px;
                height: 4px;
    Lilybet likes this.
  18. Allan

    Allan Well-Known Member

    I like it !
  19. CFodder

    CFodder Well-Known Member

    Nice, just tweaked ours so it appears 'in' the avatar. Now if we could get the code to detect if someone's online then that'd be brillant :)

    kankan and Lilybet like this.
  20. Nasr

    Nasr Well-Known Member

    I was thinking of that as well and maybe somehow compare who's online to post user id and if a match is found show the online status?

Share This Page