fof / discussion-views
Add view counts to discussions
Package info
github.com/FriendsOfFlarum/discussion-views
Type:flarum-extension
pkg:composer/fof/discussion-views
Fund package maintenance!
2.0.0-beta.1
2025-11-09 12:19 UTC
Requires
- flarum/core: ^2.0.0-beta
- jaybizzle/crawler-detect: ^1.2
Requires (Dev)
- flarum/phpstan: ^2.0.0-beta
- flarum/testing: ^2.0.0-beta
Conflicts
Replaces
This package is auto-updated.
Last update: 2026-02-15 21:22:00 UTC
README
A lightweight discussion view tracker, with minimal settings and options.
Features
- Tracks how many times a discussion has been viewed and displays it per discussion on the discussionlist. Note: does not track unique views, rather every view, both as guest and registered member
- Adds 2 sorting options: popular and unpopular
- Adds 1 event which developers can listen for:
DiscussionWasViewed- includes accessor IP and UserAgent strings - Adds 1 new permission where people can (re)set the viewcount of a discussion (default to admins)
- Uses
view_countcolumn created on thediscussionstable, so should not impact load performance - Identify known crawlers with an option to not increase the view count for their visit. Uses jaybizzle/crawler-detect for identification
Installation
composer require fof/discussion-views:"*"