transformation1Add my vote for this tag create new tag
, view all tags


Replace ##Tags## with text once, the replaced text is saved in the topic and the tag is removed.


This plugin looks for tags in the format of ##TypeOfReplace## and replaces it with the result of that particular tag. Designed to facilitate random features for an RPG TWiki. Once the topic is saved, the substitution happens, and the tag disapears. Rules and associated data are defined in RandomReplaceRules.

Syntax Rules


  • ##MonthNameExample##
  • ##Greetings##

Plugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %RANDOMREPLACEPLUGIN_SHORTDESCRIPTION%

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Replace ##Tags## with text once, the replaced text is saved in the topic and the tag is removed.

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

  • To include an HTML comment containing the original rule set REPLACEONCECOMMENT = 1

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

  • Download the ZIP file from the Plugin web (see below)
  • Unzip RandomReplacePlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/RandomReplacePlugin.txt Plugin topic
    data/TWiki/RandomReplacePlugin.txt,v Plugin topic repository
    data/TWiki/RandomReplaceRules.txt Plugin Rules topic
    data/TWiki/RandomReplaceGoodByes.txt Example topic containing data
    lib/TWiki/Plugins/RandomReplacePlugin.pm Plugin Perl module
    pub/TWiki/RandomReplaceRules/month.txt Example attached text file
  • Test if the installation was successful:
    • ##Howdy##
    • ##MonthName##
    • ##GoodBye##

Plugin Info

Plugin Author: TWiki:Main.ScottParrish
Copyright: © 2005 TWiki:Main.ScottParrish
© 2005-2010 TWiki:TWiki.TWikiContributor
License: GPL (GNU General Public License)
Plugin Version: 2010-12-14 (V1.1)
Change History:  
2010-12-14: TWikibug:Item6530: Doc improvements, changing TWIKIWEB to SYSTEMWEB -- TWiki:Main.PeterThoeny
2005-10-24: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.024
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
TWiki:Plugins/Benchmark: GoodStyle nn%, FormattedSearch nn%, RandomReplacePlugin nn%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/RandomReplacePlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/RandomReplacePluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/RandomReplacePluginAppraisal

Related Topics: TWikiPreferences, TWikiPlugins

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatmd5 RandomReplacePlugin.md5 r1 manage 0.2 K 2010-12-15 - 07:09 PeterThoeny  
Compressed Zip archivetgz RandomReplacePlugin.tgz r1 manage 5.9 K 2010-12-15 - 07:09 PeterThoeny  
Compressed Zip archivezip RandomReplacePlugin.zip r2 r1 manage 8.4 K 2010-12-15 - 07:09 PeterThoeny  
Unknown file formatEXT RandomReplacePlugin_installer r1 manage 3.5 K 2010-12-15 - 07:09 PeterThoeny  
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2013-10-16 - PeterThoeny
  • 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-2016 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.