Widget Recent Thread XenPorta 2 Rich Usernames và màu sắc READ/UNREAD

PVS

Super Moderator
Thành viên BQT
Tham gia
28/02/2015
Bài viết
16,829
Được Like
12,687
Widget Recent Thread XenPorta 2 Rich Usernames và màu sắc READ/UNREAD

Nếu bạn muốn block Recent Thread Sidebar Xenporta 2 có Read và Unread với mỗi tiêu đề là một màu sắc khác nhau, cũng như css của tên người dùng, đây là code bạn cần.

Vào EWRwidget_Threads
Và tìm code sau:
Mã:
<xen:foreach loop="$wUncached" value="$thread">
                    <li class="profilePostListItem">
                  
                        <xen:avatar user="$thread" size="s" img="true" />
                      
                        <div class="messageInfo">
                            <div class="messageContent">
                                <a href="{xen:link "threads{xen:if '{$thread.isNew} AND {$thread.haveReadData}', '/unread'}", $thread}"
                                    title="{xen:if '{$thread.isNew} AND {$thread.haveReadData}', {xen:phrase go_to_first_unread_message}}"
                                    class="{xen:if $thread.hasPreview, PreviewTooltip}"
                                    data-previewUrl="{xen:if $thread.hasPreview, {xen:link threads/preview, $thread}}">{xen:helper snippet, $thread.title, 50}</a>
                            </div>
                          
                            <div class="messageMeta muted">
                                <a href="{xen:link members, $thread.lastPostInfo}">{$thread.lastPostInfo.username}</a> :
                                <a href="{xen:link 'posts', $thread.lastPostInfo}" title="{xen:phrase go_to_last_message}" class="dateTime"><xen:datetime time="$thread.lastPostInfo.post_date" /></a>
                            </div>
                        </div>
                    </li>
                </xen:foreach>

Thay đổi thành:
Mã:
<xen:foreach loop="$wUncached" value="$thread">
                    <li class="profilePostListItem">
                  
                        <xen:avatar user="$thread" size="s" img="true" />
                      
                        <div class="messageInfo">
                            <div class="messageContent">
                                <a href="{xen:link "threads{xen:if '{$thread.isNew} AND {$thread.haveReadData}', '/unread'}", $thread}"
                                    title="{xen:if '{$thread.isNew} AND {$thread.haveReadData}', {xen:phrase go_to_first_unread_message}}"
                                    class="{xen:if '{$thread.isNew} AND {$thread.haveReadData}', 'un'}readThreadTitle {xen:if $thread.hasPreview, PreviewTooltip}"
                                    data-previewUrl="{xen:if $thread.hasPreview, {xen:link threads/preview, $thread}}">{xen:helper snippet, $thread.title, 50}</a>
                            </div>
                          
                            <div class="messageMeta muted">
                                <a href="{xen:link members, $thread.lastPostInfo}"><xen:username user="$thread.lastPostInfo" rich="true" /></a> :
                                <a href="{xen:link 'posts', $thread.lastPostInfo}" title="{xen:phrase go_to_last_message}" class="dateTime"><xen:datetime time="$thread.lastPostInfo.post_date" /></a>
                            </div>
                        </div>
                    </li>
                </xen:foreach>

Sau đó đến Extra.css:
Mã:
.readThreadTitle {
      color:(whatever color you want);
}

.unreadThreadTitle {
       color:(whatever color you want);
}

exampleedit.PNG

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


Nguồn: xenforo.com​
 

aiquoc

Gefreiter
Tham gia
29/07/2015
Bài viết
96
Được Like
23
Widget Recent Thread XenPorta 2 Rich Usernames và màu sắc READ/UNREAD

Nếu bạn muốn block Recent Thread Sidebar Xenporta 2 có Read và Unread với mỗi tiêu đề là một màu sắc khác nhau, cũng như css của tên người dùng, đây là code bạn cần.

Vào EWRwidget_Threads
Và tìm code sau:
Mã:
<xen:foreach loop="$wUncached" value="$thread">
                    <li class="profilePostListItem">
                 
                        <xen:avatar user="$thread" size="s" img="true" />
                     
                        <div class="messageInfo">
                            <div class="messageContent">
                                <a href="{xen:link "threads{xen:if '{$thread.isNew} AND {$thread.haveReadData}', '/unread'}", $thread}"
                                    title="{xen:if '{$thread.isNew} AND {$thread.haveReadData}', {xen:phrase go_to_first_unread_message}}"
                                    class="{xen:if $thread.hasPreview, PreviewTooltip}"
                                    data-previewUrl="{xen:if $thread.hasPreview, {xen:link threads/preview, $thread}}">{xen:helper snippet, $thread.title, 50}</a>
                            </div>
                         
                            <div class="messageMeta muted">
                                <a href="{xen:link members, $thread.lastPostInfo}">{$thread.lastPostInfo.username}</a> :
                                <a href="{xen:link 'posts', $thread.lastPostInfo}" title="{xen:phrase go_to_last_message}" class="dateTime"><xen:datetime time="$thread.lastPostInfo.post_date" /></a>
                            </div>
                        </div>
                    </li>
                </xen:foreach>

Thay đổi thành:
Mã:
<xen:foreach loop="$wUncached" value="$thread">
                    <li class="profilePostListItem">
                 
                        <xen:avatar user="$thread" size="s" img="true" />
                     
                        <div class="messageInfo">
                            <div class="messageContent">
                                <a href="{xen:link "threads{xen:if '{$thread.isNew} AND {$thread.haveReadData}', '/unread'}", $thread}"
                                    title="{xen:if '{$thread.isNew} AND {$thread.haveReadData}', {xen:phrase go_to_first_unread_message}}"
                                    class="{xen:if '{$thread.isNew} AND {$thread.haveReadData}', 'un'}readThreadTitle {xen:if $thread.hasPreview, PreviewTooltip}"
                                    data-previewUrl="{xen:if $thread.hasPreview, {xen:link threads/preview, $thread}}">{xen:helper snippet, $thread.title, 50}</a>
                            </div>
                         
                            <div class="messageMeta muted">
                                <a href="{xen:link members, $thread.lastPostInfo}"><xen:username user="$thread.lastPostInfo" rich="true" /></a> :
                                <a href="{xen:link 'posts', $thread.lastPostInfo}" title="{xen:phrase go_to_last_message}" class="dateTime"><xen:datetime time="$thread.lastPostInfo.post_date" /></a>
                            </div>
                        </div>
                    </li>
                </xen:foreach>

Sau đó đến Extra.css:
Mã:
.readThreadTitle {
      color:(whatever color you want);
}

.unreadThreadTitle {
       color:(whatever color you want);
}

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


Nguồn: xenforo.com​
Phần này mình có thể cho hiển thị bên portal không bạn?
 

PVS

Super Moderator
Thành viên BQT
Tham gia
28/02/2015
Bài viết
16,829
Được Like
12,687
portal 1 khác portal 2 nha bạn, nên không thể
 

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