[pmwiki-users] create certain pages in shared store by default
Patrick R. Michaud
pmichaud at pobox.com
Mon Mar 6 15:50:09 CST 2006
On Mon, Mar 06, 2006 at 04:22:44PM -0500, Bronwyn Boltwood wrote:
> I've created a shared writable directory (exalted.d) for a wikifarm.
> I need all pages created in certain groups to be stored in exalted.d
> instead of wiki.d, and it has to work when clicking a create page link
> from pages in groups stored in wiki.d.
Try this (untested)...
In farmconfig.php (or config.php if a field), set:
# always search both the wiki.d and exalted.d directories for pages,
# with preference given to exalted.d/
$WikiLibDirs = array(
$pagename = ResolvePageName($pagename);
$group = PageVar($pagename, '$Group');
# save Exalted pages in exalted.d/ instead of wiki.d/
if ($group == 'Exalted')
$WikiDir = new PageStore('exalted.d/$FullName');
As I said, this is untested, so I don't know how well it will
work in practice. But it seems like it should work.
More information about the pmwiki-users