{"id":16926118,"url":"https://github.com/pedroborges/kirby-page-lock","last_synced_at":"2025-03-23T17:30:50.462Z","repository":{"id":127635388,"uuid":"56114815","full_name":"pedroborges/kirby-page-lock","owner":"pedroborges","description":"⬢ Page Lock helps prevent content loss by putting a temporary lock on pages being edited on the Panel.","archived":false,"fork":false,"pushed_at":"2019-06-12T01:19:22.000Z","size":971,"stargazers_count":29,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-16T17:59:06.044Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pedroborges.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-13T02:37:42.000Z","updated_at":"2023-11-14T14:29:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"be14770a-e82c-499c-aeea-f525018fcaac","html_url":"https://github.com/pedroborges/kirby-page-lock","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedroborges%2Fkirby-page-lock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedroborges%2Fkirby-page-lock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedroborges%2Fkirby-page-lock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedroborges%2Fkirby-page-lock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pedroborges","download_url":"https://codeload.github.com/pedroborges/kirby-page-lock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245140758,"owners_count":20567444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T20:29:05.729Z","updated_at":"2025-03-23T17:30:50.450Z","avatar_url":"https://github.com/pedroborges.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kirby Page Lock\n[![Release](https://img.shields.io/github/release/pedroborges/kirby-page-lock.svg)](https://github.com/pedroborges/kirby-page-lock/releases) [![Issues](https://img.shields.io/github/issues/pedroborges/kirby-page-lock.svg)](https://github.com/pedroborges/kirby-page-lock/issues)\n\nPage Lock helps prevent content loss by placing a temporary lock on pages being edited on the Kirby's Panel. It supports multilingual sites out of the box by locking each page language individually.\n\n[![Preview of the Page Lock Plugin for Kirby CMS](https://raw.githubusercontent.com/pedroborges/kirby-page-lock/master/preview.gif)](https://github.com/pedroborges/kirby-page-lock)\n\nA helpful message with editor's name is displayed on locked pages. Additionally, the plugin protects the content by:\n\n- Removing the save button\n- Disabling keyboard shortcuts\n- Making input fields read-only\n- Disabling drag-and-drop sorting\n- Removing action buttons\n- Removing the files widget\n\n\u003e Unfortunately Page Lock can't 'disable' all third-party custom fields. Be aware some these custom fields may still be edited even when the page is locked.\n\n## Requirements\n- Kirby 2.3.2+\n- PHP 5.4+\n\n## Installation\n\n### Download\n[Download the files](https://github.com/pedroborges/kirby-page-lock/archive/master.zip) and place them inside `site/plugins/page-lock`.\n\n### Kirby CLI\nKirby's [command line interface](https://github.com/getkirby/cli) is the easiest way to install the Page Lock plugin:\n\n    $ kirby plugin:install pedroborges/kirby-page-lock\n\nUpdating couldn't be any easier, simply run:\n\n    $ kirby plugin:update pedroborges/kirby-page-lock\n\n### Git Submodule\nYou can add the Page Lock as a Git submodule.\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cstrong\u003eShow Git Submodule instructions\u003c/strong\u003e 👁\u003c/summary\u003e\u003cp\u003e\n\n    $ cd your/project/root\n    $ git submodule add https://github.com/pedroborges/kirby-page-lock.git site/plugins/page-lock\n    $ git submodule update --init --recursive\n    $ git commit -am \"Add Page Lock plugin\"\n\nUpdating is as easy as running a few commands.\n\n    $ cd your/project/root\n    $ git submodule foreach git checkout master\n    $ git submodule foreach git pull\n    $ git commit -am \"Update Page Lock plugin\"\n    $ git submodule update --init --recursive\n\n\u003c/p\u003e\u003c/details\u003e\n\n## Basic Usage\nDue to a limitation in Kirby's Panel, this plugin makes use of [Form Fields](https://getkirby.com/docs/panel/blueprints/form-fields) in order to load a script on each page while it's being edited.\n\nTo make the installation process smoother, Page Lock registers a clone of the `title` field. Since most pages define a `title` field on the [blueprint](https://getkirby.com/docs/panel/blueprints), you may not even need to do any configuration on your own.\n\n```yaml\ntitle:\n  label: Title\n  type: title\n```\n\nWhen using the `title` field you can disable Page Lock on a single blueprint by setting the `lock` field option to `false`:\n\n```yaml\ntitle:\n  label: Title\n  type: title\n  lock: false\n```\n\n\u003e If you need to globally disable the `title` field that ships with Page Lock, set the `page-lock.title` option to `false`.\n\nIn case you don't need a `title` field on your blueprint, you can use the `lock` [global field](https://getkirby.com/docs/panel/blueprints/global-field-definitions) to enable the plugin on it.\n\n```yaml\nlock: lock\n```\n\nThe above is a shorthand for:\n\n```yaml\nlock:\n  type: lock\n```\n\n## Option\nThe following options can be set in your `/site/config/config.php`:\n\n### `page-lock.interval`\nTime in seconds that opened pages notify the plugin they are still being edited. This affects the time the page is unlock after the editor leaves it. Defaults to `10` seconds.\n\n```php\nc::set('page-lock.interval', 10);\n```\n\n### `page-lock.title`\nEnables/disables Page Lock clone `title` field. Defaults to `true`.\n\n```php\nc::set('page-lock.title', true);\n```\n\n## FAQ\n### How can I test Page Lock on my site?\nFirst make sure there at least two registered users. In your browser, login into Kirby's Panel with `user1` then navigate to a page that either has a `title` or `lock` field defined in the corresponding blueprint. Login with `user2` using a private window or another browser then open the same page. You should see a red box saying: _user1 is editing this page._\n\n## Change Log\nAll notable changes to this project will be documented at: \u003chttps://github.com/pedroborges/kirby-page-lock/blob/master/CHANGELOG.md\u003e\n\n## License\nPage Lock plugin is open-sourced software licensed under the [MIT license](http://www.opensource.org/licenses/mit-license.php).\n\nCopyright © 2017 Pedro Borges \u003coi@pedroborg.es\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedroborges%2Fkirby-page-lock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpedroborges%2Fkirby-page-lock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedroborges%2Fkirby-page-lock/lists"}