Hiển thị thành viên trực tuyến - Show user is online xenforo

Admin

AdminAdmin is verified member.

Well-Known Member
Staff member
Administrator
Classic ribbon
Open 'message_user_online' template and replace the string there with:
Code:
<span class="{$userStatus.class}"><span></span>{$userStatus.text}</span>

Open 'extra.css' and add these lines:
Code:
.UserOnline, .UserOffline, .UserOnlineInvisible
    {
        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;
        display: block;
        float: right;
        position: relative;
        box-shadow: 1px 1px 3px rgba(0,0,0, 0.25);
 
        margin-left: -{xen:calc '@content.padding-right + 5'}px;
    }
 
        .UserOnline span, .UserOffline span, .UserOnlineInvisible span
        {
            background-color: @primaryLight;
            border-top-right-radius: 3px;
            position: absolute;
            top: -4px;
            right: -1px;
            width: 5px;
            height: 4px;
        }

If you don't want to display Offline status then you should also add this:
Code:
.UserOffline {display: none !important;}

====================================================

Long ribbon
Open 'message_user_online' template and replace the string there with:
Code:
<span class="{$userStatus.class}"><span></span>{$userStatus.text}</span>

Open 'extra.css' and add these lines:
Code:
.UserOnline, .UserOffline, .UserOnlineInvisible
    {
        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;
        border: 1px solid @primaryLight;
        border-radius: 3px;
        border-top-right-radius: 0px;
        display: block;
        float: inherit;
        position: relative;
        box-shadow: 1px 1px 3px rgba(0,0,0, 0.25);
    }
 
        .UserOnline span, .UserOffline span, .UserOnlineInvisible span
        {
            background-color: @primaryLight;
            border-top-right-radius: 3px;
            position: absolute;
            top: -4px;
            right: -1px;
            width: 5px;
            height: 4px;
        }

If you don't want to display Offline status then you should also add this:
Code:
.UserOffline {display: none !important;}

====================================================

Covering ribbon
Open 'message_user_online' template and replace the string there with:
Code:
<span class="{$userStatus.class}"><span class="firstSpan"></span><span class="secondSpan"></span>{$userStatus.text}</span>

Open 'extra.css' and add these lines:
Code:
.UserOnline, .UserOffline, .UserOnlineInvisible
{
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;
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, .UserOffline .firstSpan, .UserOnlineInvisible .firstSpan
{
background-color: @primaryLight;
border-top-right-radius: 3px;
position: absolute;
top: -4px;
right: -1px;
width: 4px;
height: 4px;
}
 
.UserOnline .secondSpan, .UserOffline .secondSpan, .UserOnlineInvisible .secondSpan
{
background-color: @primaryLight;
border-top-left-radius: 3px;
position: absolute;
top: -4px;
left: -1px;
width: 4px;
height: 4px;
}

If you don't want to display Offline status then you should also add this:
Code:
.UserOffline {display: none !important;}
 

Facebook Comments

Similar threads

Admin
Replies
0
Views
1K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
3K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
983
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
2K
AdminAdmin is verified member.
Admin
cuongpro9x
Replies
0
Views
1K
cuongpro9xcuongpro9x is verified member.
cuongpro9x
thanhchiit
Replies
5
Views
2K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
2K
AdminAdmin is verified member.
Admin
Admin
Replies
3
Views
3K
Hoichemgio9x
H
Back
Top