[Pmwiki-users] multiple pmwiki-data-dirs
Knut Alboldt
mailing
Fri Sep 24 08:54:17 CDT 2004
At 16:01 24.09.2004, you wrote:
>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.
If I understood you well, i.e. that even nowbody could change the global
pages in the $WikiDir-wiki, right ? (or it could be changed, but changed
would not be used) That's even better !
>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
oh yes, I didn't thought about that.
> > 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.
ok, then I'm setting it in config.php, I think that's the easiest way.
Thanks !
Would this be ok for using it in pmwiki2 :
$WikiLibDirs = array($WikiDir,new
PageStore('somewhare/wiki.d/$PageName'),new
PageStore('$FarmD/wikilib.d/$PageName'));
?
(sorry, i didn't explore that new version too much, still working on the
installation of pmwiki2 and customization of my old stuff)
> > 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.
Sorry, what does this mean ?
>Pm
Knut
More information about the pmwiki-users
mailing list