Skip to topic | Skip to bottom
Home
TWiki
TWiki.GlobalReplacePluginr1.3 - 21 Mar 2004 - 08:35 - PeterThoenytopic end

Start of topic | Skip to actions

Global Replace Plugin

The Global Replace Plugin is designed to:

  1. Search through topics with user supplied criteria
  2. Find strings within the topics found
  3. Provide a mechanism to pick and choose which hits will be replaced
  4. Replace the hit with a user supplied expressions

Please go to Global Search And Replace to perform a global replace operation.

Plugin Settings

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

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Global search and replace functionality across all topics in a web

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

Known Issues

  • This Plugin ignores locked topics, it writes over locked topics
  • This Plugin is potentially dangerous. Security measures:
    1. The operations of this Plugin is restricted to the group which can edit the TWikiPreferences (usually TWikiAdminGroup)
    2. For public sites, it is recommended to enable this Plugin only for the short time when needed (it is installed if the following variable shows "installed": installed)
  • This Plugin has been tested. However, it does not have ANY WARRANTY, does not even have the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE

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 GlobalReplacePlugin.zip in your twiki installation directory. Content: | File: | Description: | | data/TWiki/GlobalReplacePlugin.txt | Plugin topic | | data/TWiki/GlobalReplacePlugin.txt,v | Plugin topic repository | | data/TWiki/GlobalSearchAndReplace.txt | Search replace form topic | | data/TWiki/GlobalSearchAndReplace.txt,v | Its repository | | data/TWiki/GlobalSearchAndReplaceHelp.txt | Help topic | | data/TWiki/GlobalSearchAndReplaceHelp.txt,v | Its repository | | data/TWiki/GlobalSearchAndReplaceTopics.txt | Replace result topic | | data/TWiki/GlobalSearchAndReplaceTopics.txt,v | Its repository | | lib/TWiki/Plugins/GlobalReplacePlugin.pm | Plugin Perl module | | pub/TWiki/Plugins/GlobalSearchAndReplaceHelp/GSR.gif | Screenshot |
  • Test if the installation was successful:
    • Plugin is installed if the following variable shows "installed": installed
  • To disable the Plugin rename the lib/TWiki/Plugins/%TOPIC.pm file, or edit the file and return 0 in sub initPlugin.

Plugin Info

Plugin Author: TWiki:Main/PaulineCheung
Plugin Version: 16 Mar 2004 (V1.001)
Change History:  
16 Mar 2004: Fixed bug where topics with underlines did not get handled properly
07 Feb 2004: Initial version
CPAN Dependencies: none
Other Dependencies: TWiki:Plugins/SpreadSheetPlugin
Perl Version: 5.005
TWiki:Plugins/Benchmark: GoodStyle 99%, FormattedSearch 99%, Global Replace Plugin 99%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/GlobalReplacePlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/GlobalReplacePluginDev

Related Topics: TWikiPreferences, TWikiPlugins

-- TWiki:Main/PaulineCheung - 16 Mar 2004
to top


You are here: TWiki > GlobalReplacePlugin

to top

Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback