DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:nodisp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:nodisp [2021-07-26 19:41] – [The syntax for the second case] turnermmplugin:nodisp [2023-10-30 23:24] (current) Klap-in
Line 6: Line 6:
 email      : turnermm02@shaw.ca  email      : turnermm02@shaw.ca 
 type       : syntax type       : syntax
-lastupdate : 2021-06-05 +lastupdate : 2022-09-14 
-compatible : 2009-02-14lemminganteaterrincewindanguaadora bellehrun, Elenor Of Tsort, detritusfrusterick mannersgreebohogfather+compatible : Lemming, Anteater, Rincewind, AnguaAdora BelleWeatherwaxBinkyPonder StibbonsHrunDetritus, Elenor of Tsort, Frusterick MannersGreeboHogfatherIgor
 depends    :  depends    : 
 conflicts  conflicts 
Line 59: Line 59:
 ''acl'' is the numeric representation of the acl level which is required for the marked off text to be output to the browser.  In other words the viewer must be logged in and have ''acl'' rights for the page in order for the marked up text to be included in the page.  So, for example, with ''<nodisp 8>'' the viewer must have upload permission or greater for the namespace where the page appears; with ''<nodisp 2>'', the viewer must have edit permission or greater for the page, etc.  ''acl'' is the numeric representation of the acl level which is required for the marked off text to be output to the browser.  In other words the viewer must be logged in and have ''acl'' rights for the page in order for the marked up text to be included in the page.  So, for example, with ''<nodisp 8>'' the viewer must have upload permission or greater for the namespace where the page appears; with ''<nodisp 2>'', the viewer must have edit permission or greater for the page, etc. 
  
-It's possible to have several ''nodisp'' blocks on a page, each with a different ''acl'' level, so that the current user might have access to one section of text and not another. For example, the user might have write permission ((acl 2)) for a page but not create permission for its namespace.  ''<nodisp 2>'' would mark off a passage which this user could view, but ''<nodisp 4>'' would mark off one which this user does not have access to. A user with create permission for page's namespace ((acl 4)) would have access to both.  +It's possible to have several ''nodisp'' blocks on a page, each with a different ''acl'' level, so that the current user might have access to one section of text and not another. For example, the user might have write permission ((acl 2)) for a page but not create permission for its namespace.  ''<nodisp 2>'' would mark off a passage which this user could view, but ''<nodisp 4>'' would mark off one which this user does not have access to. A user with create permission for page's namespace ((acl 4)) would uhave access to both.  
 The ACL levels are described in the [[:acl#background_info|acl documentation]].  The ACL levels are described in the [[:acl#background_info|acl documentation]]. 
  
 +==== Newline syntax ====
 +<code>
 +{nodisp} your text here {/nodisp}
 +
 +{nodisp}
 +your text here
 +etc
 +{/nodisp}
 +
 +{nodisp acl} your text here {/nodisp}
 +
 +{nodisp acl}
 +your text here
 +etc
 +{/nodisp}
 +</code>
 +The ''<nodisp. . . >'' syntax sets off blocks of text. If you place two blocks, one after the other, there will be a paragraph break between the two.  The newline syntax treats the enclosed text as a single line unless an extra newline (CR/LF) or the DokuWiki newline markup is inserted. This conforms to the practice of the DokuWiki editor. If you place one newline entry above another, they will continue on the same line unless a newline is inserted. See https://github.com/turnermm/nodisp/issues/3
 +
 +If you are upgrading from an earlier version of nodisp, which does not support the newline syntax, you will have to remove the file syntax.php from the root directory of the plugin.  This is now replaced by a new file called basic.php in the syntax directory. 
 +
 +==== Group Syntax ====
 +It is also possible to limit access to the hidden material by group. The syntax is the same as for the other cases, except that ACL numbers are replaced by a group names. 
 +
 +<code>
 +<nodisp group>
 +Restricted Data
 +</nodisp>
 +
 +{nodisp group}Restricted Data{/nodisp} 
 +</code> 
  
-The ''<nodisp. . . >'' syntax set off blocks of text.  There  is now a newline syntax in developmentwhich sets off individual lines.  See https://github.com/turnermm/nodisp/issues/3+**Notice:** The group name does not use the at-sign; it is ''group'', not ''@group''.  
 ===== Development ===== ===== Development =====
  
plugin/nodisp.1627321267.txt.gz · Last modified: 2021-07-26 19:41 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