• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Change thread and message to read (Posts "x")

katsulynx

Well-known member
#2
As far as I am aware, this would kinda fake the counter, as the total of posts is 2, not 4. The first posts are all included in that counter. So if it's not your intention to falsify the data, you'd only need to remove the Discussion-Counter and rename the Message-Counter, right?
 
#3
As far as I am aware, this would kinda fake the counter, as the total of posts is 2, not 4. The first posts are all included in that counter. So if it's not your intention to falsify the data, you'd only need to remove the Discussion-Counter and rename the Message-Counter, right?
Well a thread is still a post, really. So rather than differentiating between the two it would just show the collective number of user submitted posts, thread or reply. I do, however, see your point.
I'm Definitely not trying to falsify, just think it would look cleaner, take some clutter away.

Do you know in which template I would find that?
 
#5
No it isn't. A thread is a collection of posts. This whole discussion here is 1 thread. So far it has 4 posts (including mine). To say this is 5 posts is incorrect.
okay, well i'm not here to debate.
I see no harm in what I'm trying to do, or what the forum owner in my attachment did. It looks clean and I don't believe it violates any terms of use with XenForo...

Can you direct me to the template? It would be appreciated.
 

katsulynx

Well-known member
#6
okay, well i'm not here to debate.
Neither am I, I just wanted to clarify that you're aware of that fact.
The correct template is thread_list_item, search for
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>
and replace it 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"><dt>{xen:phrase posts}:</dt> <dd>{xen:if $thread.isRedirect, '&ndash;', {xen:calc '{xen:number $thread.reply_count} + {xen:number $thread.view_count}'}</dd></dl>
    </div>
(There might be a typo in it or so, it's quite early in the morning)
 
#7
Neither am I, I just wanted to clarify that you're aware of that fact.
The correct template is thread_list_item, search for
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>
and replace it 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"><dt>{xen:phrase posts}:</dt> <dd>{xen:if $thread.isRedirect, '&ndash;', {xen:calc '{xen:number $thread.reply_count} + {xen:number $thread.view_count}'}</dd></dl>
    </div>
(There might be a typo in it or so, it's quite early in the morning)
I really appreciate your time on this.
I've tried it several different ways now and I keep getting a "thread_list_item: Line 74: Template syntax error." I can't seem to find where the typo would be though. each time I tweak it to see if my edit works I just get a different error code:notworthy:
 

katsulynx

Well-known member
#9
Try replacing the above
Code:
{xen:calc '{xen:number $thread.reply_count} + {xen:number $thread.view_count}'}
with
Code:
{xen:calc '{$thread.reply_count} + {$thread.view_count}'}
You probably need to wrap that whole thing in {xe:number} to show the 0s