Tutorial 2x Status indicator online or offline - Chỉ thị trạng thái online hoặc offline cho XenForo 2

PVS

Super Moderator
Thành viên BQT
Tham gia
28/02/2015
Bài viết
16,728
Được Like
12,680
Status indicator online or offline - Chỉ thị trạng thái online hoặc offline cho XenForo 2

Vào template message_macros tìm:
Mã:
<span class="message-userArrow"></span>

Thêm đoạn code sau vào phía trước:
Mã:
<xf:if is="$user.isOnline()">
    <div class="onlineON">Online</span></div>
<xf:else />
     <div class="offlineOFF">Offline</span></div>
</xf:if>

Sau đó vào template EXTRA.less và thêm đoạn code sau:
Mã:
/*online - offline*/
.onlineON{
    background: #32CD32;
    padding: 5px;
    text-align: center;
    border-radius: 0 0 5px 5px;
    margin-top: 5px;
}

.offlineOFF{
    background: #ff0000;
    padding: 5px;
    text-align: center;
    border-radius: 0 0 5px 5px;
    margin-top: 5px;
}

Screenshot_3.png
Screenshot_4.png

Chúc các bạn thành công.


Nguồn: xenforo.com​
 

Hướng dẫn sử dụng

XenForo 1 XenForo 2
Translate by PVS

Dịch vụ XenForo của VNXF

Mr. Tuấn

Mobile/Zalo: 0988 488 096

Telegram: bluekpro

Email: [email protected]

Nhà Tài Trợ

Mút Xốp Không Gian
pallet Thịnh Phát
Top Bottom