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

Peter Lutz dreiaugen at gmx.de
Tue Feb 10 07:42:51 CST 2009

Am Tue, 10 Feb 2009 11:16:16 +0000
schrieb Hans <design5 at softflow.co.uk>:
> 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:

It's powertools I needed! It seems to work pretty fine.

With dataplates enabled you automatically get a template form to fill your database whenever you create a fitting page with the database name as group. Say, the database is labeled TABEL1 inside pmwiki (actually, the name dataquery.php refers to), then it's like this:

[[{(serialname TABLE1)}?action=edit|New Entry in Database]]

The mySQL Database I feeded with this then becomes like this:

ID	all my pretty stuff
1	...
2	...

Of course this is not really neat because the ID numbering is not a real database index, but I don't care.

This is so easy, one should just add it to the dataplates.php description! 

There's only one minor bad thing: serialname counts 4 digits, so what happens when you reach 9999? It was stated that changes can be made in config.php, but how? Also it would be shinier could it be counting w/o showing the zeros.

> (:input form :)
Of course with a button it looks nicer!


More information about the pmwiki-users mailing list