====== Publish Plugin ====== ---- plugin ---- description: An approval/draft system (aka. sighted revisions) for DokuWiki author : Andreas Gohr email : dokuwiki@cosmocode.de type : action, syntax lastupdate : 2022-09-08 compatible : Hrun, Greebo, Hogfather, Igor depends : conflicts : similar : approve tags : moderation downloadurl: https://github.com/cosmocode/dokuwiki-plugin-publish/zipball/master sourcerepo: https://github.com/cosmocode/dokuwiki-plugin-publish/ bugtracker: https://github.com/cosmocode/dokuwiki-plugin-publish/issues ---- This plugin was originally written by [[dokuwiki@rrod.net|Jarrod Lowe]] [[https://www.cosmocode.de/en/open-source/dokuwiki-plugins/|{{ https://www.cosmocode.de/static/img/dokuwiki/dwplugins.png?recache|A CosmoCode Plugin}}]] ===== Download and Installation ===== Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually. ==== Changes ==== {{rss>https://github.com/cosmocode/dokuwiki-plugin-publish/commits/master.atom date}} ===== Details ===== The idea behind this plugin is to differentiate between revisions of a document that are in draft state and those that are approved. A user with ''delete'' or ''admin'' permissions can mark a revision as approved while editing. Anyone else gets their revision marked as draft. Users with ''read'' permissions will see approved revisions only. The plugin places a banner at the top of each page, with information about the Approval/Draft status. It may contain notes like: * This version (//date//) is a **//Draft//** * This version (//date//) was **//Approved//** by //user// * The __Most Recent Version__ of this document is a draft (Diff) * The __Previously Approved Version__ (//date//) is available (Diff) * This version is Outdated by a __Newer Approved Version__ (Diff) The banner is colour-coded: Green for the latest approved version, and Red for all others. The Old Revisions page is colour-coded: Green for approved versions, and Red for drafts. The Recent Changes page is colour-coded: Green for approved versions, and Red for drafts. ===== Approval ===== A user with sufficient permissions (AUTH_DELETE or AUTH_ADMIN) can Approve a page. They do so by clicking the approve link on the publish banner. ===== Finding pending changes ===== Placing the tag ''%%[APPROVALS]%%'' into a page will give a table listing pages which are: * In one of the namespaces where publish operates, and * the latest version is a draft, and * you have sufficient permission to approve it You can limit it to certain namespaces with ''%%[APPROVALS:namespace]%%'' You may need to add ''%%~~NOCACHE~~%%'' to the page. ===== Configurations ===== The plugin can be configured using the configuration manager. ^ Option ^ Meaning ^ | apr_namespaces | Only use the plugin on the given namespaces | | no_apr_namespaces | Do not use the plugin on the following namespaces | | number_of_approved | Minimal number of approves before a page is considered approved (more are always possible) | | hide drafts | Hides unapproved pages from user who can not approve the page | | hidereaderbanner | Hide banner to read only users | | hide_approved_banner | Hide banner on approved pages | | author groups | Groups who can see drafts. Split multiple groups by space | | internal note | Custom text note on unapproved pages | | delete attic on first approve | delete all old revisions on first approval | | send_mail_on_approve | If a revision is approved send an email to the editor of this revision | | apr_mail_receiver | If page is changed send an email to this address, informing about the change and asking for approval | | apr_approved_text | Default approved marker | ===== Display Revision ====== By default, a user with AUTH_EDIT or better will see the latest revision of a page, if they do not specify which revision they want. However, someone with only AUTH_READ will see the latest approved revision by default (unless there isn't one). All users with AUTH_READ or better can still view any revision of a page if they specifically request it -- whether or not it is approved. ===== Found a bug, have a question? ===== Please report bugs to the [[https://github.com/cosmocode/dokuwiki-plugin-publish/issues|bugtracker]]. Questions can be asked in the [[https://forum.dokuwiki.org/forum/5|forum]] or the [[https://github.com/cosmocode/dokuwiki-plugin-publish/issues|bugtracker]].