• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Firstpost postbit display in thread

Admin

Well-Known Member
Staff member
Administrator
Bài viết sẽ hướng dẫn các bạn cách làm hiển thị bài viết đầu tiên dạng nằm ngang, các reply sẽ hiển thị theo kiểu mặc định.

1. Mở template EXTRA.css thêm đoạn code sau:
Code:
/*Display Postbit in first post*/.firstPost .messageUserInfo {
    float: none;
}
.firstPost .messageUserInfo .messageUserBlock .arrow {
    display: none;
}
.firstPost .messageInfo {
    margin-left: 5px !important;
    margin-top: 10px;
}
.newIndicator {
    display: none !important;
}
.firstPost .messageUserInfo {
    width: 100% !important;
}
.firstPost .messageUserInfo .messageUserBlock .arrow {
    display: none;
}
.firstPost .messageUserBlock {
    -moz-border-bottom-colors: none !important;
    -moz-border-image: none !important;
    -moz-border-left-colors: none !important;
    -moz-border-right-colors: none !important;
    -moz-border-top-colors: none !important;
    background: none repeat scroll 0 0 transparent !important;
    border-color: -moz-use-text-color -moz-use-text-color #CDE5F0 !important;
    border-style: none none dashed !important;
    border-width: 0 0 1px !important;
    height: 64px;
}
.firstPost .avatar .img {
    margin-left: 0 !important;
}
.firstPost .avatarHolder {
    padding: 0 !important;
    position: absolute !important;
}
.firstPost .userText {
    margin-left: 58px;
    position: absolute !important;
    top: 18px;
}
.firstPost .tt_share_page {
    margin-left: 220px;
    position: absolute;
    top: 34px;
    width: 420px;
}
.firstPost .shareControl {
    float: right;
}
.firstPost .addthis {
    padding-left: 20px;
}
.titleBar h1 {
    font-size: 20pt !important;
}

2. Tạo template mới với tên message_user_info_firstpost

Code:
<xen:require css="message_user_info.css" /> 
<div class="messageUserInfo" itemscope="itemscope" itemtype="http://data-vocabulary.org/Person"> 
<div class="messageUserBlock">
    <xen:hook name="message_user_info_avatar" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
                <div class="avatarHolder">
            <span class="helper"></span>
                        <xen:avatar user="$user" size="s"/>
            <!-- slot: message_user_info_avatar -->
        </div>
    </xen:hook>
 
<xen:if is="!{$isQuickReply}">
    <xen:hook name="message_user_info_text" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
        <h3 class="userText">
            <xen:username user="$user" itemprop="name" rich="true" />
            <xen:if hascontent="true"><em class="userTitle" itemprop="title"><xen:contentcheck>{xen:helper userTitle, $user}</xen:contentcheck></em></xen:if>
            <!-- slot: message_user_info_text -->
        </h3>
    </xen:hook>
     
</xen:if>
<span class="tt_share_page">
      <div class="facebookLike shareControl">
            <fb:like href="{$url}" layout="button_count" action="{$xenOptions.facebookLikeAction}" font="trebuchet ms" colorscheme="@fbColorScheme"></fb:like>
      </div>
      <div class="plusone shareControl">
        <div class="g-plusone" data-size="medium" data-count="true" data-href="{$url}">
      </div>
      <div class="tweet shareControl">
            <a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal"
        data-lang="{xen:helper twitterLang, $visitorLanguage.language_code}"
        data-url="{$url}"
        {xen:if {$xenOptions.tweet.via}, 'data-via="{$xenOptions.tweet.via}"'}
        {xen:if {$xenOptions.tweet.related}, 'data-related="{$xenOptions.tweet.related}"'}>{xen:phrase tweet}</a>
      </div>
</span> 
    <span class="arrow"><span></span></span>
</div>
</div>

3. Mở template message tìm đoạn code sau:
Code:
<li id="{$messageId}" class="message {xen:if $message.isDeleted, 'deleted'} {xen:if '{$message.is_admin} OR {$message.is_moderator}', 'staff'} {xen:if $message.isIgnored, ignored}" data-author="{$message.username}">    <xen:include template="message_user_info">
        <xen:map from="$message" to="$user" />
    </xen:include>

