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

Tattooed Theist

Active member
I'd like to change the thread and message counters into an all inclusive "Posts" counter
So instead of, on the second image, 2 discissions and 2 messages it would read "Posts 4"

I assume it's just a template modification issue, any help on this?
 

Attachments

  • Screen Shot 2016-11-09 at 2.18.05 PM.webp
    Screen Shot 2016-11-09 at 2.18.05 PM.webp
    20.7 KB · Views: 16
  • Screen Shot 2016-11-09 at 2.47.51 PM.webp
    Screen Shot 2016-11-09 at 2.47.51 PM.webp
    10.8 KB · Views: 17
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?
 
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?
 
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.
 
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)
 
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:
 
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
 
Back
Top Bottom