SnibPlugin
Embed protected content in public pages.
This Plugin is a Work In Progress. Don't install it unless you want to play with the code. |
Syntax Rules
Wrap anything you want to protect with
%STARTSNIB{
attributes }%
and
%ENDSNIB%
markers.
Multiple snibs are allowed in a topic.
A snib may continue over multiple lines.
The following attributes are recognised:
Name |
Description |
ALLOWVIEW |
Who sees it. If the user isn't authorized to see it, the alternate text (ALT ) is shown. |
DENYVIEW |
ALLOWCHANGE |
Who can edit it. For sanity, this should be a subset of who can see it. If the user can view it but not edit it, render as an opaque tag in edit. |
DENYCHANGE |
ALT |
What an unauthorized user sees in place of the protected content. If no ALT attribute is given, nothing is displayed in its place. |
Examples
%STARTSNIB{ALLOWVIEW="Main.IanBygrave" ALT="I love fluffy kittens!!!"}
My plans for world domination:
- Buy a white cat,
-
%ENDSNIB%
Plugin Settings
Plugin settings are stored as preferences variables. To reference a plugin setting write
%<plugin>_<setting>%
, i.e.
%NEWPLUGIN_SHORTDESCRIPTION%
- One line description, is shown in the TextFormattingRules topic:
- Set SHORTDESCRIPTION = Embed protected content in public pages.
- Debug plugin: (See output in
data/debug.txt
)
Plugin Installation Instructions
Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the TWiki server.
- Download the ZIP file from the Plugin web (see below)
- Unzip
SnibPlugin.zip
in your twiki installation directory. Content: File: | Description: |
data/TWiki/SnibPlugin.txt | Plugin topic |
data/TWiki/SnibPlugin.txt,v | Plugin topic repository |
lib/TWiki/Plugins/SnibPlugin.pm | Plugin Perl module |
- Configure the Plugin:
- TWiki 4.0 and up: Run the configure script to enable the Plugin
- Change the Plugin settings as needed
- Test if the installation was successful:
Plugin Info
Related Topics: TWikiPlugins,
DeveloperDocumentationCategory,
AdminDocumentationCategory,
TWikiPreferences
--
TWiki:Main.IanBygrave - 15 Feb 2006