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

John Rankin john.rankin at affinity.co.nz
Wed Jan 26 15:13:48 CST 2005


On Thursday, 27 January 2005 4:00 AM, chr at home.se wrote:
>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.


A function something like the following, perhaps:

function PreventMarkup($markups) {
  global $MarkupTable;
  foreach ($markups as $m)
    if isset($MarkupTable[$m]) unset($MarkupTable[$m])
    else Markup($m,'');
}

And an administrator would write:

    PreventMarkup(array('dropcaps', '^!', 'Q:'));

Assuming the above works, I suggest we add it to the extended markup
recipe.

>
>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..)

Putting such a statement into a GroupHeader would be interesting,
particularly if one did not create a corresponding GroupPrintHeader.
>
>/Christian
>


-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list