_PREVIEW_TOKEN

The constant _PREVIEW_TOKEN allows to share a preview url.

  • New in : SPIP 3.0

The constant _PREVIEW_TOKEN allows an author to share their preview rights. They can communicate a specific url that gives access to the preview without the need to be authenticated.
This url allows access to the preview page during a time interval ranging (by default) from 12 hours to 24 hours [1].

By default, this constant is not defined.

For this possibility to be taken into account it is necessary to define the constant _PREVIEW_TOKEN in your file config/mes_options.php (see the article which is dedicated).

Example :

// share the preview of an article in progress
// with visitors who have been given a specific url.
define('_PREVIEW_TOKEN', true);

The token generated with _PREVIEW_TOKEN is only valid for a specific URL.

Footnotes

[1The preview duration depends on the constant [_RENOUVELLE_ALEA and varies between 1 and 2 times the value of this constant.

Author jack Published : Updated : 14/07/23

Translations : English, français, Nederlands