Thay bằng:
Code:
<xen:if is="{$post.position} == 0 AND !{$message.conversation_id}"><li id="{$messageId}" class="message firstPost {xen:if $message.isDeleted, 'deleted'} {xen:if '{$message.is_admin} OR {$message.is_moderator}', 'staff'} {xen:if $message.isIgnored, ignored}" data-author="{$message.username}">
    <xen:include template="message_user_info_firstpost">
        <xen:map from="$message" to="$user" />
    </xen:include>
<xen:else />
<li id="{$messageId}" class="message {xen:if $message.isDeleted, 'deleted'} {xen:if '{$message.is_admin} OR {$message.is_moderator}', 'staff'} {xen:if $message.isIgnored, ignored}" data-author="{$message.username}">
    <xen:include template="message_user_info">
        <xen:map from="$message" to="$user" />
    </xen:include>

</xen:if>

 

Facebook Comments

Similar threads
Thread starter Title Forum Replies Date
Admin DRC - User must verify their site (prevent spam links in postbit & profiles) Vbb tutorial 0
Admin Yilmaz - Horizontal Postbit vB5 Add-ons 0
Admin Yilmaz - Postbit Background Usergroups vBulletin 5.x Add-ons 0
Admin Yilmaz - Easy Postbit User Information Settings vBulletin 3.8.x Add-ons 0
Admin Auto-Postbit Selector for Mobile Browsers vBulletin 4.x Vbulletin 0
Admin Cel Display Usergroups on Member Profile or in Postbit Add-ons 0
Admin [OzzModz] Add As Friend In Postbit Add-ons 0
Admin [ozzy47] Ignore User In Postbit Dropdown Menu Add-ons 1
Admin [ozzy47] Postbit Background For Specific Users Vbb tutorial 0
Admin [DBTech] Original Poster In Postbit v1 (vB4) Add-ons 0
Admin Gender icon beside nickname in Postbit Vbulletin 0
Admin How to reduce space in postbit Vbb tutorial 0
Admin [vB5] User Profile Fields in the postbit templates Vbb tutorial 0
Admin Postbit legacy Add-ons 0
Admin Yilmaz - Postbit Font Size Add-ons 0
Admin Thread Starter Image in Postbit for OP Add-ons 0
djdungcuty Hướng dẫn làm đẹp postbit cho JohnCMS Johncms 1
H Xin Câu xin admin edit giup em cai code postbit nay Vbulletin 0
Admin Postbit thet looks like the postbit on vBulletin 5 (legacy only) Add-ons 0
T Hướng dẫn Edit User link in postbit UserName popup menu Vbulletin 0
K "[AJAX] Post Thank You Hack 7.83" và cách đóng khung cho Mod trong Postbit Add-ons 0
Admin Hướng dẫn chuyển postbit_legacy thành postbit cho xenforo Xenforo 0
Admin Horizontal Postbit for vbb5 Add-ons 0
Admin Postbit Social Network Icons Vbulletin 0
Admin Edit User link in postbit UserName popup menu Add-ons 0
Z Help Cần người làm giúp mình cái postbit Vbulletin 0
Admin Hướng dẫn đóng khung nút thanks trong postbit Vbulletin 7
Admin Share vt.Lai VBB Warning In Postbit 1.3 - Viết cảnh báo ngay tại bài viết Add-ons 0
Admin Hướng dẫn thêm nút report vào postbit hoặc postbit_legacy Vbulletin 0
Admin [OzzModz] Display Visitor Name ( [you] Mod) Xenforo 0
Admin OS/Browser Display for XenForo 2.x Xenforo 2.x Premium 0
Admin [OzzModz] XFRM File Extension And Size Display xenforo 2 Xenforo 0
Admin Hướng dẫn fix lỗi không hiện IP online xenforo - Fix don't display IP members online xenforo Xenforo 0
Admin Display "NEW" icon on unread posts Xenforo 0
Admin Display Postid (post count) Vbb tutorial 0
Admin Other Usergroup Display Add-ons 0
Admin 8thos Post New Reply From Thread Display 1.0 Xenforo 0
Admin [VINAVB]Display specific rules when posting new thread Add-ons 0
Admin Display a Message for Guests Xenforo 0
Admin OS/Browser Display In Postbits Add-ons 0
Admin Display Unread Posts (and Reputation Comments in 4.1) Add-ons 0
Admin Display Unread Posts (and Reputation Comments in 4.1) Add-ons 2

Similar threads

New posts New threads New resources

Back
Top