Clone
6
Installation
Jonathan Miller edited this page 2026-05-21 22:23:27 -05:00

← Back to Home

Installation

Step-by-step guide to installing the MokoJoomTOS offline access plugin for Joomla.

Requirements

Requirement Minimum
Joomla 5.0 or later
PHP 8.1 or later
Database None required (uses native Joomla tables)
  1. Download the latest plg_system_mokojoomtos-XX.YY.ZZ.zip from the Releases page
  2. In Joomla admin, go to System > Install > Extensions
  3. Upload the ZIP file
  4. Done -- the plugin automatically:
    • Creates a Terms of Service article with sample content
    • Creates a "Legal" menu type
    • Creates a menu item with alias terms-of-service
    • Enables itself
    • Configures the slug parameter

No manual configuration is needed after installation.

Build from Source

# Clone the repository
git clone https://git.mokoconsulting.tech/MokoConsulting/MokoJoomTOS.git
cd MokoJoomTOS

# Package the plugin
cd src/
zip -r ../plg_system_mokojoomtos.zip \
    mokojoomtos.php \
    mokojoomtos.xml \
    script.php \
    src/ \
    services/ \
    language/ \
    administrator/

Then install the resulting ZIP through Joomla admin as described above.

What the Installer Creates

The script.php installer runs postflight() on first install and automatically provisions:

Resource Details
Article Title "Terms of Service", alias terms-of-service, published, public access, in Uncategorised category
Menu Type "Legal" menu type for organizing legal documents
Menu Item Links to the article with alias terms-of-service, published, component view with suppressed template chrome
Plugin State Automatically enabled after installation

The installer is idempotent -- it checks for existing resources before creating duplicates.

All table operations use the Joomla bind() → check() → store() workflow (never save()) to avoid PrepareDataEvent type errors.

Verify Installation

  1. Set your site offline: System > Global Configuration > Site Offline = Yes
  2. Open an incognito/private browser window
  3. Visit yoursite.com/terms-of-service
  4. The Terms of Service article should display (without full site template)
  5. Visit any other page -- the offline message should appear

Update Server

The plugin checks for updates via updates.xml hosted on the main branch of the Gitea repository:

https://git.mokoconsulting.tech/MokoConsulting/MokoJoomTOS/raw/branch/main/updates.xml

Updates can be applied through System > Update > Extensions in the Joomla admin.

Update Channels

Joomla's update channel setting controls which versions are offered:

Channel Version Format Example
Stable XX.YY.ZZ 04.01.00
RC XX.YY.ZZ-rc 04.01.00-rc
Beta XX.YY.ZZ-beta 04.01.00-beta
Alpha XX.YY.ZZ-alpha 04.01.00-alpha
Development XX.YY.ZZ-dev 04.01.00-dev

See Update Server for full details on how the update stream is generated.

Upgrade from Earlier Versions

If upgrading from a version prior to 04.01.00:

  1. Download the latest release ZIP
  2. Install via System > Install > Extensions (Joomla handles upgrades automatically)
  3. Existing configuration (slug settings) is preserved
  4. The installer will not recreate articles or menu items that already exist

Uninstallation

  1. Go to System > Manage > Extensions
  2. Search for "mokojoomtos"
  3. Select the plugin and click Uninstall

Note: Uninstalling the plugin does not remove the article or menu item it created. Remove those manually if desired.



Repo: MokoJoomTOS · moko-platform

Revision Date Author Description
3.0 2026-05-21 Moko Consulting Add services/ to build, update channels, upgrade notes
2.0 2026-05-16 Moko Consulting Update requirements to 5.x/PHP 8.1+, update server references
1.0 2026-05-09 Moko Consulting Initial version