
Legal Notice
| Version | 1.2.0 |
| Type | Plugin |
| Category | Integrations |
| Author | Fred |
| License | GPL-3.0 |
| Flatboard | 5.2.0 |
Overview
LegalNotice adds a legal consent banner to the login and registration forms, along with two fully editable public pages — Terms of Use and Privacy Policy — available in all five forum languages.
The public pages are fully integrated into the Flatboard UX: they display the site banner (title, icon and breadcrumbs) through the native view.banner.data hook, exactly like EasyPages, without any core modification.
Features
- Consent checkboxes injected into the login and/or registration forms
- Server-side validation: submission is blocked if the user has not ticked both boxes
- Public pages at
/legal/termsand/legal/privacywith native banner integration (title + breadcrumbs) - Per-language content editor in the admin panel (fr, en, de, pt, zh)
- Default content pre-filled with real forum data (name, URL, contact email) — ready to use out of the box
- Optional footer links to the legal pages
- Four dynamic placeholders usable anywhere in the content:
%forum_name%— forum name from site configuration%site_url%— public URL of the forum%contact_email%— plugin contact email, falls back tosite_email(General Settings), then SMTP sender%last_updated%— date the page was last saved, or the plugin activation date for default content
- Reset any page to its default content with one click
- Live placeholder preview in the admin editor (shows actual current values)
Installation
The plugin is loaded automatically by Flatboard. No manual installation step is required.
Configuration
Go to Admin → Plugins → LegalNotice (or Admin → Legal Pages in the sidebar).
| Setting | Default | Description |
|---|---|---|
| Show on login form | ✅ | Displays the consent banner below the login form |
| Show on registration form | ✅ | Displays the consent banner below the registration form |
| Open legal pages in a new tab | ❌ | Legal page links open in a new browser tab |
| Legal contact email | (empty) | Used for %contact_email% — falls back to site_email, then SMTP sender if empty |
| Show links in the footer | ✅ | Adds Terms of Use and Privacy Policy links in the forum footer |
Placeholders
| Placeholder | Replaced with |
|---|---|
%forum_name% | Forum name (site_name config key) |
%site_url% | Public forum URL (site_url config key) |
%contact_email% | Plugin contact email → site_email → smtp.from_email (first non-empty value) |
%last_updated% | Date of last admin save, or plugin activation date for untouched default content |
Placeholders are substituted at display time only. The admin editor always shows raw placeholder text so you can reuse or adjust it freely.
Page Editor
The Page Editor tab lets you edit the title and HTML content of each legal page for each language independently. Supported HTML tags: <h2>, <h3>, <p>, <ul>, <ol>, <li>, <strong>, <em>, <a>, <br>.
A live preview at the top of the editor shows the actual values that will replace each placeholder.
Banner Integration
On /legal/terms and /legal/privacy, the plugin injects banner data via the view.banner.data hook (priority 20, after EasyPages). This sets:
bannerType = 'page'pageTitle— translated page titlepageIcon—fas fa-file-contract(terms) orfas fa-shield-alt(privacy)breadcrumbs— Home › Page title
No core files are modified. The hook fires after EasyPages (priority 10), so any global EasyPages banner is properly overridden on legal pages.
Public URLs
| Page | URL |
|---|---|
| Terms of Use | /legal/terms |
| Privacy Policy | /legal/privacy |
File Structure
plugins/LegalNotice/
├── LegalNoticePlugin.php # Boot, hook registration (incl. banner hooks)
├── LegalNoticeController.php # Public and admin routes
├── LegalNoticeService.php # Data access, placeholder substitution, getForumVars()
├── plugin.json # Plugin manifest and default settings
├── data/
│ └── pages.json # Saved custom page content + _meta.activated_at
├── langs/
│ ├── en.json
│ ├── fr.json
│ ├── de.json
│ ├── pt.json
│ └── zh.json
└── views/
├── admin.php # Admin editor view
└── page.php # Public legal page view (banner via hook)
Changelog
1.2.0 — 2026-03-16
- Banner integration via
view.banner.data/view.banner.contenthooks (priority 20)
— title, icon and breadcrumbs now displayed natively in the Flatboard banner - New placeholder
%site_url%— forum public URL auto-filled in default content - New placeholder
%last_updated%— auto-filled with last save date or plugin activation date - Email fallback chain: plugin setting →
site_email(General Settings) →smtp.from_email - Default content pre-filled with real forum data (links with
<a href="%site_url%">, mailto links) - Live placeholder preview in admin editor
- URL comparison now uses
UrlHelper::to()(base-path aware) - Banner hook priority 20 to properly override global EasyPages banners
1.1.0 — 2026-03-16
- Added
%site_url%placeholder support - Email fallback:
smtp.from_email→site_email getForumVars()method for admin preview
1.0.0 — 2026-03-12
Initial release
Edited on Mar 17, 2026 By Fred .