[pmwiki-users] Variables in localmap.txt (Was: clean URLs for wikifarm in
chr at home.se
chr at home.se
Wed Mar 16 12:08:05 CST 2005
On Wed, 16 Mar 2005, Patrick R. Michaud wrote:
> On Wed, Mar 16, 2005 at 11:04:06AM +0100, chr at home.se wrote:
> > This reminded me... I think it'd be very useful if localmap.txt etc could
> > contain variables. The reason is that I have quite a few lines in my
> > localmap.txt, and when I wish to test it in another location, I have to
> > change *all* the lines manually...
>
> Is it sufficient if the variables are substituted at the time
> localmap.txt and other intermaps are loaded (as opposed to when
> the intermap links are actually generated)?
I think when loaded should be sufficient (as long as the load takes place
after config.php is executed of course).
> The syntax would likely be:
>
> Gallery $ThisSite/uploads/Gallery/$1
Oki doki
> Pm http://www.pmichaud.com/
>
> to always convert the bareword "Pm" into a link to http://www.pmichaud.com/
> wherever it occurs. In retrospect it would've been nice if localmap.txt
> had required the colon in the entries, to distinguish between the
> colon-required replacements and simple bareword substitutions, but it
> didn't happen that way, and I think converting to that format might cause
> a fair number of upgrade headaches... :-|
You could simply introduce a second file called e.g. interprefix.txt and
allow a different syntax in that one...
/Christian (who never really cared for the name localmap.txt)
--
Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list