[pmwiki-users] Re: Reason why pagetoc.php isn't used for Cookbook.Cookbook?

Joachim Durchholz jo at durchholz.org
Wed Jun 22 03:32:14 CDT 2005


Patrick R. Michaud wrote:

> On Tue, Jun 21, 2005 at 08:59:15PM +0200, Joachim Durchholz wrote:
> 
>> Hmm... how about a "draft mode" where unknown markups display, and
>> a "view mode" where unknown markups are ignored? That could be done
>> as a per-group configuration, so that the preinstalled groups don't
>> "look funny" but people still see a markup that's unrecognized.
> 
> Still likely to be a local customization.

My thought was that sample-config.php could contain code like this:

   if ($group == 'PmWiki') {
     Markup('(:', '<restore', '/\\(:.*?:\\)/', '');
   }

(I haven't checked variable names, and maybe one would like to match 
with /^PmWiki.*$/, or check that the text was served from wikilib.d... 
but the above is the general idea.)

Then the PmWiki documentation could contain special markup without 
having to fear that it might break on somebody else's installation.


Alternative: for each special (non-core) markup used in the PmWiki docs, 
implant a dummy implementation in the core that's activated when the 
recipe isn't installed.


The reason why I'm still pursuing that line of thought is that the 
PmWiki site does have some needs that go beyond that of a simple site, 
so there is a reason to install special markup just for pmwiki.org that 
need not be available on a vanilla install. I'm just exploring ways to 
get that done :-)


 > For those that want it, it's as simple as:
> 
>     # remove any unprocessed (:...:) sequences
>     Markup('(:', '<restore', '/\\(:.*?:\\)/', '');

Documented at http://www.pmwiki.org/wiki/Cookbook/HandleUnknownMarkups 
(expanded with some tips for handling non-(:...:) markup).

Regards,
Jo



More information about the pmwiki-users mailing list