taikonauten / kirby-page-lock-plugin

MIT License
25 stars 2 forks source link

kirby-page-lock-plugin

Version License Kirby Version

Kirby plugin tracking what pages users are editing at the moment. It warns other users who try to edit the same page at the same time to prevent potential data loss.

Installation

  1. Clone or download this repository.
  2. Unzip the archive if needed and rename the folder to page-lock.

Make sure that the plugin folder structure looks like this:

site/plugins/page-lock/

By default this plugin uses the cache folder site/cache to store tracking information. Make sure that it is writable by PHP.

Options

There is no configuration needed, this plugin works out of the box.

Following options can be set in your config files:

// file location where to store tracking information
// needs to be writable by PHP
c::set(
  'plugin.pagelock.editinglogpath',
  $kirby->roots()->cache() . DS . 'page-lock.json');

// cooldown after which a page is released (in seconds)
// activity is reported every 10 seconds
c::set('plugin.pagelock.cooldown', 20);

--

'made with ♡ by Taikonauten'