Download the PHP package marionnewlevant/snitch without Composer

On this page you can find all versions of the php package marionnewlevant/snitch. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package snitch

Snitch plugin for Craft CMS 3.x

Snitch watches element editors (entry, category, global set, user, etc.) and field editors, and lets you know when someone else may also be editing the same thing at the same time.

Installation

To install Snitch, follow these steps:

  1. Install with Composer via composer require marionnewlevant/snitch from your project directory
  2. Install plugin in the Craft Control Panel under Settings > Plugins

or

  1. Install via the Plugin Store

Snitch works on Craft 3.x.

Snitch Overview

Snitch works by injecting a javascript file into backend pages. That javascript looks for an element edit window or a modal element edit window, and when it detects one, asks the server to report any collisions.

A warning banner appears at the top of the editor pane when someone else may be editing the same element:

A warning banner also appears at the top of editor modals:

Clicking the X will dismiss the banner.

Configuring Snitch

The default configuration can be overridden with a config file in craft/config/snitch.php. This is a standard Craft config file, with the usual multienvironment support. The configurable values are:

The visual look of the warning banners can be modifed with the cpcss plugin.

How it works.

Javascript (and css) is added to every backend page. That javascript fetches the configuration values, and then starts polling. Every 2 seconds, it looks for any edit forms on the page, and if it finds such a form, reports via ajax the type and the id of the element that the edit form is editing. In return, it is passed a list of possible collisions.

On the server, a database table (snitch_collisions) records

When the ajax call arrives reporting that an element is being edited, these things happen:

  1. Any report that has not been updated in 10 poll intervals is removed from the snitch_collisions table. It is no longer being edited.
  2. Either create a new report for this user/element type/element id, or update the time on the existing one
  3. Look for any edit reports of this element by other users.
  4. Return the user data from these reports. These will be other people who may be editing the element.

Issues

Snitch will fail to notice when one person is editing a Commerce product, and another is editing a variant of that product through a modal.

Brought to you by Marion Newlevant


All versions of snitch with dependencies

PHP Build Version
Package Version
Requires craftcms/cms Version ^3.5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package marionnewlevant/snitch contains the following files

Loading the files please wait ....