====== UNDER CONSTRUCTION plugin ======
---- plugin ----
description: Marks a page to be UNDER CONSTRUCTION - no one else except you, the admins and persons with higher rights can see these pages.
author : i-net software / Gerry Weißbach
email : tools@inetsoftware.de
type : syntax, action
lastupdate : 2008-08-25
compatible : 2009-02-13
depends :
conflicts :
similar :
tags : maintenance, moderation, hide, !obsolete
downloadurl: https://www.inetsoftware.de/_media/other-products/dokuwiki-plugins/underconstruction/underconstruction.tgz
bugtracker : http://www.inetsoftware.de/support/e-mail-support-accounts
donationurl:
----
====== ATTENTION ======
This plugin is quite out of date. Please do not use it with other versions than the one specified as compatible. --- The Author.
===== Description =====
You have your closed wiki, with read-only permissions to the rest of the world. You (and maybe some friends) are the only ones to edit pages. But DokuWiki does not offer a by-edit-option to mark a page as internal or draft or under construction to hide it away from everyone else.
===== How does it work =====
**Adding:**\\
If the ~~UNDERCONSTRUCTION~~ is put on a page, the plugin adds two rules to the acl when saving.
* It sets permissions for group @ALL for the page to AUTH_NONE.
* At the same time it sets the permissions for the last editor to AUTH_WRITE.
In effect the page becomes invisible for everybody except the last editor. Admins will still be able to see the page. The rules are flagged with #UNDERCONSTRUCTION to distinguish them from other rules.
**Deleting:**\\
When ~~UNDERCONSTRUCTION~~ is deleted on the page the two ACL-rules are removed. Because the rules are flagged no other entries are affected.
Of course changes to the ACL through the interface will affect these permissions just normally; you have to be aware of this.
===== Syntax =====
Enter **~~UNDERCONSTRUCTION~~** anywhere in the page to hide it for others.\\
In the editor there is also a toolbar button available to enter the command at the current cursor position.
===== Download and Installation =====
Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
For detailed information and download instructions [[http://inetsoftware.de/other-products/dokuwiki-plugins/underconstruction|see the home page]].
===== Bugs =====
==== Rewrite saving acl.auth.php ====
It doesn't work properly with Adora Belle due to miswriting of acl.auth.php.
A simple fix is substitute the row:
return io_saveFile(DOKU_CONF.'acl.auth.php', join(' ',$new_config));
with:
return io_saveFile(DOKU_CONF.'acl.auth.php', implode("\n",$new_config));
in the ''helper.php'' file in plugin folder.
I found this fix led to double returns in Angua. --- [[user>harald|Harald]] //2013/11/01 10:45//
==== Edit Button Code does not work====
* Replace the complete function _moretoolbarbuttons in action.php with this code
/**
* Add a Toolbar Button for The UNDERCONSTRUTION Construct
*
* @author Gerry Weissbach
*/
function _moretoolbarbuttons(&$event, $args) {
if ( $this->getConf('reviewmode') ) { return; }
$event->data[] = array (
'type' => 'insert',
'title' => $this->getLang('underconstruction'),
'icon' => '../../plugins/underconstruction/images/underconstruction.gif',
'insert' => '~~UNDERCONSTRUCTION~~',
);
}
* Create lang.php yourself at ./lang/en/lang.php and add
$lang['underconstruction'] = "Under Construction";
This should do it. Otherwise a really nice and simple idea. A little dangerous because people can easily hide pages from other readers (without even realizing possibly). An administrator may have to regularly scan for hidden pages. --- [[user>harald|Harald]] //2013/11/01 10:47//
At least in Binky this plugin overwrites any ACL definded by
Access Control List Management
Reason is a malformed conf/acl.auth.php
--- [[user>Albrecht|Albrecht]] //2014/02/28 22:17//