This question about Missing functionality: Answered
I would like to have a single HTML form that generates a topic tree of about six different topics. The user would enter a wikiname into the form and the new topics would have topic names based on the name entered by the user. For example:
When the user clicks the button, NewNameHome is created along with NewNameOne, NewNameTwo ... which are children of NewNameHome
I have already written a script that can generate the topic tree by calling save from the command line, makeing use of existing templates; however, I have been unable to call this script from the form and still have the save command work.
Perhaps I am approaching this problem the wrong way.
--
ChrisPurves - 03 Jun 2009
Either use javascript code (probably XHR, which triggers some /bin/save urls) or write a plugin, that does the job on the server side. The native Foswiki does not have this functionality.
--
OliverKrueger - 03 Jun 2009
We use the
TopicCreatePlugin to do something similar. When the user submits a form, it calls the save script with a template. In that template are a set of
%TOPICCREATE{ ... }%
macros that go off and create a number of other topics based on other templates.
--
AndrewJones - 04 Jun 2009
I thought this plugin was dumped due to a significant security hole (back in the old tmwiki times already)?! Was that hole fixed?
--
OliverKrueger - 04 Jun 2009
Erm maybe, since when I ported it to Foswiki I re-wrote a lot of the code to use
Foswiki::Fuc
. What was the security hole? Can you point me at any topics on twiki.org that mentions it?
We have been using it on a company intranet for years without any problems.
--
AndrewJones - 04 Jun 2009
Andrew, I used your TopicCreatePlugin as you suggested and was able to get it to do what I wanted. Thank you.
--
ChrisPurves - 04 Jun 2009