Màu sắc chủ đề khác nhau dựa vào nhóm người dùng khởi tạo chủ đề

PVS

Super Moderator
Thành viên BQT
Tham gia
28/02/2015
Bài viết
16,828
Được Like
12,687
Màu sắc chủ đề khác nhau dựa vào nhóm người dùng khởi tạo chủ đề

Bài viết này sẽ hướng dẫn các bạn cách làm màu sắc các chủ đề khác nhau dựa vào nhóm người dùng khởi tạo chủ đề. Vì vậy, ở đây nó là dành cho hai nhóm người dùng (Staff) và (VIP Member).

Trong EXTRA.css thêm vào:
Mã:
/* USERGROUP THREAD  ENHANCEMENTS*/

.discussionList .staffThreads {
    background-color: #DCF2D4 !important;
}
.discussionList .staffThreads .posterAvatar, .discussionList .staffThreads .stats {
    background-color: #DCF2D4 !important;
}

.discussionList .VIPThreads {
    background-color: #fffccc !important;
}
.discussionList .VIPThreads .posterAvatar, .discussionList .VIPThreads .stats {
    background-color: #fffccc !important;
}

/* USERGROUP THREAD  ENHANCEMENTS*/

"StaffThreads" là chủ đề được tạo ra bởi một thành viên staff.
"VIPThreads" là chủ đề được tạo ra bởi một thành viên trong usergroup VIP.
Bạn có thể điều chỉnh màu sắc theo sở thích của bạn.

Trong template "Thread_List_Item" tìm:
Mã:
<li id="thread-{$thread.thread_id}" class="discussionListItem {$thread.discussion_state}{xen:if '!{$thread.discussion_open}', ' locked'}{xen:if {$thread.sticky}, ' sticky'}{xen:if {$thread.isNew}, ' unread'}{xen:if {$thread.prefix_id}, ' prefix{$thread.prefix_id}'}{xen:if {$thread.isIgnored}, ' ignored'} {xen:if $thread.thread_is_watched, threadWatched} {xen:if $thread.forum_is_watched, forumWatched}" data-author="{$thread.username}">

Thay bằng:
Mã:
<li id="thread-{$thread.thread_id}" class="discussionListItem {$thread.discussion_state}{xen:if '!{$thread.discussion_open}', ' locked'}{xen:if {$thread.sticky}, ' sticky'}{xen:if {$thread.isNew}, ' unread'}{xen:if {$thread.prefix_id}, ' prefix{$thread.prefix_id}'}{xen:if {$thread.isIgnored}, ' ignored'} {xen:if $thread.thread_is_watched, threadWatched} {xen:if $thread.forum_is_watched, forumWatched} {xen:if {$thread.user_post_count}, ' memberPrticipatedThread'} {xen:if '{xen:helper ismemberof, $thread, XXX}', ' staffThreads'} {xen:if '{xen:helper ismemberof, $thread, YYY}', ' VIPThreads'}" data-author="{$thread.username}">

Hãy nhớ thay đổi XXX trong đoạn mã trên với số ID usergroup staff của bạn.
và YYY với số ID usergroup thành viên VIP của bạn.

Bạn dĩ nhiên có thể thêm nhóm người sử dụng nhiều hơn nếu bạn muốn.

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