nearata/flarum-ext-maintenance-mode

Customizable maintenance mode

Installs: 1 587

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

Type:flarum-extension

1.0.0 2023-04-29 10:25 UTC

This package is auto-updated.

Last update: 2024-11-29 13:59:14 UTC


README

Customizable maintenance mode

Install

composer require nearata/flarum-ext-maintenance-mode:"*"

Update

composer update nearata/flarum-ext-maintenance-mode:"*"
php flarum cache:clear

Remove

composer remove nearata/flarum-ext-maintenance-mode
php flarum cache:clear

How to use

Switch the Maintenance Mode in the extension settings page.

With a command

php flarum nearataMaintenanceMode:toggle <true or false>

With API endpoint

PATCH /api/nearata/maintenanceMode/enabled
{
  "value": true or false
}

if the body is empty, it will be evaluated as false.

An empty response is returned either way.

How to style

To change the style of the page, there's no other way but to override the file itself.

Follow the below link to see a how-to:

https://docs.flarum.org/extend/views/#overriding-views

How to bypass maintenance

If you have permissions to bypass the maintenance mode, you can run the below command to generate a link to login in a authorized user.

Assure you are in the Flarum root folder:

php flarum nearataMaintenanceMode:auth <user_id>

Note

  • If the database is inaccessible, this situation is not handled.