[Pmwiki-users] Some issues with the latest pmwiki release

Jonathan Scott Duff duff at pobox.com
Tue Apr 29 09:00:48 CDT 2003

On Tue, Apr 29, 2003 at 06:45:35AM -0500, Patrick R. Michaud wrote:
> Actually, another possibility is to make $LinkPattern into a 2 dimensional
> sparse array where the first index indicates the sequence number of the
> pattern.  PmWiki would store LinkPatterns similar to the following:
[ snip ]
> The number in the first brackets indicates the sequence order of the
> pattern.  Thus, to add the PageTitle pattern that you're wanting, you could
> add the following to local.php:
>   $LinkPatterns[65]["\\$GroupNamePattern([\\/.])$PageTitlePattern"] =
>     $FmtWikiLink;
> The 65 would cause this pattern to be inserted after the Group/WikiWord 
> pattern (60) but before the WikiWord pattern (70).  The actual numbers
> used are unimportant--they simply specify the ordering of the patterns.
> This seems like a fairly generic mechanism to provide control of the 
> LinkPatterns array without being too difficult to implement or explain.
> Comments, questions?  I'll want to hear comments in favor of or against
> this approach before continuing towards an implementation (which should
> be fairly easy).

Actually the numbers used are somewhat important if this is a feature
that PmWikiAdmins are likely to use heavily.  You don't want to
be too limited by the finite space between existing LinkPatterns.  I'd
suggest starting with 100, 200, 300, etc.  Or, alternatively, use
floating point numbers.

It would be interesting if there were an easy way to say "evaluate
this before/after that", but your method works great in lieu of that

Jonathan Scott Duff
duff at cbi.tamucc.edu

More information about the pmwiki-users mailing list