XF 2.1 Any way I can show total thread likes at this position?

Cannabis Ape

Active member
Unfortunately still not in the core but I'm a fan off seeing the total likes of a thread in the thread overview.

Any way I can let them show up as shown in the screenshot?

Cheers.

likes.webp
 
Last edited:
I'm not an expert... but I don't believe it's easily possible. "Total reaction score" for a thread doesn't appear to be saved anywhere. You'd have to calculate it somehow and save it.

"First Post Reaction Score" is available though. If u want to use that.

{$thread.first_post_reaction_score} will display that in template:thread_list_macros
 
I'm not an expert... but I don't believe it's easily possible. "Total reaction score" for a thread doesn't appear to be saved anywhere. You'd have to calculate it somehow and save it.

"First Post Reaction Score" is available though. If u want to use that.

{$thread.first_post_reaction_score} will display that in template:thread_list_macros
Yeah, sorry maybe I should've specified it better, I meant the total reactions on the first post
 
  • Like
Reactions: arn
Where I place it though?

I'm think in here but don't know what to fill in exactly

Code:
        <div class="structItem-cell structItem-cell--meta" title="{{ phrase('first_message_reaction_score:')|for_attr }} {$thread.first_post_reaction_score|number}">
            <dl class="pairs pairs--justified">
                <dt>{{ phrase('replies') }}</dt>
                <dd>{{ $thread.discussion_type == 'redirect' ? '&ndash;' : $thread.reply_count|number_short }}</dd>
            </dl>
            <dl class="pairs pairs--justified structItem-minor">
                <dt>{{ phrase('views') }}</dt>
                <dd>{{ $thread.discussion_type == 'redirect' ? '&ndash;' : ($thread.view_count > $thread.reply_count ? $thread.view_count|number_short : number_short($thread.reply_count+1)) }}</dd>
            </dl>
        </div>
I got the words like on the right position but not sure how to complete the whole line.
 
Back
Top Bottom