[pmwiki-users] New Recipe: SerialPageNames

Hans design5 at softflow.co.uk
Tue Nov 13 05:59:14 CST 2007


I uploaded a recipe script serial.php to
http://www.pmwiki.org/wiki/Cookbook/SerialPageNames

This adds three new markup expressions:
* {(serialname Group Name)} -> if you have page Group.Name0007
                     the expression will return Group.Name0008
* {(serial Group Name)} -> if you have page Group.Name0007
                        the expression will return 0007
Using no Name part results in entirely numeric page names.
The $SerialStart variable sets the start (default is 0001), and can be
set to different length of digit strings, i.e. 001.

* {(newticket Group)} -> if you have page Group.20071113001
              the expression will return Group.20071113002
              increasing by one on the day, and increasing the date
              part on the next day, stating with a new serial part of
              001.

which can be used to calculate new serial page names.

I also updated Fox to handle markup expressions passed as replacement
variables, in order that the expression will only be evaluated when the
form is submitted, rather than when the page is loaded. This will
eliminate possible page naming conflicts if another person is
posting after the first person opened the page but before herself
submitting.
Download latest from http://www.pmwiki.org/wiki/Cookbook/Fox


  ~Hans   




More information about the pmwiki-users mailing list