Tags:
access_control1Add my vote for this tag create new tag
, view all tags

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:

  1. 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)
    • Set DEBUG = 0

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:
    • enter samples here

Plugin Info

Plugin Author: TWiki:Main.IanBygrave
Copyright: © 2006, TWiki:Main.IanBygrave
License: GPL (GNU General Public License)
Plugin Version: 15 Feb 2006 (V1.000)
Change History:  
15 Feb 2006: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.024
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
Benchmarks: GoodStyle nn%, FormattedSearch nn%, SnibPlugin nn%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/SnibPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/SnibPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/SnibPluginAppraisal

Related Topics: TWikiPlugins, DeveloperDocumentationCategory, AdminDocumentationCategory, TWikiPreferences

-- TWiki:Main.IanBygrave - 15 Feb 2006

Topic attachments
I Attachment History Action Size Date Who Comment
Compressed Zip archivezip SnibPlugin.zip r1 manage 5.9 K 2006-02-15 - 23:08 IanBygrave  
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2007-04-10 - IanBygrave
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.