Show Forum Statistics on your forum
Forum Statistics appears once two things are done: members can view it, and its widget is placed. How to do both and tune the tabs.
Updated 4 min read By the D.C Style team
On this page
Forum Statistics shows tabbed lists of what is happening on your forum: latest threads, most viewed, trending, unanswered, top contributors and more. It appears once you have done two things. Members need permission to view it, and its widget must be placed on a page. Neither happens automatically, which is why it looks like "nothing happened" right after install. It needs XenForo 2.2 or newer, and the product page lists PHP 8.0 or newer.
Step 1: let members view the statistics
Go to Groups & permissions > User group permissions. For each group that should see the statistics, usually Registered and, if you like, Unregistered / Unconfirmed for guests, open the Forum Statistics section and set Can view forum statistics to Yes.
No group has this permission after install, so skipping this step leaves the widget invisible to everyone. XenForo permissions explained covers how groups combine.
Step 2: place the widget
- Go to Appearance > Widgets and click Add widget.
- Choose [D.C Style] Forum Statistics.
- Give it a widget key and pick a position. Forum list: Above nodes is the usual choice. Forum list: Sidebar works too with the compact layout.
- Choose the widget's options, described below, and save.
The widget's own options:
- Layout: Tabbed or Grid for wide positions, Compact for narrow ones such as a sidebar. In Grid you also set the columns for desktop and tablet. Phones always get one column.
- Items limit override: how many items each tab shows. 0 uses each tab's own limit.
- Scope: Global (all forums), or Current forum only when you place the widget on forum pages.
More on positions and ordering: add a widget and choose where it appears.
Choose and tune the tabs
Seven thread and member tabs are created for you. Manage them at D.C Style - Forum Statistics > Manage tabs in the Admin CP: add, edit, switch off and drag them into order. There are 28 tab types in four groups: Threads, Members, Resources and Media gallery. Resource tabs need XenForo Resource Manager, and media and album tabs need XenForo Media Gallery. They only appear when those add-ons are installed.
Each tab has its own settings:
- Items limit and Time period: All time, or the last 7, 30, 90 or 365 days.
- Included forums (or categories, for resources and media) to narrow what the tab lists.
- Filter by tags: only items with any of the tags you enter.
- Viewable by user groups: leave it empty for everyone who can view the statistics, or limit a tab to certain groups.
- Cache TTL (seconds): how long the tab's results are kept before they are worked out again.
Every tab also has a View all link to a full page, and the whole collection lives at /forum-stats on your forum.
How fresh the numbers are
Statistics are cached so they do not slow your pages down. The options in Setup > Options > D.C Style - Forum Statistics:
| Option | Default | What it does |
|---|---|---|
| Enable forum statistics | On | The master switch. |
| Default cache TTL (seconds) | 1800 | How long results are kept. Tabs can override this. |
| Minimum cache rebuild interval (seconds) | 60 | The shortest gap between rebuilds caused by new threads and posts. Raise it on a busy forum. |
The DC/ForumStats: Rebuild statistics cache cron entry also refreshes everything twice an hour, on the hour and at half past. If the lists look stuck, check that XenForo's scheduled tasks are running: keep scheduled tasks running. Rebuild cache on the Manage tabs page refreshes them straight away.
If the widget still does not appear after both steps, work through installed an add-on but nothing shows up?. The full tab list is on the Forum Statistics page.
Still stuck? Open a support ticket with your XenForo version, the widget position you chose, and whether you are testing as a member or as an administrator.