XF 2.2 Statistics widget. Exclude thread count from message count

crazykgb

Member
Hello, I’m looking for some pointers on how to exclude the number of threads from the number of messages in the forum stats widget. Would like to have a pure number of replies displayed, instead of combined with threads. Thank you.

D972D1E8-9863-430B-BF76-FAD0C9597FC9.webp
 
Solution
Edit the widget_forum_statistics template:

Replace this:
HTML:
<dd>{$forumStatistics.messages|number}</dd>

With this:
HTML:
<dd>{{ number($forumStatistics.messages-$forumStatistics.threads) }}</dd>
Edit the widget_forum_statistics template:

Replace this:
HTML:
<dd>{$forumStatistics.messages|number}</dd>

With this:
HTML:
<dd>{{ number($forumStatistics.messages-$forumStatistics.threads) }}</dd>
 
Solution
One additional question. I would like to display the number of media comments in the forum stats widget.

This is not really working. It's displaying zero
Code:
        <xf:if is="is_addon_active('XFMG')">
                    <dl class="pairs pairs--justified">
                        <dt>{{ phrase('xfmg_comments') }}</dt>
                        <dd>{$galleryStatistics.comment_count|number}</dd>
                    </dl>
                   </xf:if>

What do I need to adjust?
 
Back
Top Bottom