XF 2.0 Grabbing the Total Count of All Online Members, Guests, & Robots in Xenforo 2.0

I'm trying to simply get a count of all current users online.

I've dug through some of the widget templates to try to find the code block but they are all returning zero for me if I don't use them within the widget. I'm trying to add this to the PAGE_CONTAINER template to create a custom widget.

I've attempted using:
{$counts.total|number}
and
Code:
{{ phrase('online_now_x_members_y_guests_z',{
    'total': number($online.counts.total),
    'members': number($online.counts.members),
    'guests': number($online.counts.guests)})
}}

But again they're not returning any values but zero. I'm assuming there's some of ther chunk of code that needs to be in the PAGE_CONTAINER to allow those variables to be populated, but I can't figure it out. On the old Xenforo 1.X it worked magically for me in the sidebar_online_users template, but alas, not working for me now.

Can anyone point me in the right direction? Thanks a ton.
 
Back
Top Bottom