[pmwiki-users] automatic page titles (aless)

John Rankin john.rankin at affinity.co.nz
Tue Aug 5 20:49:25 CDT 2008

>From: aless <alessors at gmail.com>
>Subject: Re: [pmwiki-users] automatic page titles (aless) - working!
>Hello John,
>Thank for the very detailed explanation. I had a look at the 
>MakePageName function both in the old spacenames.php and in the current 
>pmwiki.php, but I'm afraid my very limited programming skills are not 
>enough to do what you suggest. :-)

I'll see what I can come up with, but it probably won't be until
the weekend.
>I guess that to post it as a new recipe, it would be nice to have both 
>naming scheme recognized, but for my personal use I can just 
>rename/delete the pages that come preinstalled with PmWiki. They are not 
>that many, anyway, only the ones that have spaces in the link:
>[[PmWiki/Documentation Index]] <= not recognized as an existing
>[[PmWiki/PmWikiPhilosophy]] <= recognized as an existing page
The trouble is that a lot of the pages in PmWiki group include
links with spaces in them, and every time a new release comes
out, you may get more. So it's probably best to fix the root
cause if possible, rather than patching existing pages.
>The modified page naming scheme I posted in another message of this 
>thread doesn't work with non-latin characters, tried a link with some 
>thai text and got: ?invalid page name.
>The problem is in the new $NamePattern that we modified to accept ~ as a 
>valid character in page names:
>$NamePattern = '[[:upper:]\\d][\\w]*(?:[-~]\\w+)*';
>I think we should add the range of unicode charcaters \\x80-\\xfe to the 
>name pattern. Now, where and how... I don't know :-)
>  alessandro
$NamePattern   = '[\\w\\x80-\\xfe]+(?:[-~][\\w\\x80-\\xfe]+)*';
$PageNameChars = '-~[:alnum:]\\x80-\\xfe';

(based on scripts/xlpage-utf-8.php)

John Rankin
Affinity Limited
T 64 4 495 3737
F 64 4 473 7991
john.rankin at affinity.co.nz

More information about the pmwiki-users mailing list