[pmwiki-users] shared pages and skin-specific pagestores

Bronwyn Boltwood arndis at gmail.com
Sat Aug 13 16:08:50 CDT 2005


On 8/13/05, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Sat, Aug 13, 2005 at 05:52:18AM -0400, Bronwyn Boltwood wrote:
> > I tested it on a wikifarm that is set up to share pages found in
> > wikifarm/wiki.d using
> >
> > $WikiLibDirs = array(&$WikiDir,
> >   new PageStore('$FarmD/wiki.d/$FullName'),
> >   new PageStore('$FarmD/wikilib.d/$FullName'));
> >
> > from Cookbook.UseCommonPagesInAWikiFarm.
> >
> > I found that the pages from $FarmD/wiki.d overruled the ones from
> > $PukkaPath/wikilib.d.  How can I change this, and will changing it
> > cause problems for others who will use the skin?
> 
> Well, I would normally expect locally-edited pages (in a wiki.d/
> directory) to override pages that come from a distribution such as
> PmWiki or a skin.

I did expect it to be overriden while in the shared field, because it
should take pages from the preferred store, with these stores in this
order:
1. wikifarm/wiki.d
2. pukka-core/wikilib.d
3. wikifarm/wiki.d
4. wikifarm/wikilib.d

What I didn't expect was for the skin's version to be overriden while
I was in a different field.  I thought the preference order was:

1. testing/wiki.d
2. pukka-core/wikilib.d
3. wikifarm/wiki.d
4. wikifarm/wikilib.d

But testing showed it was 

1. testing/wiki.d
2. wikifarm/wiki.d
3. pukka-core/wikilib.d
4. wikifarm/wikilib.d

> Most people are not likely to have the farm's wiki.d/ directory
> in their $WikiLibDirs, so they won't experience the problem you're
> seeing.  And for those that are reading from the farm's wiki.d/,
> I think they would expect their farm pages to override the skin
> pages.  So I think you're okay.  (An admin that wants the skin pages
> to override the farm's pages probably needs to explicitly set
> $WikiLibDirs, or copy the page files from the skin into wiki.d/
> somewhere.)

I think I agree that it is a feature, not a bug.  One more weird step
to add to the installation instructions, though.

> > Also, thinking ahead, are variables set in config.php automatically global?
> 
> Yes -- any variable in config.php is automatically global unless
> it's defined inside of a function (in which case it has to be
> explicitly declared global).

I thought so -- it explained how I could set $WikiTagline and have it
just work when the template wanted it.

Bronwyn




More information about the pmwiki-users mailing list