2017 © Pedro PelĆ”ez
 

craft-plugin craft-maintenance

Maintenance plugin for Craft CMS

image

carlcs/craft-maintenance

Maintenance plugin for Craft CMS

  • Thursday, September 7, 2017
  • by carlcs
  • Repository
  • 1 Watchers
  • 68 Stars
  • 88 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 2 Open issues
  • 10 Versions
  • 2 % Grown

The README.md

Maintenance plugin for Craft CMS

screenshot, (*1)

The plugin provides tools to help you do maintenance on your Craft CMS website:, (*2)

Installation

The plugin is available on Packagist and can be installed using Composer. You can also download the [latest release][2] and copy the files into craft/plugins/maintenance/., (*3)

$ composer require carlcs/craft-maintenance

Maintenance Announcements

Set up maintenance announcements or messages from the pluginā€™s settings page. You can use markdown to add links, or to format the message. To configure scheduled maintenance you have to set a start date in the announcementā€™s settings and enable ā€œBackend Maintenanceā€ and/or ā€œFrontend Maintenanceā€., (*4)

Create a new ā€œMaintenance Announcementsā€ widget to display all notifications on the usersā€™ Dashboards. Upcoming maintenance will also be announced with a banner notification., (*5)

Maintenance Modes

When backend maintenance mode is active, users navigating the Control Panel will be shown a full screen ā€œMaintenance in progressā€ overlay. It informs them about the undergoing maintenance, in order to prevent from useless data entry., (*6)

The frontend maintenance mode redirects all (frontend) requests to /503, your ā€œservice unavailableā€ page. You can exclude URLs from being redirected and whitelist visitor IP addresses in the plugin settings., (*7)

Note: the plugin doesnā€™t do ā€œcontent freezeā€ in a way, that it actually prevents data from being saved or changed in the database. That being said, there are template variables and plugins API provided., (*8)

Settings

The plugin can be configured from a craft/config/maintenance.php config file or from Settings/Maintenance., (*9)

In Settings/Users you can assign user permissions to configure the ā€œMaintenance in progressā€ overlay or to grant access for individual user groups while frontend maintenance is carried out., (*10)

Template Variables

The plugin provides template variables to get the active announcement model, or to check whether the site is currently undergoing maintenance., (*11)

isCpMaintenance

Returns whether the Control Panel is currently undergoing maintenance., (*12)

{{ isCpMaintenance ? 'Shop closed' : '<a href="/shop">Shop</a>' }}

isSiteMaintenance

Returns whether the site is currently undergoing maintenance., (*13)

{% set reason = isSiteMaintenance ? 'scheduled' : 'unscheduled' %}

getAnnouncement( timeInAdvance )

Returns the latest, either currently active or soon to be activated maintenance announcement., (*14)

{% set announcement = craft.maintenance.getAnnouncement('2 hours') %}

{% if announcement and announcement.blockSite %}
    <span>{{ announcement.message }}</span>
{% endif %}

Planned features

  • Quick set up maintenance via environment variable

The Versions

07/09 2017

dev-master

9999999-dev

Maintenance plugin for Craft CMS

  Sources   Download

The Requires

 

07/09 2017

v1.2.3

1.2.3.0

Maintenance plugin for Craft CMS

  Sources   Download

The Requires

 

26/02 2016

v1.2.2

1.2.2.0

Maintenance plugin for Craft CMS

  Sources   Download

The Requires

 

26/02 2016

v1.2.1

1.2.1.0

Maintenance plugin for Craft CMS

  Sources   Download

The Requires

 

26/02 2016

v1.2.0

1.2.0.0

Maintenance plugin for Craft CMS

  Sources   Download

The Requires

 

25/02 2016

v1.1.1

1.1.1.0

Maintenance plugin for Craft CMS

  Sources   Download

The Requires

 

25/02 2016

v1.1.0

1.1.0.0

Maintenance plugin for Craft CMS

  Sources   Download

The Requires

 

24/02 2016

v1.0.2

1.0.2.0

Maintenance plugin for Craft CMS

  Sources   Download

The Requires

 

23/02 2016

v1.0.1

1.0.1.0

Maintenance plugin for Craft CMS

  Sources   Download

The Requires

 

23/02 2016

v1.0.0

1.0.0.0

Maintenance plugin for Craft CMS

  Sources   Download

The Requires