r17 - 27 Dec 2006 - 03:31:53 - MarcusLeonardYou are here: TWiki >  Plugins Web > GlobalReplacePlugin > GlobalReplacePluginDev
Tags:
, create new tag

GlobalReplacePluginDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on GlobalReplacePlugin contributed by the TWikiCommunity.
• Please let us know what you think of this extension.
• For support, check the existing questions, or ask a new support question in the Support web!
• Please report bugs below

Feedback on GlobalReplacePlugin

I packaged and released this Plugin for PaulineCheung. We created this Plugin at work because we had to do some large scale refactoring of content.

Please enjoy this Plugin smile

This Plugin is an example of how to manipulate topics without a standalone script. All is done by the commonTagsHandler of the Plugin, called from the viewauth script. The CommentPlugin and others that depend on standalone scripts could/should be changed the same way.

-- PeterThoeny - 08 Feb 2004

I observed that in GlobalSearchAndReplace, the WebForm is messed up. I assume that this is as a result of something that is entered in that page. You might want to check whether it has to do with some HTML generated by the plugin.

This looks like a great feature. There appears to be some overlap with the search and replace after topic moves, maybe we can factor this commonality out (might require making this plugin part of core functionality)?

-- ThomasWeigert - 08 Feb 2004

Web form: This is because the Plugin is not installed and that topic contains a %TABLE{}% without a table, thus formatting the form below. I added an extra table.

Search overlap: Yes, it makes sense to move the existing topic rename funtionality out of lib/TWiki/Search.pm into a separate module, or even into a Plugin that gets shipped with TWiki.

-- PeterThoeny - 08 Feb 2004

I like the concept of moving the entire search/topic rename/topic text replace into a separate Plugin module. Oftentimes I have wished the the topic rename could be changed to act a little differently - packaging this as a Plugin, maybe even one that overrides a very simple implementation in a core module (is this called "overloading"?) would allow a TWiki admin to turn on/off advanced features per web, yet still keep some rudementary ones, modify the Plugin without endangering the core code, etc.

Just my thoughts.

-- SteveRJones - 09 Feb 2004

Nice functionality but I'd want to change it to operate across multiple webs. Anyone see any reason why not?

-- MartinCleaver - 18 May 2004

Reason? Time to implement, rather lack of smile

-- PeterThoeny - 20 May 2004

New version posted on Plugin topic with monir enhancement:

  • In replace string, added support for $topic token, useful to replace text with the name of the current topic.

-- PeterThoeny - 03 Nov 2004

.zip checked into CVSplugins:GlobalReplacePlugin

-- WillNorris - 23 Nov 2004

Thanks MikkoLaakso for adding the examples, should be taken into the next Plugin release.

-- PeterThoeny - 01 Nov 2005

The plugin doesn't work with usernames of this form: domain\username

-- CarterSmithhart - 28 Nov 2005

Please consider adding the use strict; pragma to this plugin. Its use is important to ensuring the quality of TWiki plugins and avoiding unpleasant surprises. See UseStrict for more.

-- MeredithLesly - 02 Jul 2006

In TWiki 4.0.2 I can use GlobalReplacePlugin to find fixed strings, but I can't get it to work with any regular expressions. I'm looking for text like "%CITE{text}%", much like the example in GlobalSearchAndReplaceHelp. I can find "CITE{.." but not "%CITE" or "CITE{.*". (I've used REs before, though I don't claim to be an expert.) In debug.txt, I noticed that handleGlobalReplace is receiving % as

%
and * as
*
- could this be part of the problem?

Any suggestions for how I might fix this?

-- ClifKussmaul - 24 Jul 2006

The regular expression problem seems to be in handleDecode(). It's looking for things like #037 but is receiving #37 (no leading 0). If I copy the set of patterns and remove the leading 0s, everything seems to work fine.

-- ClifKussmaul - 30 Jul 2006

Thanks Clif for the report. Note to myself: Check this Plugin with regex patterns on TWiki 4.

-- PeterThoeny - 03 Aug 2006

I'm using this on 4.0.5 and I'm getting the same behaviour as Clif cites above. Guess I'll be doing some scripting... frown

-- MarcusLeonard - 27 Dec 2006

 
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r17 < r16 < r15 < r14 < r13 | More topic actions
 
Powered by TWiki
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 TWiki? Send feedback SourceForge.net Logo