[pmwiki-users] Markup Question

Dave Brockman daveb at oz.net
Sun May 3 22:33:58 CDT 2009


Petko Yotov wrote:
> On Saturday 02 May 2009 06:12:10 Dave Brockman wrote:
>> Users on my site are allowed to edit pages in three
>> groups. I would like to disallow pictures in these groups. I read about
>> the use of "DisableMarkup('img') in the documentation for Images. I
>> *think* I should create a "groupname.php" file in /local containing that
>> markup for each group. Is this correct? Thanks in advance for any help.
> 
>> <?php
>>    DisableMarkup('img');
> 
> Hello. Yes, this is the way to disable some markup rule. (Only the group 
> customization file is named "Groupname.php" and not "groupname.php".)
> 
> See also a related discussion at :
>   http://www.pmwiki.org/wiki/PITS/01096
> 
> Thanks,
> Petko

Hi Petko,

Thanks! I tried it, and it doesn't seem to work. I created a file named 
CommentPages.php which matches the group name. The contents are:

<?php if (!defined('PmWiki')) exit();

## Suppress images.
DisableMarkup('img');

I then added an image to a page in the group with  the page edit window as:

A test to see if images are blocked.

http://www.perrymasontvseries.com/wiki/images/AbsentArtist-095.jpg

Upon saving, I find that the image shows up and is a link to itself. 
Looking in stdmarkup.php, I think that this is what the 'img' markup 
does. I tried disabling some other bits of markup, and this seemed to 
work, but the results were confusing. That's another story though. Am I 
doing something wrong? Any suggestions on how to keep users from posting 
images to specific groups? Thanks!

Dave




More information about the pmwiki-users mailing list