DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:nodisp

This is an old revision of the document!


nodisp Plugin

Compatible with DokuWiki

2009-02-14,lemming,anteater,rincewind,angua,adora belle,hrun,detritus

plugin Hide text from view except from admin or manager

Last updated on
2018-03-01
Provides
Syntax
Repository
Source

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 condition, ifauth, ifauthex, isauth, showif

Tagged with acl, comment, conceal, hide

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.

  1. 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.
  2. 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

  • 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 type stack 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
plugin/nodisp.1551456787.txt.gz · Last modified: 2019-03-01 17:13 by turnermm

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