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 is marked as obsoleted. Therefore it is hidden in the Extension Manager and the extension listing. Furthermore, it is candidate for removal.

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

Similar to daftdrafts

Tagged with !obsolete, 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

Search and install the plugin using the Extension Manager. 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. — 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. — 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

Albrecht 2014/02/28 22:17

plugin/underconstruction.txt · Last modified: 2018-06-06 00:19 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki