[pmwiki-users] Re: Per-group subdirectories in wiki.d/

chr at home.se chr at home.se
Tue Jun 14 14:07:53 CDT 2005


On Tue, 14 Jun 2005, Patrick R. Michaud wrote:

> On Tue, Jun 14, 2005 at 10:19:11AM -0500, Jeremy Sproat wrote:
> > In http://www.pmwiki.org/wiki/PmWiki/FlatFileAdvantages , you describe
> > that it's possible to subdivide wiki.d/ into subdirectories according
> > to page group.  How is this done?  Is it in beta?  Is there a
> > straightforward way to convert an existing pmwiki to this mode, or is
> > it best done with a new wiki?
> 
> Sorry, I actually thought I had written this up as a cookbook recipe
> already.

Um... have you done so now? 

> Essentially, to get per-group subdirectories for pages one adds the 
> following line to config.php:
> 
>     $WikiDir = new PageStore('wiki.d/$Group/$FullName');
> 
> The admin must then move the existing page files in wiki.d/ into
> the appropriate per-group subdirectories (and make sure that
> each per-group subdirectory has appropriate file permissions).
> 
> A somewhat easier mechanism for migrating is to rename the wiki.d/
> directory to "wiki-flat.d", then use the following in config.php:
> 
>     $WikiDir = new PageStore('wiki.d/$Group/$FullName');
>     $WikiLibDirs = array( &$WikiDir,
>       new PageStore('wiki-flat.d/$FullName'),
>       new PageStore('$FarmD/wikilib.d/$FullName'));
> 
> This will cause PmWiki to continue to use any pages existing in
> wiki-flat.d/ (the old wiki.d/), but any newly created or edited
> pages are saved in the new wiki.d/ in per-group subdirectories.

Couldn't we use the "apply-to-all-pages"-function together with a 
method that "re-saves" a page? That ought to save the page to the proper 
place.

/Christian

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr





More information about the pmwiki-users mailing list