Highlighting threads user participated in - Làm nổi bật chủ đề người dùng tham gia

PVS

Super Moderator
Thành viên BQT
Code hoặc hướng dẫn này được sử dụng trên phiên bản Xenforo cũ đã quá hạn sử dụng. Bạn hãy click để tìm bản mới hơn
Highlighting threads user participated in - Làm nổi bật chủ đề người dùng tham gia

Về cơ bản, làm nổi bật mỗi thread người dùng hiện đã đăng với một màu sắc khác nhau và phần còn lại các chủ đề mà người dùng không bao giờ tham gia.

008.png

Để có được điều này bạn cần phải thực hiện những thay đổi ở hai nơi khác nhau:

1) Thêm đoạn sau vào EXTRA.css:
Mã:
.discussionList .memberParticipatedThread {
    background-color: #DCF2D4 !important;
}

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

2) 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}, ' memberParticipatedThread'}" data-author="{$thread.username}">

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


Nguồn: xenforo.com​
 
  • Like
Reactions: THB
Hình mình không rõ nên mình xin phép nghiên cứu rõ hơn xíu nhé:
Tham gia có nghĩa là : Nó sẽ làm nổi bật Thread mà USER created hay Thread USER tương tác (view & like & comment)? moustache~~
 
  • Like
Reactions: PVS
Back
Top