[pmwiki-users] Automatically create new sites [repost]
Hans
design5 at softflow.co.uk
Tue Feb 10 08:00:16 CST 2009
Tuesday, February 10, 2009, 1:36:40 PM, Peter wrote:
> This is so easy, one should just add it to the dataplates.php description!
just do it, its a wiki!
> 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.
set $SerialStart in config.php.
After 9999 comes 10000. etc.
The leading zeros are there so page swill list nicely, at least from
0000 till 9999, after that it gets a little messier when using a
default sort.
The leading zeros are added in the function in powertools.php with
return sprintf("%0{$len}d",$n+1);
which returns a formatted number.
I think if you set $SerialStart to 00001 you get five digit numbers,
if you set it to 1 it will start with one digit numbers.
Maybe you need to tweak this for your liking.
Cheers,
Hans
More information about the pmwiki-users
mailing list