Tags:
create new tag
, view all tags

Unique Id Plugin

Syntax Rules

You Type You Get Sample
%UNIQUE_ID% %UNIQUE_ID% qaxpx8coah8aagzbbny
%UNIQUE_ID{type="env"}% %UNIQUE_ID{type="env"}% qaxpx8coah8aagzbbny
%UNIQUE_ID{type="time"}% %UNIQUE_ID{type="time"}% 1074122696
%UNIQUE_ID{type="time"}% %UNIQUE_ID{type="random"}% 822971
%UNIQUE_ID{type="time"}% %UNIQUE_ID{type="random" max="10"}% 7

UniqueIdPlugin Global Settings

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

  • One line description, shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Generates unique ids

  • Your own settings, for example:
    • Set EXAMPLE = got it!

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

Plugin Installation Instructions

This is just a demo plugin at present, I'm leaving packaging for someone else (It works perfectly fine however). I thought the source topics was getting silly when writing a plugin is quicker to write/follow than the several week discussion on such a simple idea.

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 server where TWiki is running.

  • Download the ZIP file from the Plugin web (see below)
  • Unzip UniqueIdPlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/UniqueIdPlugin.txt Plugin topic
    data/TWiki/UniqueIdPlugin.txt,v Plugin topic repository
    lib/TWiki/Plugins/UniqueIdPlugin.pm Plugin Perl module
  • Test if the plugin is correctly installed:
    • (describe tests here)

Plugin Info

Plugin Author: Main.MS
Plugin Version: 14 Jan 2004 (V1.000)
Change History:  
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
Plugin Home: Another site. Feedback via zathras@thwacketyPLEASENOSPAM.com
Feedback: Another site. Feedback via zathras@thwacketyPLEASENOSPAM.com

Related Topics:

-- MS - 14 Jan 2004

Topic attachments
I Attachment History Action Size Date Who Comment
Perl source code filepm UniqueIdPlugin.pm r1 manage 4.6 K 2004-01-14 - 22:55 UnknownUser Sample implementation. Might be useful to package up.
Topic revision: r1 - 2004-01-14 - MichaelSparks
 
  • 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.