XF 1.5 Forum stats in XF header

valdet

Active member
I am trying to have the forum stats to show up in header area.

I combined code snippets from sidebar_online_users and forum_list templates, added minimum styling and pasted it into ad_header template

Code:
<div style="font-weight: bold; float:right; margin-right: 10px;">
Online: {xen:number $onlineUsers.total} | Discussions: {xen:number $boardTotals.discussions} | Messages: {xen:number $boardTotals.messages} | Members: {xen:number $boardTotals.users}
</div>

It shows all 0
Online: 0 | Discussions: 0 | Messages: 0 | Members: 0

Can someone help on this.
Thanks
 
Last edited:
If you use the widget framework you could look into placing a custom widget(forum stats) in the header by targeting the hook :ad_header

Then customize the template.
 
If you use the widget framework you could look into placing a custom widget(forum stats) in the header by targeting the hook :ad_header

Then customize the template.
Thanks, I tried that and it shows the live stats, but then for some reason, it ends up showing the widget twice in hook:ad_header location. The widget template is still unmodified.

ad_header_bf_widget.webp

I am using the free version of FlatAwesome theme
 
Last edited:
Back
Top Bottom