Daily Stats in a page


I'm trying to embed the Daily statistics graph in the admin panel on a page on my site. It would be a really nice effect, does anyone know how to do this ?


You need a callback. Here is an example of a page node callback:


But you will need to change the code to build the stats. You can refer to the controller for the admin stats page, XenForo_ControllerAdmin_Stats. This obviously requires coding ability.

Hey Jake, sorry about taking a while to respond to this.

Anyway, I see that XenForo_ControllerAdmin_Stats returns some data to the admin_stats template

    return $this->responseView('XenForo_ViewAdmin_Stats_Daily', 'stats_daily', $viewParams);
What more specifically should I look at to have the page render this data using a callback ?

Jake Bunce

XenForo moderator
Staff member
Basically what I said before. Create a page node callback. The link I posted has a basic skeleton for a callback function. Then inside of that function you need to write code to build the stats. You can refer to XenForo_ControllerAdmin_Stats for the code used by the stats page in the Admin CP.