You are here: FS > TWiki Web > TestTopic3? > GuidPlugin r2 - 25 Feb 2004 - 14:24 - BruceDillahunty?


Start of topic | Skip to actions

GUID Plugin

This pluging is a blantant ripoff of TWiki:Plugins.UniqueIdPlugin by MS (THANKS!!!). I wanted a UniqueID generator that would generate standard GUID/UUID type IDs (guaranteed unique across machines, etc...)

I found the nice CPAN module of Data::UUID that takes care of all of this. This plugin is just a "wrapper" so that TWiki can call the perl module. You MUST have the perl module loaded first.

Syntax Rules

You Type You Getdown Comment
%GUID_ID% %GUID_ID% default is string type
%GUID_ID{type="bin"}% %GUID_ID{type="bin"}% binary representation
%GUID_ID{type="str"}% %GUID_ID{type="str"}% string representation
%GUID_ID{type="b64"}% %UNIQUE_ID{type="b64"}% base64
%GUID_ID{type="hex"}% %UNIQUE_ID{type="hex"}% hex

GuidPlugin 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 GUID unique ids

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

Plugin Installation Instructions

Like Michael, I'm leaving packaging up to somebody that really knows what they are doing, but this seems to work for me.

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 files below
  • Put them as follows
    File: Description:
    data/TWiki/GuidPlugin.txt Plugin topic
    data/TWiki/GuidPlugin.txt,v Plugin topic repository
    lib/TWiki/Plugins/GuidPlugin.pm Plugin Perl module
  • Test if the plugin is correctly installed:
    • (describe tests here)

Plugin Info

Plugin Author: TWiki:Main.BruceDillahunty
Plugin Version: 25 Feb 2004 (V1.000)
Change History:  
25 Feb 2004: Initial version
CPAN Dependencies: Data::UUID
Other Dependencies: none
Perl Version: 5.005
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/GuidPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/GuidPluginDev

Related Topics: TWikiPreferences, TWikiPlugins

-- TWiki:Main.BruceDillahunty - 25 Feb 2004

Edit | Attach | Printable | Raw view | Backlinks: Web, All webs | History: r2 < r1 | More topic actions
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding FS? Send feedback