XF 2 Tip [JoyFreak] Thread view/reply count

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,514
Points
523

Reputation:

Live example: Gaming Forums

Description
This guide will run you through on how to display the number of views and replies in the thread description.

Guide

  1. Go to Admin CP > Appearance > Templates > Search: thread_view

Find:


Code:
       <a href="{{ link('threads', $thread) }}" class="u-concealed"><xf:date time="{$thread.post_date}" /></a>
        </li>

Add below (choose one from below):

Full number, without comma:


Code:
       <li title="Replies">
            <i class="fa--xf far fa-reply" aria-hidden="true" title="Replies"></i>
            <span class="u-srOnly">{{ phrase('replies') }}</span>
            {$thread.reply_count}
        </li>

        <li title="Views">
            <i class="fa--xf far fa-eye" aria-hidden="true" title="Views"></i>
            <span class="u-srOnly">{{ phrase('views') }}</span>
            {$thread.view_count}
        </li>

Full number, with comma:


Code:
       <li title="Replies">
            <i class="fa--xf far fa-reply" aria-hidden="true" title="Replies"></i>
            <span class="u-srOnly">{{ phrase('replies') }}</span>
            {$thread.reply_count|number}
        </li>

        <li title="Views">
            <i class="fa--xf far fa-eye" aria-hidden="true" title="Views"></i>
            <span class="u-srOnly">{{ phrase('views') }}</span>
            {$thread.view_count|number}
        </li>

Short number:


Code:
       <li title="Replies">
            <i class="fa--xf far fa-reply" aria-hidden="true" title="Replies"></i>
            <span class="u-srOnly">{{ phrase('replies') }}</span>
            {$thread.reply_count|number_short}
        </li>

        <li title="Views">
            <i class="fa--xf far fa-eye" aria-hidden="true" title="Views"></i>
            <span class="u-srOnly">{{ phrase('views') }}</span>
            {$thread.view_count|number_short}
        </li>



Screenshot
Full number, without comma
1645601657000.png

Full number, with comma
1645601670200.png
 

VoyagerSDP

Active member
Registered
Joined
Apr 7, 2022
Messages
30
Points
8

Reputation:

Live example: Gaming Forums

Description
This guide will run you through on how to display the number of views and replies in the thread description.

Guide

  1. Go to Admin CP > Appearance > Templates > Search: thread_view

Find:


Code:
       <a href="{{ link('threads', $thread) }}" class="u-concealed"><xf:date time="{$thread.post_date}" /></a>
        </li>

Add below (choose one from below):

Full number, without comma:


Code:
       <li title="Replies">
            <i class="fa--xf far fa-reply" aria-hidden="true" title="Replies"></i>
            <span class="u-srOnly">{{ phrase('replies') }}</span>
            {$thread.reply_count}
        </li>

        <li title="Views">
            <i class="fa--xf far fa-eye" aria-hidden="true" title="Views"></i>
            <span class="u-srOnly">{{ phrase('views') }}</span>
            {$thread.view_count}
        </li>

Full number, with comma:


Code:
       <li title="Replies">
            <i class="fa--xf far fa-reply" aria-hidden="true" title="Replies"></i>
            <span class="u-srOnly">{{ phrase('replies') }}</span>
            {$thread.reply_count|number}
        </li>

        <li title="Views">
            <i class="fa--xf far fa-eye" aria-hidden="true" title="Views"></i>
            <span class="u-srOnly">{{ phrase('views') }}</span>
            {$thread.view_count|number}
        </li>

Short number:


Code:
       <li title="Replies">
            <i class="fa--xf far fa-reply" aria-hidden="true" title="Replies"></i>
            <span class="u-srOnly">{{ phrase('replies') }}</span>
            {$thread.reply_count|number_short}
        </li>

        <li title="Views">
            <i class="fa--xf far fa-eye" aria-hidden="true" title="Views"></i>
            <span class="u-srOnly">{{ phrase('views') }}</span>
            {$thread.view_count|number_short}
        </li>



Screenshot
Full number, without comma
View attachment 27959
Full number, with comma
View attachment 27960
BattleKing
Thank you for share

Do you know how to show thie reply and view count in the thread list?

Captura de pantalla 2022-05-04 080020.jpg


Than kyou

Note: Using [TH] iO Dark Style
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,514
Points
523

Reputation:

Thank you for share

Do you know how to show thie reply and view count in the thread list?

View attachment 28877

Than kyou

Note: Using [TH] iO Dark Style
VoyagerSDPGo to the template of that theme

node_list_forum​

and open this, search in there for $extras.message_count|number_short(1) and change this to $extras.message_count|number(1)
 

VoyagerSDP

Active member
Registered
Joined
Apr 7, 2022
Messages
30
Points
8

Reputation:

Go to the template of that theme

node_list_forum​

and open this, search in there for $extras.message_count|number_short(1) and change this to $extras.message_count|number(1)
BattleKingHi, doesn't work exactly, but i saw that the forum list number style changed

Although I am referring to the list of Threads within a forum

Captura de pantalla 2022-05-04 200055.png
 

Mr_Quim

New member
Registered
Joined
Sep 22, 2022
Messages
2
Points
13

Reputation:

The solution for u turn it on in [TH] iO Dark Style is:

U need to go to Appearance -> Style Properties -> Discussion list -> Width to collapse discussion list items -> Set it to 1000px instead of 10000px.

Discussion_list.jpg



Sorry for revive these thread, but i dont see a solution for the last reply problem and i found a solution to share.

I read rules and i think im not breaking it, if yes, sorry and delete my reply.

Do not bump topics older than 4 weeks. The exception to this rule is: Support topics. Occasionally a support may go unanswered and it is appropriate to bump it according to the above rule.
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,514
Points
523

Reputation:

The solution for u turn it on in [TH] iO Dark Style is:

U need to go to Appearance -> Style Properties -> Discussion list -> Width to collapse discussion list items -> Set it to 1000px instead of 10000px.

View attachment 30632


Sorry for revive these thread, but i dont see a solution for the last reply problem and i found a solution to share.

I read rules and i think im not breaking it, if yes, sorry and delete my reply.
Mr_QuimThats fine, even if you post the solution or raise new question about it. This is not bumping!
Thanks for your solution.
 
Top