[Pmwiki-users] Multiple Wiki's

Steven Leite steven_leite
Mon Apr 19 04:06:31 CDT 2004


Just had a few ideas pop in to my head about the multiple wiki's discussion
from a few weeks back.  I've started to gather quite a little collection of
(Pm)Wiki's on my localhost now.  I was looking at the directories and
thinking how many times I have to perform an upgrade if I wanted to update
them all at the same time.

Here's my thoughts.

1.  Each "wiki" should be contained in it's own folder (within the pmwiki/
folder).  You could go one better and have a folder called pmwiki/wikis/,
and store all the wiki's there.  Example:
pmwiki/wikis/Wiki1
pmwiki/wikis/Wiki2
etc..

2.  The current (location of) wiki.d and wikilib.d would remain (as
"defaults").

3.  Additional Wiki's would have their own wiki.d and (possibly) wikilib.d
folder to draw upon.  If they don't exist, then see point #2.

4.  All templates/css would be store in either:
  (a) pmwiki/pub/skins  (unchanged from where they're being stored right
now)
  (b) pmwiki/wikis/Wiki1/pub/skins  (an alternate location to store
templates specific to that Wiki.

I prefer option (a), because then all of the template files are in one
standard location, but shared across all the wiki's.  This means Wiki1 might
be able to have access to Wiki2 skins/templates (without having to make
copy's of the files).  One slight problem might occur if two wiki's share a
common template name, (default, or Main, or Home for example), but look and
act different.  That's where option (b) comes in.  Another possibility might
be to prefix the Template folder name with the name of the Wiki (similar to
the way the PageNames are currently prefixed with GroupNames (example:
MyGroup.MyPage).  So we could have (in pmwiki/pub/skins/), two folders:

Wiki1/Main/Main.htm
Wiki2/Main/Main.htm

That way Wiki1 and Wiki2 could have a group called Main, but with completely
different looking templates.

5.  I haven't thought as far ahead of config options yet, but I think the
same naming scheme could/should be applied as above.  Eg.  Having option (a)
putting the config files in the one existing /local/config.php format, and
prefixing config files that belong to a separate wiki with the wiki name,
like /local/Wiki1.config.php, or /local/wiki2.config.php.  Again, this makes
it really easy to change config files for different Wiki's, without having
to go searching through different wiki folders.  All config files for all
wiki's are right there, easy to edit/update.  Also having option (b)
available,  where PmWiki would check the
/pmwiki/wikis/Wiki1/local/config.php or /pmwiki/wikis/Wiki2/local/config.php
files to see if they exist will make other users who want their config.php
files to be seperated in to their respective wiki's happy too :)

6.  The main thing is that one version of PmWiki is running all the sites,
and all the (core) files are in once place (same place they are at right
now).

Okay, that's about it.  Just a few quick ideas, thought I would share.  I
hope to see some working proto-types soon.

Okay, one more last thought...

7.  I'm not sure, but I think this would have to be built-in to PmWiki.php,
otherwise, if you include as an add-on (using
include_once(multiwiki.php); ), which config.php file do you put it in?  If
it's in Pmwiki.php core, then all wiki's will have access to it without any
special fooling-around.

8.  Okay, very last one.  I think the "default" wiki (eg.
pmwiki/local/config.php) could share the config.php options with ALL wikis.
So if you want ALL wiki's to have the SAME title (just a dumb example), then
you could set the $WikiTitle in the config.php file.  Or, a better example,
if you wanted to change the height/width of the EDIT form to be the same
size accross ALL your wikis, why do it 10 times .. just do it once in the
main config.php file, and all Wiki's inherit that config.  In addition to
the default config.php file that currently exists, the Wiki1.config.php, or
Wiki2.config.php files could/should also be read (and probably over-ride
options set in config.php).

Okay, that's it.

--Steven Leite




More information about the pmwiki-users mailing list