Skip to topic | Skip to bottom
Home
TWiki
TWiki.HiddenTextPluginr1.3 - 04 Oct 2003 - 09:18 - DonnyKurniawan?topic end

Start of topic | Skip to actions

Hidden Text Plugin

This is a plugin that you can use to hide a block of text in the edit page, so that the text cannot be edited or changed unless the user has the access permission. The text is still rendered in the view page.

Syntax Rules

  • %STARTHIDDEN% ... %ENDHIDDEN%
  • Text outside the %STARTHIDDEN% ... %ENDHIDDEN% is not hidden in the edit page, thus it can be edited like the normal way.
  • The access permission is controlled by the ALLOWTOPICHIDDEN preference variable. Only people listed in the ALLOWTOPICHIDDEN variable that can edit the hidden text. Obviously, the ALLOWTOPICHIDDEN variable must be set inside the %STARTHIDDEN% ... %ENDHIDDEN% so that a user who has write access (but not listed in the ALLOWTOPICHIDDEN) cannot change the variable.
  • Only one %STARTHIDDEN% ... %ENDHIDDEN% block in one topic.
  • We do not use any marker to tag the location of the %STARTHIDDEN% ... %ENDHIDDEN%, as a result of this hidden text block is always put at the top of the topic.

Examples

%STARTHIDDEN%

<!--
   * Restrict who can see/edit the hidden text
      * Set ALLOWTOPICHIDDEN = Main.JoeSomebody
-->

Hello World

%ENDHIDDEN%

HiddenTextPlugin Global Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, for example, %HIDDENTEXTPLUGIN_SHORTDESCRIPTION%

  • One line description, shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Hide a block of text in the edit page

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0

Plugin Installation Instructions

Note: The following instructions are for the administrator who installs the plugin on the server where TWiki is running.

  • Download the ZIP file from the Plugin web (see below)
  • Unzip HiddenTextPlugin.zip in your twiki installation directory. Content: | File: | Description: | | data/TWiki/HiddenTextPlugin.txt | Plugin topic | | data/TWiki/HiddenTextPlugin.txt,v | Plugin topic repository | | lib/TWiki/Plugins/HiddenTextPlugin.pm | Plugin Perl module |

Plugin Info

Plugin Author: TWiki:Main/DonnyKurniawan
Plugin Version: 04 Oct 2003 (V1.001)
Change History:  
04 Oct 2003: Change the syntax so that the hidden block can include '}%'
03 Oct 2003: Initial version
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/HiddenTextPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/HiddenTextPluginDev

Related Topics: TWikiPreferences, TWikiPlugins -- DonnyKurniawan? - 03 Oct 2003
to top


You are here: TWiki > HiddenTextPlugin

to top

Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback