[Pmwiki-users] multiple pmwiki-data-dirs

Patrick R. Michaud pmichaud
Fri Sep 24 08:01:32 CDT 2004


On Fri, Sep 24, 2004 at 02:39:56PM +0200, Knut Alboldt wrote:
> Target:
> 
> I'm thinking of different fields in a wiki-farm and one "virtual" 
> wiki-field containing all the fields for a global search-implementation and 
> for using one common wiki with global-pages at the end of the path (just 
> before the installed pages) (ok they will be only R/O within other fields).
> 
> Problem:
> 
> Is it possible to define more that 2 wiki-data-dirs ?

Sure--this is exactly why $WikiLibDirs exists.  You have it right in
the statement:

> $WikiLibDirs = array(&$WikiDir,"somewhere/wiki.d","$FarmD/wikilib.d");
> 
> in config.php, completely overwriting the pmwiki-setting, but I think that 
> wouldn't be a good idea if the statement will be changed in future within 
> pmwiki.php.

It's not likely to be a problem.  You can also do

   $WikiLibDirs = array("somewhere/wiki.d",&$WikiDir,"$FarmD/wikilib.d");  #2

or

   $WikiLibDirs = array(&$WikiDir,"$FarmD/wikilib.d","somewhere/wiki.d");  #3

The first has the advantage that the pages in somewhere/wiki.d 
are truly read-only even for the other wikis.  You can also do either
of the above without overwriting the pmwiki setting, by doing:

   array_unshift($WikiLibDirs,"somewhere/wiki.d");   # same as #2 above
or
   array_push($WikiLibDirs,"somewhere/wiki.d");      # same as #3 above

> Isn't there a better solution ? e.g. using
>    $WikiDirs[] = &$WikiDir;
>    $WikiLibDirs = array(&$WikiDirs,"$FarmD/wikilib.d");
> in pmwiki.php so you can add
>    $WikiDirs[] = "somemore/wiki.d";
> in the config.php and could still overwrite $WikiDir.

I suppose--this just seems like overkill to me.  $WikiLibDirs really
has not changed much since I put it in (pmwiki-0.2!), and it has never 
changed in a way that would cause existing installations to break,
even with the scenario you pose above.

> another question:
> Could I possibly also use URL's as wiki-data-references within 
> $WikiLibDirs, if I open up the wiki.d-directory for reading by a web-client 
> ("allow all" within .htaccess)  ? This way it would be possible to define 
> "virtual" wiki's for a global search within wiki's reachable only via http.

Ummm, you lost me on this one.

Pm



More information about the pmwiki-users mailing list