flatrate / flarum-public-counts
Read-only guest-visible discussion and reply counts for one closed UTC week. Flarum 1.8.
Package info
github.com/mrkcntrmn/flatrate-flarum-public-counts
Type:flarum-extension
pkg:composer/flatrate/flarum-public-counts
Requires
- flarum/approval: ^1.8
- flarum/core: ^1.8.19
- flarum/flags: ^1.8
- flarum/tags: ^1.8
Requires (Dev)
- flarum/testing: ^1.1
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-20 03:31:43 UTC
README
Read-only Flarum 1.8.19 count of guest-visible discussions and authored replies for one closed UTC week.
The count uses Discussion::whereVisibleTo(guest) and Post::whereVisibleTo(guest). It does not replace those scopes with hidden_at IS NULL. A reply must be a comment whose Flarum number is greater than 1, so the opening comment and event posts are excluded. Post visibility already requires the parent discussion to be visible.
The result is what a guest can see at the time of the read, grouped by creation time. It is not a reconstruction of visibility at the historical week close.
POST /api/flatrate/public-counts accepts only startUtc and endUtc, exactly seven days apart, and requires FLATRATE_PUBLIC_COUNTS_TOKEN. The response is the two integers and a snapshot receipt.
Disposable coverage is tests/integration/PublicVisibleWeekCountsTest.php against Flarum core, tags, flags, and approval. fof/byobu is not part of the installed disposable package set. Private discussions are Flarum's is_private flag. Approval hides unapproved rows by marking them private.