ShortURLPlugin
The "Short URL TWiki Plugin" allows to shorten long URLs from something like
http://twiki.org/cgi-bin/view/Main/WebHome to
http://twiki....ebHome. This plugin aims to improve table rendering of long links if the data is provided by a database. Note that only URLs where the URL text matches the "href:" attribute are altered. That means all wiki words are unaffected by this plugin.
Syntax Rules
Not applicable, there is no syntax you need to embed into your twiki pages.
Examples
Not applicable, see note under Syntax Rules.
Plugin Settings
Plugin settings are stored as preferences variables. To reference a plugin setting write
%<plugin>_<setting>%, i.e.
%NEWPLUGIN_SHORTDESCRIPTION%
- One line description, shown in the TextFormattingRules topic:
- Set SHORTDESCRIPTION = This plugin does shorten URLs to a user specifiable length.
- Your can disable the pugin:
- Debug plugin: (See output in
data/debug.txt):
- Set DEBUG = 0 ( 1 = debug enabled, 0 = debug disabled )
- This parameter allows to set the length the URL is shortened to:
- Set URLMAXLENGTH = 16 (number of characters long URLs are shortened to)
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
ShortURLPlugin.zip in your twiki installation directory. Content: | File: | Description: |
data/TWiki/ShortURLPlugin.txt | Plugin topic |
data/TWiki/ShortURLPlugin.txt,v | Plugin topic repository |
lib/TWiki/Plugins/ShortURLPlugin.pm | Plugin Perl module |
data/Main/ShortURLPlugin.txt | Plugin Test and demo page |
- 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:
- If you want to run the plugin only on specific pages you can disable it
* Set DISABLEDPLUGINS = ShortURLPlugin on the TWikiPreferences and then enable it on the local page with another =* Set DISABLEDPLUGINS = instruction.
Plugin Info
Related Topics: TWikiPlugins,
DeveloperDocumentationCategory,
AdminDocumentationCategory,
TWikiPreferences
--
TWiki:Main.KarlKaiser - 08 Jun 2007