Skip to content

klxf/flarum-maintenance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maintenance Mode

License Latest Stable Version Total Downloads

A Flarum extension. Highly customizable maintenance mode.

Features

  • Enable/disable maintenance mode.
  • Customizable maintenance page with HTML support.
  • Only administrators can access the forum when maintenance mode is enabled.
  • PHP commands to enable/disable maintenance mode.

Installation

Install with composer:

composer require klxf/flarum-maintenance:"*"

Updating

composer update klxf/flarum-maintenance:"*"
php flarum migrate
php flarum cache:clear

Placeholders

You can use the following placeholders in the maintenance page:

  • $forumStyle - The forum's CSS styles.
  • $settings - The forum's settings.
    • Example: $settings->get('forum_title') for the forum title.
  • $url - Flarum URL Generator.
    • Example: $url->to('forum')->base() for the forum base URL.

Use Developer Tokens Bypass Maintenance Mode

If you enable maintenance mode, you can still access the forum using developer tokens.

Enabling the "Enable Token Authentication" setting allows you to access the forum using developer tokens even when maintenance mode is enabled.

You can authenticate and login to the forum using the following URL:

{$forum_base_url}/maintenance/auth/{$token}

Commands

Toggle Maintenance Mode

You can toggle maintenance mode using the following command:

php flarum maintenanceMode:toggle

Links

About

Highly customizable maintenance mode

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors