A lightweight Joomla system plugin that allows your Terms of Service (or any other legal document) to remain accessible even when your site is in offline/maintenance mode.
✅ Simple & Lightweight - Just a single plugin, no component needed
✅ Native Joomla Integration - Uses standard Joomla articles and menus
✅ Slug-Based Access - Configure which menu slug remains accessible when offline
✅ Zero Database Impact - No custom tables or migrations
✅ Automatic Setup - Creates article, menu, and configuration automatically
✅ Enterprise Ready - Secure, scalable, and compliant with best practices
✅ Component View - Displays TOS without template chrome during offline mode
- Install the plugin - Upload and install the ZIP file
- Automatic setup - Plugin creates article and Legal menu automatically
- Pre-configured - Terms of Service is ready at
/terms-of-service - Visitors can view legal documents even during site maintenance
- Download the latest
plg_system_mokojoomtos-x.x.x.zipfrom Releases - In Joomla admin, go to System → Install → Extensions
- Upload the ZIP file
- That's it! The plugin automatically:
- ✅ Creates a Terms of Service article
- ✅ Creates a "Legal" menu type
- ✅ Creates a menu item with slug
terms-of-service - ✅ Enables itself
- ✅ Configures the slug automatically
Build scripts are being migrated to the scripts directory. For now, you can manually package the plugin:
- Copy files from
src/to a temporary directory - Create a ZIP archive of the contents
- The ZIP should contain:
mokojoomtos.php,mokojoomtos.xml,script.php,src/,language/, andadministrator/
Alternatively, download pre-built releases from Releases.
The plugin automatically creates everything during installation:
- ✅ Terms of Service article with sample content
- ✅ "Legal" menu type for organization
- ✅ Menu item with alias
terms-of-service - ✅ Plugin enabled and configured
No manual steps required!
If you prefer to create your own content:
- Go to Content → Articles → New
- Title: "Terms of Service"
- Add your terms content
- Save
- Go to Menus → Legal → Add New Menu Item
- Menu Item Type: Single Article
- Select your Terms article
- Menu Title: "Terms of Service"
- Alias:
terms-of-service(this is the slug!) - Save
- Go to System → Plugins → MokoJoomTOS
- Terms of Service Menu Slug:
terms-of-service - Status: Enabled
- Save
- Set site offline: System → Global Configuration → Site Offline = Yes
- Visit
yoursite.com/terms-of-service- accessible! ✅ - Visit other pages - offline message appears ✅
The plugin has just ONE configuration field:
| Field | Description | Default |
|---|---|---|
| Terms of Service Menu Slug | The menu item alias that should remain accessible when site is offline | terms-of-service |
- Type: System Plugin
- Event:
onAfterRoute - Compatibility: Joomla 4.x, 5.x
- PHP: 7.4+
- Size: ~6.4 KB
- Files: 7
User requests: /terms-of-service
↓
Plugin checks: Is site offline?
↓ YES
Plugin checks: Does URL match configured slug?
↓ YES
Plugin sets: offline = 0 (temporarily, for this request only)
Plugin sets: tmpl = component (no template chrome)
↓
Joomla displays article content only
MokoJoomTOS/
├── src/ # Plugin source files
│ ├── mokojoomtos.php # Plugin entry point
│ ├── mokojoomtos.xml # Plugin manifest
│ ├── script.php # Installation script
│ ├── src/
│ │ ├── Extension/ # Modern namespaced plugin class
│ │ │ └── MokoJoomTOS.php
│ │ └── Field/ # Custom form fields
│ │ └── MenuslugField.php
│ ├── language/ # Site language files
│ │ ├── en-GB/
│ │ └── en-US/
│ └── administrator/ # Admin language files
│ └── language/
│ ├── en-GB/
│ └── en-US/
├── docs/ # Documentation
├── scripts/ # Build and utility scripts
├── README.md # This file
├── LICENSE # GPL-3.0 license
└── update.xml # Update server configuration
- Legal Requirement - Display Terms of Service during site maintenance
- Privacy Policy - Keep privacy policy accessible at all times
- Legal Notices - Regulatory compliance documentation
- Contact Information - Emergency contact during extended downtime
- Accessibility Statement - Maintain accessibility information
- Zero-touch installation: Installs and configures automatically
- Idempotent setup: Safe to run multiple times, checks for existing resources
- Auto-enable: Plugin activates itself after installation
- Legal menu organization: Creates dedicated "Legal" menu type for better structure
- Component-only view: Displays TOS without template chrome during offline mode (minimizes attack surface)
- SQL injection prevention: Uses Joomla's query builder with proper escaping
- Input sanitization: Overwrites malicious query parameters
- Access control ready: Supports Joomla ACL
- GPL-3.0 licensed: Enterprise-friendly open source license
- Lightweight: ~9KB zipped package
- Efficient event handling: Minimal overhead, early exit patterns
- No database impact: Uses native Joomla tables only
- High availability: No external dependencies
- Error logging: Uses Joomla's Log class
- Clear feedback: Installation success messages and status indicators
- Update server: Configured for automatic update notifications
- Professional support: Available from Moko Consulting
Q: Can I use it for Privacy Policy too?
A: The plugin supports one slug currently. You can create one article with both documents, or list both under a parent "legal" menu.
Q: Does it work with SEF URLs?
A: Yes! Works perfectly with Joomla's SEF (Search Engine Friendly) URLs.
Q: Can I use a different slug?
A: Absolutely! Any slug works - just match it with your menu item alias.
Q: Will it conflict with other plugins?
A: No, it's minimal and only acts during offline mode for the specific slug.
Q: Does it store content?
A: No! It uses your existing Joomla articles. No database tables needed.
- Joomla 4.0 or later
- PHP 7.4 or later
Build scripts are being migrated to the scripts directory. For now, you can manually package the plugin:
- Copy files from
src/to a temporary directory - Create a ZIP archive of the contents
- Name it
plg_system_mokojoomtos-{version}.zip
The installable ZIP should contain: mokojoomtos.php, mokojoomtos.xml, script.php, src/, language/, and administrator/ directories.
Alternatively, download pre-built releases from Releases.
- Build the plugin using the method above
- Install in Joomla test instance
- Create test article and menu item with alias
- Configure plugin with that alias
- Set site offline in Global Configuration
- Test accessing the configured slug URL
GNU General Public License v3.0 or later
See LICENSE file for details.
Moko Consulting
- Website: https://mokoconsulting.tech
- Email: hello@mokoconsulting.tech
Contributions are welcome! Please submit Pull Requests.
File issues at: GitHub Issues
- ✅ Fixed template chrome loading issue
- ✅ Component-only view now properly applied in offline mode
- ✅ Event hook changed from onAfterInitialise to onAfterRoute
- ✅ Initial release
- ✅ Slug-based offline access
- ✅ Single configuration field
- ✅ Multi-language support (en-GB, en-US)
- ✅ Joomla 4.x and 5.x compatibility
Made with ❤️ by Moko Consulting