Hỏi cách thu gon phần trả lời và đọc trong forum_list

Thảo luận trong 'Style & Template Questions' bắt đầu bởi thiencqcq, 19/12/13.

1votes
5/5, 1 vote

  1. thiencqcq

    thiencqcq Verified User

    Bài viết:
    181
    Likes :
    26
    Mình muốn thu gon phần này lại để cho mục tiêu đề được rông hơn chút.
    2

    mình muôn được thê này:
    1

    Ai biết cách làm hướng dẫn mình với.Thanks.
     
    Đang tải...
  2. bumbum12

    bumbum12 Member

    Bài viết:
    305
    Likes :
    91
    Vào thread_list_item , tìm :
    Mã:
    <div class="listBlock stats pairsJustified" title="{xen:phrase members_who_liked_first_message}: {xen:if $thread.isRedirect, '&ndash;', {xen:number $thread.first_post_likes}}">
            <dl class="major"><dt>{xen:phrase replies}:</dt> <dd>{xen:if $thread.isRedirect, '&ndash;', {xen:number $thread.reply_count}}</dd></dl>
            <dl class="minor"><dt>{xen:phrase views}:</dt> <dd>{xen:if $thread.isRedirect, '&ndash;', {xen:number $thread.view_count}}</dd></dl>
        </div>

    Thay bằng :
    Mã:
    <div class="listBlock stats pairsJustified" title="{xen:phrase members_who_liked_first_message}: {xen:if $thread.isRedirect, '&ndash;', {xen:number $thread.first_post_likes}}">
            <dl class="major"><dd>{xen:if $thread.isRedirect, '&ndash;', {xen:number $thread.reply_count}}</dd></dl>
            <dl class="minor"><dd>{xen:if $thread.isRedirect, '&ndash;', {xen:number $thread.view_count}}</dd></dl>
        </div>
    Xem thử ổn ko nhé. Vì Forum mình thay đổi rồi nên không còn code gốc.

    Đây là code mình đã làm cho mình : http://**[LINK FORBIDDEN]**/forums/code-game.15.html
     
  3. thiencqcq

    thiencqcq Verified User

    Bài viết:
    181
    Likes :
    26
    Mình làm nhu bạn hướng dẫn thì nó ra thê này:
    t

    Nhưng sao nó vẫn không được gọn gàng đẹp như hình này.
    1
    Cảm ơn bạn.
     
  4. bumbum12

    bumbum12 Member

    Bài viết:
    305
    Likes :
    91
    Ah, thử lại xem nhé

    Thay bằng đoạn này :
    Mã:
    <div class="listBlock stats pairsJustified" title="{xen:phrase members_who_liked_first_message}: {xen:if $thread.isRedirect, '&ndash;', {xen:number $thread.first_post_likes}}">
            <dl class="major"><dd>{xen:if $thread.isRedirect, '&ndash;', {xen:number $thread.reply_count}}</dd></dl>
            <dl class="minor"><dd>{xen:if $thread.isRedirect, '&ndash;', {xen:number $thread.view_count}}</dd></dl>
        </div>
    
    Muốn có 2 gạch 2 bên thì vào : discussion_list.css
    Tìm và sửa thằng .discussionListItem .stats dl , như sau:
    Mã:
    .discussionListItem .stats dl {
    padding: 0 10px;
    border-left: 1px dotted #DFDFDF;
    border-right: 1px dotted #DFDFDF;
    }
     
  5. thiencqcq

    thiencqcq Verified User

    Bài viết:
    181
    Likes :
    26
    Vân không có gì thay đổi bạn.
    t
    Cảm ơn

    Đây là: thread_list_item của mình
    HTML:
    <xen:require css="discussion_list.css" />
    
    <xen:if is="{$thread.isDeleted}"><xen:include template="thread_list_item_deleted" /><xen:else />
    
    <li id="thread-{$thread.thread_id}" class="discussionListItem {$thread.discussion_state}{xen:if '!{$thread.discussion_open}', ' locked'}{xen:if {$thread.sticky}, ' sticky'}{xen:if {$thread.isNew}, ' unread'}{xen:if {$thread.prefix_id}, ' prefix{$thread.prefix_id}'}{xen:if {$thread.isIgnored}, ' ignored'} {xen:if $thread.thread_is_watched, threadWatched} {xen:if $thread.forum_is_watched, forumWatched}" data-author="{$thread.username}">
    
        <div class="listBlock posterAvatar">
            <span class="avatarContainer">
                <xen:avatar user="$thread" size="s" img="true" />
                <xen:if is="{$thread.user_post_count}"><xen:avatar user="$visitor" size="s" img="true" class="miniMe" title="{xen:phrase you_have_posted_x_messages_in_this_thread, 'count={xen:number $thread.user_post_count}'}" /></xen:if>
            </span>
        </div>
    
        <div class="listBlock main">
    
            <div class="titleText">
                <xen:if hascontent="true">
                    <div class="iconKey">
                    <xen:contentcheck>
                        <xen:hook name="thread_list_item_icon_key" params="{xen:array 'thread={$thread}'}">
                        <xen:if is="{$thread.isModerated}"><span class="moderated" title="{xen:phrase moderated}">{xen:phrase moderated}</span></xen:if>
                        <xen:if is="!{$thread.discussion_open}"><span class="locked" title="{xen:phrase locked}">{xen:phrase locked}</span></xen:if>
                        <xen:if is="{$thread.sticky}"><span class="sticky" title="{xen:phrase sticky}">{xen:phrase sticky}</span></xen:if>
                        <xen:if is="{$thread.isRedirect}"><span class="redirect" title="{xen:phrase redirect}">{xen:phrase redirect}</span></xen:if>
                        <xen:if is="{$thread.thread_is_watched} OR {$thread.forum_is_watched}"><span class="watched" title="{xen:phrase watched}">{xen:phrase watched}</span></xen:if>
                        </xen:hook>
                    </xen:contentcheck>
                    </div>
                </xen:if>
    
                <h3 class="title">
                    <xen:if is="{$thread.canInlineMod}"><input type="checkbox" name="threads[]" value="{$thread.thread_id}" class="InlineModCheck" id="inlineModCheck-thread-{$thread.thread_id}" data-target="#thread-{$thread.thread_id}" title="{xen:phrase select_thread}: {$thread.title}" /></xen:if>
                    <xen:if is="{$showSubscribeOptions}"><input type="checkbox" name="thread_ids[]" value="{$thread.thread_id}" /></xen:if>
                    <xen:if is="{$thread.prefix_id}">
                        <xen:if is="{$linkPrefix}">
                            <a href="{xen:link forums, $forum, 'prefix_id={$thread.prefix_id}'}" class="prefixLink"
                                title="{xen:phrase show_only_threads_prefixed_by_x, 'prefix={xen:helper threadPrefix, $thread, plain, ""}'}">{xen:helper threadPrefix, $thread, html, ''}</a>
                        <xen:else />
                            {xen:helper threadPrefix, $thread}
                        </xen:if>
                    </xen:if>
                    <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 wrap, $thread.title, 50}</a>
                    <xen:if is="{$thread.isNew}"><a href="{xen:link threads/unread, $thread}" class="unreadLink" title="{xen:phrase go_to_first_unread_message}"></a></xen:if>
                </h3>
               
                <div class="secondRow">
                    <div class="posterDate muted">
                        <xen:username user="$thread" title="{xen:phrase thread_starter}" /><span class="startDate">,
                        <a{xen:if {$visitor.user_id}, ' href="{xen:link threads, $thread}"'} class="faint"><xen:datetime time="$thread.post_date" title="{xen:if {$visitor.user_id}, '{xen:phrase go_to_first_message_in_thread}'}" /></a></span><xen:if is="{$showForumLink}"><span class="containerName">,
                        <a href="{xen:link forums, $thread.forum}" class="forumLink">{$thread.forum.title}</a></span></xen:if>
    
                        <xen:if is="{$showLastPageNumbers} AND {$thread.lastPageNumbers}">
                            <span class="itemPageNav">
                                <span>...</span>
                                <xen:foreach loop="$thread.lastPageNumbers" value="$pageNumber">
                                    <a href="{xen:link threads, $thread, 'page={$pageNumber}'}">{$pageNumber}</a>
                                </xen:foreach>
                            </span>
                        </xen:if>
                    </div>
    
                    <div class="controls faint">
                        <xen:if is="{$thread.canEditThread}"><a href="javascript:" data-href="{xen:link 'threads/list-item-edit', $thread, 'showForumLink={$showForumLink}'}" class="EditControl JsOnly">{xen:phrase edit}</a></xen:if>
                        <xen:if is="{$showSubscribeOptions} AND {$thread.email_subscribe}">{xen:phrase email}</xen:if>
                    </div>
                </div>
            </div>
        </div>
    
        <div class="listBlock stats pairsJustified" title="{xen:phrase members_who_liked_first_message}: {xen:if $thread.isRedirect, '&ndash;', {xen:number $thread.first_post_likes}}">
            <dl class="major"><dd>{xen:if $thread.isRedirect, '&ndash;', {xen:number $thread.reply_count}}</dd></dl>
            <dl class="minor"><dd>{xen:if $thread.isRedirect, '&ndash;', {xen:number $thread.view_count}}</dd></dl>
        </div>
    
    
    
        <div class="listBlock lastPost">
            <xen:if is="{$thread.isRedirect}">
                <div class="lastPostInfo">{xen:phrase n_a}</div>
            <xen:else />
                <dl class="lastPostInfo">
                    <dt><xen:if is="{xen:helper isIgnored, $thread.last_post_user_id}">{xen:phrase ignored_member}<xen:else /><xen:username user="$thread.lastPostInfo" /></xen:if></dt>
                    <dd class="muted"><a{xen:if '{$visitor.user_id}', ' href="{xen:link posts, $thread.lastPostInfo}" title="{xen:phrase go_to_last_message}"'} class="dateTime"><xen:datetime time="$thread.lastPostInfo.post_date" /></a></dd>
                </dl>
            </xen:if>
        </div>
    </li>
    
    </xen:if>
     
  6. Lil.Tee

    Lil.Tee Member

    Bài viết:
    405
    Likes :
    116
    Làm như bác này, rồi vào extra.css thêm đoạn sau nhé:
    PHP:
    .discussionList .stats {
    width69px !important;
    }
    P/s: 69 là số đẹp :))
     
  7. thiencqcq

    thiencqcq Verified User

    Bài viết:
    181
    Likes :
    26
    Đúng là số đẹp cảm ơn bạn, cam ơn 2 bác nhiều
     
  8. Lil.Tee

    Lil.Tee Member

    Bài viết:
    405
    Likes :
    116
    Bạn thêm tiếp đoạn sau vào extra.css
    PHP:
            .discussionList .lastPost
            
    {
                
    width110px !important;
    }
     
    thiencqcq thích bài này.
  9. thiencqcq

    thiencqcq Verified User

    Bài viết:
    181
    Likes :
    26
    Đúng là đẹp cảm ơn 2 bác :D
     
comments powered by Disqus

Chia sẻ trang này

Đang tải...