XF 1.4 Aligning replies and views

reddy ink

Active member
I am trying to reconfigure replies and views in Forum_View so that number of replies appear under Replies and number from views appear under Views.

Thank you,
upload_2015-1-25_18-51-40.webp
 
One possibility:

In the 'thread_list_item' template find:
Code:
    <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>

Replace with:
Code:
    <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">
            <span>{xen:if $thread.isRedirect, '&ndash;', {xen:number $thread.reply_count}}</span>
            <span>{xen:if $thread.isRedirect, '&ndash;', {xen:number $thread.view_count}}</span>
        </dl>
    </div>

Then add to your EXTRA.css template:
Code:
.pairsJustified span:nth-of-type(2) {
    float: right;
}
 
Happy to help. :)

Okay, first in 'thread_list' find this block and remove the 2nd <a> element from it (the Start Date link on the top bar). We're going to move it into its own block in a sec.
Code:
        <dd class="main">
            <a href="{xen:link forums, $forum, '_params={$orderParams.title}'}" class="title"><span>{xen:phrase title}{xen:helper sortArrow, $order, $orderDirection, title}</span></a>
            <a href="{xen:link forums, $forum, '_params={$orderParams.post_date}'}" class="postDate"><span>{xen:phrase start_date}{xen:helper sortArrow, $order, $orderDirection, post_date}</span></a>
        </dd>

Under the block that we just edited, add this after it.
Code:
        <dd class="discStartDateHead">
            <a href="{xen:link forums, $forum, '_params={$orderParams.post_date}'}" class="postDate"><span>{xen:phrase start_date}{xen:helper sortArrow, $order, $orderDirection, post_date}</span></a>
        </dd>

Now that we have the Start Date link separated into its own "column" we need to mirror that and add the dates themselves into 'thread_list_item'...
In thread_list_item find this line here:
Code:
<div class="listBlock stats pairsJustified" title="{xen:phrase members_who_liked_first_message}: {xen:if $thread.isRedirect, '&ndash;', {xen:number $thread.first_post_likes}}">

Right above it, add this:
Code:
    <div class="listBlock stats discStartDate">
        <dl class="major">{xen:date $thread.post_date, 'absolute'}</dl>
    </div>

For EXTRA.css:
Code:
.discussionList .discStartDateHead {
    width: 100px;
}

.discussionList div.discStartDate {
    width: 100px;
    background: transparent;
}
 
Top Bottom