[pmwiki-users] Separate wikilib.d into separate directories

Patrick R. Michaud pmichaud at pobox.com
Mon Jul 14 12:24:35 CDT 2008


On Mon, Jul 14, 2008 at 06:28:40PM +0200, Petko Yotov wrote:
> 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
>   WikiStore('wikilib.d', 'lib');
>   WikiStore('wikidoc.d', 'lib');
>   WikiStore('wiki.d', 'work');
> 
>   # recipe.php/skin.php adding a recipe.d
>   WikiStore('recipe.d', '<lib');
> 
>   # recipe.php adding a PageStore class
>   WikiStore('sqlite', '_begin', new   
>      PageStoreSQLite($WorkDir.'/pmwiki.sqlite.db'));
> ...

I don't know if you've looked at the Markup() code, but getting the '<lib'
stuff to work the same way that Markup() does it is a _real_ pain.  
I'd hate to re-implement it all over again just for PageStores, or to 
try to refactor Markup() and PageStore to use a common code library 
for this.  (I.e., that approach is much more work than I want.)

I might try a lighter version of it, though, that doesn't do all
of the just-in-time calculation that Markup() and BuildMarkupRules() 
currently do.  For compatibility reasons, though, I think we need
to keep $WikiLibDirs essentially the same as it is now, and just
provide a function to make it easier to manipulate $WikiLibDirs.

Pm



More information about the pmwiki-users mailing list