PolicyGuard — Flatboard Plugin
Version 1.1.0 | GPL3 | flatboard.org
Download: in resources management
Enforce community guidelines acknowledgement before members can browse your forum.

What it does
PolicyGuard links to any discussion on your forum (typically your "Community Guidelines" or "Terms of Service" thread). When that discussion's first post is edited, all members are automatically required to re-read and confirm the new terms before continuing.
Reading flow
Any page (except the target discussion) — a full-screen blocking overlay appears. It shows the title of the guidelines, an estimated reading time badge, and a link to the discussion. The confirm button stays locked.
The target discussion — the overlay disappears. A non-blocking toast (bottom-right corner) counts down the estimated reading time while the member reads freely. When the countdown reaches zero, the toast closes and the confirmation overlay reappears on that page only, with the checkbox unlocked.
Confirmation — the member ticks the checkbox and clicks Confirm & Continue. The acknowledgement is saved server-side (JSON file for logged-in users, cookie for guests).
If the member leaves mid-read — the remaining countdown is stored in
sessionStorage. When they return to the discussion, the countdown resumes from where it stopped.
Automatic version bump
When a moderator or admin edits the first post of the tracked discussion, PolicyGuard automatically:
- Updates
policy_versionto theedited_attimestamp of the post. - Recalculates the estimated reading time.
- Preserves any extra delay the admin had configured on top of the estimate.
- All previous confirmations become invalid → every member must confirm again.
Installation
- Copy the
PolicyGuard/folder intoplugins/. - Enable the plugin from Admin → Plugins.
- Open Admin → Plugins → PolicyGuard → Settings.
- Select the discussion containing your guidelines from the dropdown.
- Adjust the optional extra reading time if needed, then save.
Configuration
| Field | Description |
|---|---|
| Policy Discussion | The discussion whose first post is monitored. |
| Exempt administrators | Admins skip the modal entirely. |
| Block guests | Show the modal to non-logged-in visitors too (confirmation stored in a 1-year cookie). |
| Estimated reading time | Computed automatically at ~200 wpm, rounded to 30 s. Read-only. |
| Extra reading time | Additional seconds added on top of the estimate. 0=estimate only. |
| Custom message | Override the default modal body text for all languages. HTML not allowed. |
Force re-confirmation
Click Reset all confirmations in the sidebar. All members will see the modal again on their next visit, regardless of whether the discussion was edited.
Preview
Click Preview modal to see the overlay exactly as a member would, without affecting your admin session.
Data storage
- Logged-in users — stored in
stockage/json/policyguard_confirmations.jsonas{ "users": { "<user_id>": <version_timestamp> } }. - Guests — stored in a browser cookie named
pg_confirmed(1 year,HttpOnly,SameSite=Lax). - Reading progress — stored in
sessionStorage(browser tab only, never sent to the server).
Hooks used
| Hook | Purpose |
|---|---|
router.plugins.register | Register /policyguard/confirm and admin routes. |
view.footer.content | Inject the overlay + toast HTML on every frontend page. |
post.updated | Detect first-post edits to auto-bump policy_version. |
plugin.view.admin.vars | Pass data to the admin view. |
Languages
English · Français · Deutsch · Português · 中文
Changelog
1.2.0 (2026-02-22)
- Fixed: Pop-up no longer shows on the target discussion — detection now uses the discussion ID from the URL path (
/d/{id}-) which is robust regardless of base URL, trailing slash, or pagination. - Fixed: Native Flatboard settings form (Image 2) no longer shows internal fields —
pluginsection inplugin.jsonis now empty, all config is handled exclusively via the custom admin view. - Improved: Admin tabs renamed to "Configuration" / "Status & Preview" for clarity.
1.1.0 (2026-02-22)
- New: Smart reading-time estimation from word count (~200 wpm, rounded to 30 s).
- New: Non-blocking reading toast replaces the blocking countdown overlay.
- New: Confirmation overlay reappears on the discussion page after the toast expires.
- New: SessionStorage persists remaining time across page reloads.
- Fixed: Hook changed from
discussion.updated(non-existent) topost.updated+ first-post detection. - Fixed: "Force re-confirmation" block now uses explicit inline colour for light/dark theme compatibility.
- Fixed: Removed duplicate
form_configentries fromplugin.json. - Improved:
reading_secondsreplacescountdown_seconds; admin configures extra time on top of estimate. - Improved: Admin view shows estimated time, total time, and a live preview of the reading-total info block.
1.0.0 (2026-02-22)
- Initial release.
Edited on Feb 23, 2026 By Fred .