Thay đổi vị trí của avata

Discussion in 'Style & Template Questions' started by nguthe_93, Sep 8, 2013.

1votes
5/5, 1 vote

  1. nguthe_93

    nguthe_93 New Member

    Messages:
    54
    Likes:
    1
    em muốn thay đổi vị trí của avatar trong phần bài viết lên phía trên giống như này làm thế nào ạ Untitled
     
    Loading...
  2. datkaka

    datkaka Member

    Messages:
    372
    Likes:
    51
    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>
    ĐỒ MÊ : http://trollvc.com/threads/activision-call-of-duty-ghosts-va-gta-v-co-the-cung-thanh-cong.281.troll
     
    lucid and nguthe_93 like this.
  3. nguthe_93

    nguthe_93 New Member

    Messages:
    54
    Likes:
    1
    cảm ơn bác hjhj em làm được rùi
     
  4. nguthe_93

    nguthe_93 New Member

    Messages:
    54
    Likes:
    1
    em muốn làm 1 sidebar lúc nào cũng hiện khi vào forum khi vào category và cả khi vào bài viết cũng hiện thì chỉnh thế nào hả bác Untitled
     
  5. datkaka

    datkaka Member

    Messages:
    372
    Likes:
    51
    chả hiểu
     
  6. datkaka

    datkaka Member

    Messages:
    372
    Likes:
    51
    à. cài wiget chưa. cài rồi thì đổi forum_list thành all
     
  7. nguthe_93

    nguthe_93 New Member

    Messages:
    54
    Likes:
    1
    chỉnh forum_list thành all ở đâu hả bác
     
  8. nguthe_93

    nguthe_93 New Member

    Messages:
    54
    Likes:
    1
    à được rùi bác ạ hjhj em cảm ơn bác nhiều, bác có ở hà nội không em mời bác đi uống nước
     
  9. datkaka

    datkaka Member

    Messages:
    372
    Likes:
    51
    HCM bác à :D
     
  10. lucid

    lucid New Member

    Messages:
    6
    Likes:
    0
    cam on bac em dang can
     
  11. datkaka

    datkaka Member

    Messages:
    372
    Likes:
    51
    lâu thế này mà vẫn lôi ra đc à . đào mộ :v
     
  12. lucid

    lucid New Member

    Messages:
    6
    Likes:
    0
    cái gì hay thì đào thôi. mà cho hỏi cách bỏ mấy cái chia sẻ mạng xã hội đó được không
     
  13. Lil.Tee

    Lil.Tee Member

    Messages:
    405
    Likes:
    116
    Mình đã code cái widget này, nếu bạn mua thì có thể pm mình :).
    Demo : http://vatliphothong.vn/f/17/
     
  14. datkaka

    datkaka Member

    Messages:
    372
    Likes:
    51
    đc cậu ạ
     
comments powered by Disqus

Share This Page

Loading...