BattleKing
Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
- Joined
- May 24, 2020
- Messages
- 3,529
- 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
Find:
Add below (choose one from below):
Full number, without comma:
Full number, with comma:
Short number:
Screenshot
Full number, without comma
Full number, with comma
Description
This guide will run you through on how to display the number of views and replies in the thread description.
Guide
- 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
Full number, with comma