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:
- Debug plugin: (See output in
data/debug.txt)
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:
Plugin Info
Related Topics:
-- MS - 14 Jan 2004