create new tag
, view all tags
I was looking at CommentPlugin and thinking about what PeterMasiar said in AutomatedWebNotifyRegistration. While I agree with him about the feature being unnecessary, I think that his comments about the complexity cost of adding more ways to automatically edit a topic really ought to be addressed. As more and more people use TWiki, I'm sure they will want more and more ways to edit topics, and to be able to automate some of their more common tasks. I was wondering whether we could generalize the concept of the savecomment script.

I'm thinking of a script that will take a topic name, some POSTDATA form contents, and a hidden field specifying what type of edit this is. It will check for edit permissions, load up the topic in question, look up a special "automated edit" function based on the hidden parameter, and pass the current topic contents and all form data into that function. The function will interpret the form data, modify the topic, and either return the modified topic, or save it with TWiki::Store and return some kind of status.

This is all rather elaborate, but what I hope to make it do is make it simple to write a large number of "filter" type things that modify topics in specific ways. AutomatedWebNotifyRegistration would be a trivial example, but you could also do things like AutomatedTopicReformatting, ServerSideSearchAndReplace (with regexes or any syntax you like, regardless of browser), and (and this is the idea) many other things that I'm miles away from even thinking about doing.

-- WalterMundt - 16 Jan 2003

All these are server-side actions that get to write to the topic between the topic being edited by the user and it being saved to the topic, with a possible preview step for the user to check what the result is going to look like.

I think that this can be generalised into a ParsePipeline, such that plugins get a hook to do work before the text is finalised.

-- MartinCleaver - 16 Jan 2003

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2008-08-25 - TWikiJanitor
  • 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-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.