Friday, June 8, 2012

Tùy Chỉnh Last Post trên forumhome

Friday, June 8, 2012

Bài trước mình có hướng dẫn cách xóa phần thống kê bài viết và chủ đề trên forumhome và tùy chỉnh lại CSS. Bài này mình tiếp tục hướng dẫn cách thức tùy chỉnh phần "Last post" trên forumhome.

Demo hình ảnh.


Phần title mình sẽ hướng dẫn sau. Bây giờ mình sẽ hướng dẫn cách xóa chức năng đến bài viết cuối cùng của topic (khu vực khoanh vùng màu xanh). Vào forumhome_lastpostby tìm và xóa code sau.
<a href="{vb:link thread, {vb:raw threadinfo}, {vb:raw pageinfo_lastpost}}#post{vb:raw lastpostinfo.lastpostid}"><img src="{vb:stylevar imgdir_button}/lastpost-{vb:stylevar right}.png" alt="{vb:rawphrase go_to_last_post}" /></a>
Tiếp đến là xóa phần lastpost by (phần khoanh vùng màu nâu). Tìm và xóa đoạn code sau.
<div class="lastpostby">
    <vb:if condition="$lastpostinfo['lastposterid']">
        {vb:rawphrase by_x_memberaction, {vb:raw memberaction_dropdown}}
    <vb:else />
        {vb:rawphrase by_x_guest, {vb:raw lastpostinfo.lastposter}}
    </vb:if>
    </div>
Và bây giờ xóa ngày, giờ của bài viết cuối. Tìm và xóa code sau.
<p class="lastpostdate">{vb:raw lastpostinfo.lastpostdate}<vb:if condition="!$show['detailedtime']">, <span class="time">{vb:raw lastpostinfo.lastposttime}</span></vb:if></p>
<vb:else />
    <span class="lastpostdate">{vb:raw lastpostinfo.lastpostdate} <vb:if condition="!$show['detailedtime']"><span class="time">{vb:raw lastpostinfo.lastposttime}</span></vb:if></span>
    <a href="{vb:link thread, {vb:raw threadinfo}, {vb:raw pageinfo_lastpost}}#post{vb:raw lastpostinfo.lastpostid}"><img src="{vb:stylevar imgdir_button}/lastpost-{vb:stylevar right}.png" alt="{vb:rawphrase go_to_last_post}" /></a>
Sau khi xóa toàn bộ các code trên thì phần "last post" chỉ còn lại mỗi tiêu đề bài viết cuối. Trong quá trình làm vbb mình phát hiện là nếu chủ đề nào có "prefix" (tiền tố bài viết) thì nó sẽ hiển thị ra ngoài forumhome. Nếu bạn muốn xóa phần này thì tìm code sau và xóa nó.
<vb:if condition="$lastpostinfo['prefix']">{vb:raw lastpostinfo.prefix}</vb:if>
Tùy chỉnh giới hạn ký tự trong bài viết cuối cùng. Vào Settings - Options - Forum Listings Display Options - Last Thread Title Maximum Displayed Characters, và giới hạn số kí tự tên của last post trên forumhom.

Tin liên quan
XEM TRÊN MOBILE

1 comment:

  1. Đối với mod Last Post Info Enhancements
    Vào vsa_lastpostsinfo_bit để chỉnh code.

    ReplyDelete