Hiển Thị Icon Poll, Resource trong threadlist

Kun

LOLLLLLLLLLLL
Tham gia
10/03/2015
Bài viết
136
Được Like
115
2 icon poll, resource sẽ được hiển thị trong danh sách bài viết của thread_list_item

Đầu tiên, bật chế độ DEBUG XENFORO dành cho nhà phát triển
Tạo 1 Template Modifications
Template: thread_list_item
Modification Key: tliicon
Description: Xau Trai Thi Sao =)) ( mún ghi gì thì ghi tùy ý các bạn)
Search Type: Simple Replacement
Find:
Mã:
<xen:hook name="thread_list_item_icon_key" params="{xen:array 'thread={$thread}'}">
Replace:
Mã:
<xen:hook name="thread_list_item_icon_key" params="{xen:array 'thread={$thread}'}">
                <xen:if is="{$xenOptions.plugin_status_icon_1} != 0">
                    <xen:if is="{$thread.discussion_type} == 'poll'"><span class="poll" <xen:if is="!{$xenOptions.title_icon_poll}"><xen:else />title="{$xenOptions.title_icon_poll}"</xen:if>>{$xenOptions.title_icon_poll}</span></xen:if>
                    <xen:if is="{$thread.discussion_type} == 'resource'"><span class="resource" <xen:if is="!{$xenOptions.title_icon_resource}"><xen:else />title="{$xenOptions.title_icon_resource}"</xen:if>>{$xenOptions.title_icon_resource}</span></xen:if>
                    <xen:else />
                </xen:if>
Add-on: XenForo

Xong rồi làm tiếp nè
Tạo 1 Template Modifications
Template: discussion_list.css
Modification Key: tlicss
Description: Xau Trai Thi Sao =)) ( mún ghi gì thì ghi tùy ý các bạn)
Search Type: Simple Replacement
Find:
Mã:
.discussionListItem .iconKey .new       { background-position: -64px -16px; }
Replace:
Mã:
.discussionListItem .iconKey .new       { background-position: -64px -16px; }
         .discussionListItem .iconKey .poll      { background: url('styles/xautrai/poll.png') no-repeat;}
         .discussionListItem .iconKey .resource  { background: url('styles/xautrai/resource.png') no-repeat;}
Add-on: XenForo

DEMO thì không có nha, làm xong tự tận hưởng :D.. Ở không quá mà nên viết TUT, gạch đá xin nhận, sửa lại đường dẫn icon tùy ý bạn

iamoQnj.png
Nu8saFZ.png
 

Nhat Canh

Private
Tham gia
13/12/2015
Bài viết
12
Được Like
2
bạn ơi cho mình hỏi mình muốn tạo hook chỉ hiện thị trên trang chủ không hiển thị trong bài viết với mấy trang khác thì làm thế nào vậy? Tks
 

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

XenForo 1 XenForo 2
Translate by PVS

Dịch vụ XenForo của VNXF

Mobile/Zalo: 0906081284

Telegram: anhanhxf

Chỉ nhận web nội dung lành mạnh

Nhà Tài Trợ

Mút Xốp Không Gian
Mút Sofa Không Gian
Top Bottom