[pmwiki-users] sorting booklists alphabetically, numerically

John Rankin john.rankin at affinity.co.nz
Thu Feb 2 18:36:13 CST 2006


On Friday, 3 February 2006 12:57 PM, malexism at free.fr wrote:
>(Since John come back)
>
>John Rankin a écrit :
>> If you decide to give the recipe a try, let me know how you
>get on...
>
>Hello,
>
>I have installed WikiForms, without Markup Extension cookbook, as you
>explain. All seems ok but...
>
>I install the cookbook only for one group (include in a group.php in
>/local/). This group have other pages in it. I can create a page with
>the (:wikiform:) directive, and the list with (:wikilist:). But the form
>generate only one page called 00016. A new page replace the first one,
>with the same name...
>May be the group sould be empty ?

Is there a link I can look at, preferably with

  $EnableDiag = 1;

Several things puzzle me about what you are seeing:
- the form generates page 00016; I wonder why it doesn't make 00001

  do any of the existing pages start with a digit, such as 7Up?
  that might explain it

- the form always generates 00016; I wonder why it doesn't make 00017

Can you test it with a new group, empty except for a FormTemplate,
and NewEntry form page? Does this produce the same behaviour?

Do you have any other recipes installed which might be colliding
with wikiforms?

You could try the following test. In wikiform.php, change

foreach(ListPages("/^$g\\.\\d/") as $i)
    $record = max (@$record,substr($i,strlen($g)+1));

to

foreach(ListPages("/^$g\\.\\d/") as $i) {
    $record = max (@$record,substr($i,strlen($g)+1));
    echo "$record $i ";
}

Then go to the NewEntry page, fill in the form and press Submit.
You should see a list of the pages it finds and what it thinks 
is the biggest number, followed by a preview of the new page. 
You do not need to save the preview.

Hope this helps.
>
>thx.
>marc
>-- 
>M.Alexis.M
>http://www.malexism.com/
>


-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list