[pmwiki-users] Re: Re: Cookbook recipes updated for beta 19 compatibility

chr at home.se chr at home.se
Wed Jan 26 09:00:16 CST 2005


On Tue, 25 Jan 2005, Patrick R. Michaud wrote:

> > In principle, we just need an array of $MarkupsEnabled.
> > An administrator could then write, for example:
> >    $MarkupsEnabled['dropcaps'] = 0;
> > to disable drop capitals from config.php.
> 
> Guess what -- this already exists (although it's not obvious or
> documented at the moment).  Only the first instance of a call to 
> Markup() is used, so one can do
> 
>    Markup('dropcaps', '');
>    Markup('^!', '');
> 
> to disable the 'dropcaps' and '!' (headings) markups.  In order for
> this to work the Markup() calls have to be made before loading any
> cookbook scripts (i.e., before include_once('cookbook/extendmarkup.php')
> in the above example).

For the administrator it'd be nice to be able to do something like:

	PreventMarkup('dropcaps', '^!', 'Q:');
	include_once('cookbook/extendmarkup.php')

As well as being able to do:

	include_once('cookbook/extendmarkup.php')
	PreventMarkup('dropcaps', '^!', 'Q:');

that does the appropriate thing, i.e. Markup('dropcaps','') or
unset($MarkupTable['dropcaps']) as needed.

The whole point being to make it easy for the administrator.

Hmm... when I think about it... what about being able to disable markup 
through markup? What if by adding the following to a wiki page

	(:prevent-markup ^!:)

would disable that markup for that page?  (This might be a can of worms of 
course..)

/Christian

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr





More information about the pmwiki-users mailing list