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

John Rankin john.rankin at affinity.co.nz
Mon Apr 28 23:16:05 CDT 2003


> 2. $LinkPatterns again
> I discovered another problem with including a $LinkPatterns to format=20
> Group/Title as a wikilink in local.php. If a URL contains a page=20
> reference, such as http://www.pmichaud.com/.../Main/WikiSandbox, the=20
> local LinkPatterns gets in before the URL formatting. I can think of=20
> 3 solutions:
> - modify pmwiki.php to include ($GroupNamePattern)[.\\/]($=
PageTitlePattern)=20
> at the end of $LinkPatterns, with an $EnableGroupTitleLinks parameter=20
> in local.php
> - have pmwiki.php look for a file called local/linkpatterns.php after=20
> it has set the other link patterns
> - split $LinkPatterns into $URLLinkPatterns and $PageLinkPatterns

Actually, I'm looking for a more general solution than the ones listed
above--I'm trying to figure out a way to control the order of items in
the LinkPatterns array.  I have a few ideas, but nothing leaps out at me
yet.  I'll probably solve it later tonight or tomorrow sometime.

--
I thought about that. The best idea I came up with was that you don't =
actually have to control the order of all items, just the exceptions. So I =
thought of an array that basically says 'evaluate this pattern after this =
one', eg

$LinkPatternPredecessors["\\b($GroupNamePattern)[.\\/]($PageTitlePattern)"]=
 =3D $WikiWordPattern;

says process Group/Page patterns after you process WikiWords. Then it =
would shuffle the $LinkPatterns array to make sure the predecessor rules =
are followed... But I didn't see how to avoid possible circular =
dependencies.

Taking it a bit further (I don't know the syntax),
$LocalLinkPatterns["\\b($GroupNamePattern)[.\\/]($PageTitlePattern)"]=3D$=
FmtWikiLink,$WikiWordPattern;

says use how to format it and to format it after WikiWords.

JR






More information about the pmwiki-users mailing list