Tutorial 2x Highlighting threads user participated in - Đánh dấu chủ đề đã tham gia cho XenForo 2

PVS

Super Moderator
Thành viên BQT
Tham gia
28/02/2015
Bài viết
16,734
Được Like
12,680
Highlighting threads user participated in - Đánh dấu chủ đề đã tham gia cho XenForo 2

Đây là sửa đổi template được làm cho XF 1 nhưng với những thay đổi cần thiết để tương thích với XF 2.

Về cơ bản, nó làm nổi bật mọi chủ đề người dùng hiện tại đã tham gia (tương tác) thành một màu khác biệt với các chủ đề khác.

Screen Shot 2018-04-19 at 6.50.24 PM.png

Cách làm như sau:

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

2) Tìm trong template thread_list_macros đoạn:
Mã:
<div class="structItem structItem--thread{{ $thread.prefix_id ? ' is-prefix' . $thread.prefix_id : '' }}{{ $thread.isIgnored() ? ' is-ignored' : '' }}{{ ($thread.isUnread() AND !$forceRead) ? ' is-unread' : '' }}{{ $thread.discussion_state == 'moderated' ? ' is-moderated' : '' }}{{ $thread.discussion_state == 'deleted' ? ' is-deleted' : '' }} js-inlineModContainer js-threadListItem-{$thread.thread_id}" data-author="{{ $thread.User.username ?: $thread.username }}">

Thay bằng:
Mã:
<div class="structItem structItem--thread{{ $thread.prefix_id ? ' is-prefix' . $thread.prefix_id : '' }}{{ $thread.isIgnored() ? ' is-ignored' : '' }}{{ ($thread.isUnread() AND !$forceRead) ? ' is-unread' : '' }}{{ $thread.discussion_state == 'moderated' ? ' is-moderated' : '' }}{{ $thread.discussion_state == 'deleted' ? ' is-deleted' : '' }}{{ $thread.getUserPostCount() ? ' memberParticipatedThread' : '' }} js-inlineModContainer js-threadListItem-{$thread.thread_id}" data-author="{{ $thread.User.username ?: $thread.username }}">

Lưu lại là xong.

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