• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • 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.
  • 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

Peggy

Well-known member
#4
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.
 

Brogan

XenForo moderator
Staff member
#5
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.PNG
 

CyberAP

Well-known member
#6
Here is what I've got while playing with CSS :)
example2.PNG
Code:
float: inherit;
font-size: 10px;
margin-left: -5px;

Brogan's version:
example3.PNG

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;
 

Dan

Well-known member
#7
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?
 

Brogan

XenForo moderator
Staff member
#9
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.
 

Dan

Well-known member
#11
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
 

CyberAP

Well-known member
#12
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>
 

Brogan

XenForo moderator
Staff member
#15
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.
 

CyberAP

Well-known member
#17
Another example :)
example4.PNG

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;
        }
 

Nasr

Well-known member
#20
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?