[pmwiki-users] Separate wikilib.d into separate directories
5ko at 5ko.fr
Mon Jul 14 11:28:40 CDT 2008
On Monday 14 July 2008 16:40:02 Patrick R. Michaud wrote:
> I'd like to split the wikilib.d/ directory into separate directories
> for "system" pages (Site.*, SiteAdmin.*) and "documentation" pages
> (PmWiki.*, others).
> Site* files need to remain in wikilib.d/, we need a
> new place for the documentation. I propose wikidoc.d/ , but would
> like to hear others' ideas and suggestions.
I strongly support the split.
There are two types of recipes that manipulate the $WikiLibDirs array.
1. Recipes providing some wiki pages (docs, config, templates) as simple
pmwiki files in their own "recipe.d" distribution : skins, blogs...
These recipes currently need to insert their "recipe.d" directory just before
wikilib.d in $WikiLibDirs.
2. Recipes providing new PageStore classes: SQLite, CompressedPageStore...
These recipes need to prepend their PageStore class before any other existing
class, that is before the existing wiki.d directory.
The current "module guidelines" in the cookbook show how to insert a "recipe
directory" in the $WikiLibDirs array, just before the last one:
array_splice($WikiLibDirs, isset($WikiLibDirs)?-1:1, 0,
If a recipe is using page names different than PmWiki's existing
documentation, even if the recipe directory is inserted between wikilib.d and
wikidoc.d, the recipe will continue to work.
Other (sort of) guidelines about recipes adding a PageStore class is to give
instructions to the wiki admin, how to do it from config.php. This way it
will be easier to find possible conflicts.
> If we also need to see about providing a function for recipes to
> manipulate $WikiLibDirs, I'm open to proposals for that.
I would very strongly support the addition of such a function, before version
2.2 stable. Recipe authors providing wiki pages should be able to add their
recipe.d directories easier than what is done now.
One way to do it could be similar to Markup() function, for example:
# PmWiki core
# recipe.php/skin.php adding a recipe.d
# recipe.php adding a PageStore class
WikiStore('sqlite', '_begin', new
# config.php: wiki admin disabling wikidoc.d
# config.php: wiki admin adding docs in French
More information about the pmwiki-users