DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:underconstruction

UNDER CONSTRUCTION plugin

Compatible with DokuWiki

2009-02-13

plugin Marks a page to be UNDER CONSTRUCTION - no one else except you, the admins and persons with higher rights can see these pages.

Last updated on
2008-08-25
Provides
Syntax, Action

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Tagged with hide, maintenance, moderation

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

Download and install the plugin using the Plugin Manager using the URL given above. Refer to Plugins on how to install plugins manually. For detailed information and download instructions 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. — HaraldHarald
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 <gweissbach@inetsoftware.de>
	*/
	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. — HaraldHarald
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

AlbrechtAlbrecht

2014/02/28 22:17

plugin/underconstruction.txt · Last modified: 2015-04-04 05:49 by PatrickBrown