C crazykgb Member Jan 21, 2021 #1 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.
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.
Solution Paul B Jan 29, 2021 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>
Paul B XenForo moderator Staff member Jan 29, 2021 #2 Edit the widget_forum_statistics template: Replace this: HTML: <dd>{$forumStatistics.messages|number}</dd> With this: HTML: <dd>{{ number($forumStatistics.messages-$forumStatistics.threads) }}</dd> Upvote 1 Downvote 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>
C crazykgb Member Feb 3, 2021 #4 @Brogan, any pointers on how to do the same for this block on the Members page? Thank you. Upvote 0 Downvote
Paul B XenForo moderator Staff member Feb 3, 2021 #5 Those values are defined in code so can't be overridden with a template edit. Upvote 0 Downvote
C crazykgb Member Mar 3, 2021 #7 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? Upvote 0 Downvote
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?
Paul B XenForo moderator Staff member Mar 3, 2021 #8 I doubt that var is available to the widget. Upvote 0 Downvote
C crazykgb Member Mar 3, 2021 #9 Thank you. Appreciate your help. Is there a place I can read about making this var available for the stats widget, or it's too complicated? Upvote 0 Downvote
Thank you. Appreciate your help. Is there a place I can read about making this var available for the stats widget, or it's too complicated?
Paul B XenForo moderator Staff member Mar 3, 2021 #10 It depends. This guide explains how to pass vars so they can be used globally: https://xenforo.com/community/resou...nd-widgets.8041/updates#resource-update-37730 Upvote 0 Downvote
It depends. This guide explains how to pass vars so they can be used globally: https://xenforo.com/community/resou...nd-widgets.8041/updates#resource-update-37730