[pmwiki-users] Automatically create new sites [repost]

Hans design5 at softflow.co.uk
Tue Feb 10 05:16:16 CST 2009


Tuesday, February 10, 2009, 10:29:36 AM, Peter Lutz wrote:

> this is a repost. I don't want to annoy anyone, I am just in need
> of an answer. And thankful of course for anything. I don't even know
> if the problem is too easy or too difficult and therefore neglected.

well you did :-) I gave you a detailed answer with good leads to
follow. You are ignoring it for reasons not explained. Till you do
there is nothing more I can add, but perhaps others can.
If you need  more detailed help you need to explain where you get
stuck. If you need professional help you can ask.

Here is my answer repeated, I added more to the first paragraph:


Could you could use a form button? The user presses a button to go
to editing a new page, pre-filled from a template.
After editing, the form gets saved with a Name and a serial number
added automatically to it. If you use a database as page store, it
will be saved there as a new record.

See http://www.pmwiki.org/wiki/Cookbook/EditTemplates
about templates for new pages. There is also a form example, which
you could change a bit to your purpose.

See http://www.pmwiki.org/wiki/Cookbook/PowerTools#serialname
for a serialname and a serial markup expression, as part of the
PowerTools collection of expressions.

Install powertools.php and try something like this:

(:input form :)
(:input hidden action edit:)
(:input hidden template MyTemplates.NewPageTemplate:)
(:input hidden pagename "{(serialname Test Name- )}":)
(:input submit create "Create new page":)
(:input end:)




  ~Hans




More information about the pmwiki-users mailing list