[pmwiki-users] Disabling HTML on a page or a group?

Dominique Faure dominique.faure at gmail.com
Fri Feb 1 04:25:41 CST 2008


On Feb 1, 2008 10:27 AM, Hans <design5 at softflow.co.uk> wrote:
>
> Friday, February 1, 2008, 2:19:37 AM, Steven Benmosh wrote:
>
> > Is there something that would allow a global enablehtml functionality, then
> > disable it in particular pages or groups?
>
> to include a script for all wiki pages but not for some, you can do a
> conditional include in config.php.
> Say you don't want to allow EnableHTML in group 'User' and page
> 'Main.Sandbox'
>
> $page = PageVar($pagename,'$FullName');
> $group = PageVar($pagename, '$Group');
> if (!$group=='User' && !$page=='Main.Sandbox') {
>   include_once("$FarmD/cookbook/enablehtml.php");
>   EnableHTML('b|i|u|sup|sub|a|iframe|small');
>   etc....
> }
>

Shouldn't the condition be better as:

  if ( ! ($group == 'User' && $page == 'Main.Sandbox')) {

or even:

  if ($group != 'User' || $page != 'Main.Sandbox') {

-- 
Dominique



More information about the pmwiki-users mailing list