PHPackages                             ianm/online-guests - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ianm/online-guests

ActiveFlarum-extension[Utility &amp; Helpers](/categories/utility)

ianm/online-guests
==================

Display the number of guests browsing your forum

1.1.0(3w ago)01.5k↓88.7%1[1 issues](https://github.com/imorland/flarum-ext-online-guests-widget/issues)MITPHPPHP ^8.2CI passing

Since Oct 4Pushed 3w ago1 watchersCompare

[ Source](https://github.com/imorland/flarum-ext-online-guests-widget)[ Packagist](https://packagist.org/packages/ianm/online-guests)[ RSS](/packages/ianm-online-guests/feed)WikiDiscussions 2.x Synced 3d ago

READMEChangelog (3)Dependencies (8)Versions (6)Used By (0)

Online Guests Widget
====================

[](#online-guests-widget)

[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667) [![Latest Stable Version](https://camo.githubusercontent.com/c9d58c4d5818138d0c3d8a71d789a112ff52d4b7bf3b1dc4f6d0547281fbc1db/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f69616e6d2f6f6e6c696e652d6775657374732e737667)](https://packagist.org/packages/ianm/online-guests) [![Total Downloads](https://camo.githubusercontent.com/c24d1f72eed33778012703ba17714ddd2657d423d5b0a6c97c8a0574b3b88635/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f69616e6d2f6f6e6c696e652d6775657374732e737667)](https://packagist.org/packages/ianm/online-guests)

A [Flarum](http://flarum.org) extension that adds a forum widget showing how many guests (logged-out visitors) are currently browsing your forum.

Screenshot
----------

[](#screenshot)

[![image](https://private-user-images.githubusercontent.com/16573496/272502066-523a172e-ed62-49c9-89a6-bdb3dafdbcde.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODMyMTk3NjYsIm5iZiI6MTc4MzIxOTQ2NiwicGF0aCI6Ii8xNjU3MzQ5Ni8yNzI1MDIwNjYtNTIzYTE3MmUtZWQ2Mi00OWM5LTg5YTYtYmRiM2RhZmRiY2RlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzA1VDAyNDQyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk4NTdkODlkYjQ0ZTQyNGEyNDA4MDY2MmMxNWU3NTg5ZWFlMGY2NzcxMzQ2NjJjOTdiZjc4MmYyZjM5M2U1N2UmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.NB9OFCXilItjVcj4ckTB0himx7-btDs_oci2tcyMRN8)](https://private-user-images.githubusercontent.com/16573496/272502066-523a172e-ed62-49c9-89a6-bdb3dafdbcde.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODMyMTk3NjYsIm5iZiI6MTc4MzIxOTQ2NiwicGF0aCI6Ii8xNjU3MzQ5Ni8yNzI1MDIwNjYtNTIzYTE3MmUtZWQ2Mi00OWM5LTg5YTYtYmRiM2RhZmRiY2RlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzA1VDAyNDQyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk4NTdkODlkYjQ0ZTQyNGEyNDA4MDY2MmMxNWU3NTg5ZWFlMGY2NzcxMzQ2NjJjOTdiZjc4MmYyZjM5M2U1N2UmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.NB9OFCXilItjVcj4ckTB0himx7-btDs_oci2tcyMRN8)

How it works
------------

[](#how-it-works)

The widget counts active guest sessions — that is, sessions that are **not** associated with a logged-in user. The count is determined by inspecting Flarum's session storage, so the supported methods depend on your configured session driver (see [Supported session drivers](#supported-session-drivers) below).

To avoid recalculating on every page load, the result is cached for a configurable period (default: 600 seconds / 10 minutes). The widget is built on top of [Forum Widgets Core](https://github.com/FriendsOfFlarum/forum-widgets-core), which is installed automatically as a dependency and lets admins position, reorder, and toggle widgets from the dashboard.

Supported session drivers
-------------------------

[](#supported-session-drivers)

DriverSupportedNotes`file`✅The Flarum default. Guest sessions are counted by scanning the session files on disk.`redis`✅Requires [`fof/redis`](https://github.com/FriendsOfFlarum/redis). Guest session IDs are tracked in a sorted set and counted in real time.other❌Any other driver returns a count of `0`. Sponsorship of additional drivers (e.g. `database`) is welcome.### Redis sessions

[](#redis-sessions)

When you use [`fof/redis`](https://github.com/FriendsOfFlarum/redis) with the Redis session handler, this extension automatically registers a middleware that records the session ID of each guest request in a Redis sorted set, scored by request time. The widget then prunes entries older than the configured *Online duration* and counts what remains — no disk scanning required.

`fof/redis` is listed as a Composer `suggest`, so it is **not** installed by default. To enable Redis support, install and configure it separately:

```
composer require fof/redis:"*"
```

Then enable Redis sessions in the FoF Redis extension settings. No further configuration is needed in this extension — it detects the active session handler automatically.

Settings &amp; permissions
--------------------------

[](#settings--permissions)

From the admin dashboard you can configure:

- **Online duration** — how recently a session must have been active (in minutes) to count as "online". Default: `5`.
- **Cache duration** — how long (in seconds) the calculated guest count is cached before being recalculated. Default: `600`.

A **View online guests** permission controls which groups can see the widget. Only actors with this permission receive the guest count.

Installation
------------

[](#installation)

Install with composer:

```
composer require ianm/online-guests:"*"
```

This will also install [Forum Widgets Core](https://github.com/FriendsOfFlarum/forum-widgets-core), which the widget relies on.

Updating
--------

[](#updating)

```
composer update ianm/online-guests:"*"
php flarum migrate
php flarum cache:clear
```

Links
-----

[](#links)

- [Packagist](https://packagist.org/packages/ianm/online-guests)
- [GitHub](https://github.com/imorland/flarum-ext-online-guests-widget)
- [Discuss](https://discuss.flarum.org/d/39401)

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance94

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~245 days

Total

5

Last Release

26d ago

Major Versions

1.x-dev → 2.0.0-beta.12026-06-09

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16573496?v=4)[IanM](/maintainers/imorland)[@imorland](https://github.com/imorland)

---

Top Contributors

[![imorland](https://avatars.githubusercontent.com/u/16573496?v=4)](https://github.com/imorland "imorland (8 commits)")[![flarum-bot](https://avatars.githubusercontent.com/u/39334649?v=4)](https://github.com/flarum-bot "flarum-bot (3 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (1 commits)")

---

Tags

flarum

### Embed Badge

![Health badge](/badges/ianm-online-guests/health.svg)

```
[![Health](https://phpackages.com/badges/ianm-online-guests/health.svg)](https://phpackages.com/packages/ianm-online-guests)
```

###  Alternatives

[flarum-lang/russian

Russian language pack for Flarum.

12128.3k](/packages/flarum-lang-russian)[fof/byobu

Well integrated, advanced private discussions.

59120.6k13](/packages/fof-byobu)[fof/discussion-language

Specify the language a discussion is written in &amp; sort by language

1034.8k4](/packages/fof-discussion-language)[flarum-lang/french

French language pack to localize the Flarum forum software plus its official and third-party extensions.

1938.7k](/packages/flarum-lang-french)[fof/gamification

Upvotes and downvotes for your Flarum community

4066.1k8](/packages/fof-gamification)[fof/best-answer

Mark a post as the best answer in a discussion

25154.0k20](/packages/fof-best-answer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
