• 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

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.
 
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.

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


Brogan's version:
example3.webp

HTML:
<span class="userOnline">
  <span></span>
</span>

Code:
height: 36px;
margin-right: -5px;
margin-top: -70px;
padding-bottom: 1px;
padding-left: 1px;
padding-right: 5px;
padding-top: 1px;
 
I personally would prefer something far more subtle, such as the green dot I proposed a while ago.
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.

View attachment 6157
I was thinking maybe just a small green border around the avatar?
 
I was thinking maybe just a small green border around the avatar?
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.
 
Well as soon as the code is written each person will be able to adapt the css for their own uses.
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.
 
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.
Right ;) Just brainstorming
 
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:

PHP:
<xen:foreach loop="$onlineUsers.records" value="$user">
<xen:avatar user="$user" size="s" img="true" />
</xen:foreach>
 
Kinda don't like how it shows online for everyone regardless of if they are online or not.
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.
 
Another example :)
example4.webp

HTML:
<span class="userOnline">
  <span class="firstSpan"></span>
  <span class="secondSpan"></span>
  Online
</span>

Code:
delete: .userOnline {...} and .userOnline span {...}
add:
    .userOnline
    {
        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;
        }
 
I like it !
example2-png.6158
 
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:

PHP:
<xen:foreach loop="$onlineUsers.records" value="$user">
<xen:avatar user="$user" size="s" img="true" />
</xen:foreach>

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?
 
Back
Top Bottom