This is an old revision of the document!
Table of Contents
nodisp Plugin
Compatible with DokuWiki
2009-02-14,lemming,anteater,rincewind,angua,adora belle,hrun,detritus
Installation
Download syntax.php from the source code below and install it in the folder: plugins/nodisp
Refer to Plugins on how to install plugins manually.
Examples/Usage
This plugin has two ways of concealing text from unauthorized users.
- In the first case, it conceals text from all viewers except users who are logged in and belong to either the admin or manager group. The text is still on the page, but not displayed.
- In the second case, an acl level is set and if the viewer does not have an acl level equal to or greater than acl setting, the text is completely removed from the page. It is not output from the server to the browser.
Syntax
The syntax for the first case
<nodisp> your text here </nodisp> <nodisp> your text here etc </nodisp>
The syntax for the second case
<nodisp acl> your text here </nodisp> <nodisp acl> your text here etc </nodisp>
acl
is the numeric representation of the acl level which is required if the marked off text will by output to the page. These levels are described in the acl documentation. So, for example, with <nodisp 8>
the viewer must have upload permission or greater, with <nodisp 2>
edit permission or greater, etc.
Development
Change Log
- Updates version after merging group into master (2022-09-14 16:35)
- refactors the code for processing groups (2022-09-14 01:26)
- update_version (2022-09-12 04:51)
- Adds support for groups to action.php for removal of data in dokuwiki… (2022-09-11 17:52)
- Further refactoring. Simplificates assigning levels. (2022-09-07 18:08)
- 2016-01-16 by Michael Hamann
- Fix method signature compatibility for PHP 7.0
- 2013-02-14 by Michael Hamann
- Cache is automatically disabled now, no need for ~~NOCACHE~~ anymore
- The plugin uses a
<div>
-Element now as it had the paragraph typestack
anyway which meant that a new paragraph was opened inside the plugin and thus the plugin worked on block level and using a<span>
-element produced invalid HTML. - Allows more syntax (paragraphs, lists, tables, …) inside the plugin
Known Bugs and Issues
Can you add this warning in the description of your plugin? Thanks. The page source is always visibile clicking the “show pagesource” button. — anto1945 2013/07/22 07:25
This is true for all the plugins which “hide” material. The only way to get true hiding is to use the include plugin. See the forum for this thread: https://forum.dokuwiki.org/post/39559