Re: [pmwiki-users] Markup Question

2009-05-04 Thread Dave Brockman
Petko Yotov wrote:
> On Monday 04 May 2009 09:38:49 Dave Brockman wrote:
>> only pages in CommentPages and three other groups can be edited by
>> users. Pages from these groups are included on pages in the private
>> group EpisodePages. I find now that my test image reappears when the
>> CommentPages page is included on the EpisodePages page. Is there some
>> way to prevent the "include" from restoring the image?
> 
> No.
> 

I figured. :-)

>> I did notice that 
>> this image is not a link to itself. Links to images from the user
>> editable pages should be allowed. And, images, added by myself, are used
>> in EpisodePages. Thanks, again, for your help.
> 
> In that case, you may just use the recipe URL approvals (and discard the 
> previous settings with CommentPages.php). Any posted link or image link will 
> be just displayed as non-clickable text until you approve it or delete it. 
> And this way, you can even allow "good" approved inline images in those 
> groups.
> 
> See :
>http://www.pmwiki.org/wiki/PmWiki/UrlApprovals
> 
> Note however that links are approved per-site. Once an external site is 
> approved, all links to pages and images on this site will be automatically 
> allowed and shown.
> 

Ah! Thanks! That sounds like a good idea. I'll look into it.

>> I may be worrying about this too much. I have had no problems with users
>> posting "bad" images.
> 
> Yes, in my experience, most people add comments in good faith. 
> 
> Adding an edit password, even one written in clear text on the login form or 
> at the home page, tends to cut approximately 100.0% of all spam.
> 

That's what I've done. The password is known to true fans of the TV show 
that my site supports. So far, it's been 100% as you say. I did have 
some Sandbox spam, but I fixed that with the Auto Restore recipe.

>> And, no matter what can be done, I will still have 
>> to check every user addition. :-)
> 
> See also how to be immediately informed about any changes :
>   http://www.pmwiki.org/wiki/PmWiki/Notify
>   http://www.pmwiki.org/wiki/Cookbook/TrackChanges
> 

I'll check those out too. I do get notifications.

> Petko

Thanks again Petko! You have been most helpful.

Dave


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Markup Question

2009-05-04 Thread Petko Yotov
On Monday 04 May 2009 09:38:49 Dave Brockman wrote:
> only pages in CommentPages and three other groups can be edited by
> users. Pages from these groups are included on pages in the private
> group EpisodePages. I find now that my test image reappears when the
> CommentPages page is included on the EpisodePages page. Is there some
> way to prevent the "include" from restoring the image?

No.

> I did notice that 
> this image is not a link to itself. Links to images from the user
> editable pages should be allowed. And, images, added by myself, are used
> in EpisodePages. Thanks, again, for your help.

In that case, you may just use the recipe URL approvals (and discard the 
previous settings with CommentPages.php). Any posted link or image link will 
be just displayed as non-clickable text until you approve it or delete it. 
And this way, you can even allow "good" approved inline images in those 
groups.

See :
   http://www.pmwiki.org/wiki/PmWiki/UrlApprovals

Note however that links are approved per-site. Once an external site is 
approved, all links to pages and images on this site will be automatically 
allowed and shown.

> I may be worrying about this too much. I have had no problems with users
> posting "bad" images.

Yes, in my experience, most people add comments in good faith. 

Adding an edit password, even one written in clear text on the login form or 
at the home page, tends to cut approximately 100.0% of all spam.

> And, no matter what can be done, I will still have 
> to check every user addition. :-)

See also how to be immediately informed about any changes :
  http://www.pmwiki.org/wiki/PmWiki/Notify
  http://www.pmwiki.org/wiki/Cookbook/TrackChanges

Petko

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Markup Question

2009-05-04 Thread Dave Brockman
Petko Yotov wrote:
> On Monday 04 May 2009 05:33:58 Dave Brockman wrote:
>> 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.

 >>>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
> 
>> 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:
>>
>> >
>> ## 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.
> 
> Right, I didn't know. When we DisableMarkup('img'), the "http://www...jpg"; 
> thing is treated not as an image, but as a regular external link. But the 
> MakeLink function re-checks it to see if it seems like an image, regardless 
> of the markup rules.
> 
> You should also add to CommentPages.php this line :
>   $ImgExtPattern = "$^";
> 
> This line will cause MakeLink to skip the "check image" part, and instead to 
> display the link, like any other http://... link.
> 
> I just tested it here :
>   http://www.pmwiki.org/wiki/Test/DisableMarkup
> 
> Thanks,
> Petko

Ah! That does indeed fix the problem. Thank you very much!

Unfortunately there is yet another problem. Some background. On my site, 
only pages in CommentPages and three other groups can be edited by 
users. Pages from these groups are included on pages in the private 
group EpisodePages. I find now that my test image reappears when the 
CommentPages page is included on the EpisodePages page. Is there some 
way to prevent the "include" from restoring the image? I did notice that 
this image is not a link to itself. Links to images from the user 
editable pages should be allowed. And, images, added by myself, are used 
in EpisodePages. Thanks, again, for your help.

I may be worrying about this too much. I have had no problems with users 
posting "bad" images. And, no matter what can be done, I will still have 
to check every user addition. :-)

Dave


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Markup Question

2009-05-03 Thread Petko Yotov
On Monday 04 May 2009 05:33:58 Dave Brockman wrote:
> 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.
> >>
> >>  >>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

>
> 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:
>
> 
> ## 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.

Right, I didn't know. When we DisableMarkup('img'), the "http://www...jpg"; 
thing is treated not as an image, but as a regular external link. But the 
MakeLink function re-checks it to see if it seems like an image, regardless 
of the markup rules.

You should also add to CommentPages.php this line :
  $ImgExtPattern = "$^";

This line will cause MakeLink to skip the "check image" part, and instead to 
display the link, like any other http://... link.

I just tested it here :
  http://www.pmwiki.org/wiki/Test/DisableMarkup

Thanks,
Petko

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Markup Question

2009-05-03 Thread Dave Brockman
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.
> 
>> >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:

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


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Markup Question

2009-05-02 Thread Petko Yotov
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.

> 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

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] Markup Question

2009-05-01 Thread Dave Brockman
I don't understand very well, so I wanted to be sure about this before I 
try anything. 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.

Dave

File contents:

http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] markup question

2008-02-15 Thread Stirling Westrup
noskule wrote:
> hi list
> could someone please take a look at this markup. I cant get it to work. 
> It should rpoduce a fieldset:
> 
> 
If what you want is markup for fieldset and legend, it already exists:

  http://www.pmwiki.org/wiki/Cookbook/FormExtensions

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] markup question

2008-02-14 Thread Patrick R. Michaud
On Thu, Feb 14, 2008 at 04:02:31PM +0100, noskule wrote:
> hi list
> could someone please take a look at this markup. I cant get it to work. 
> It should rpoduce a fieldset:
> 
> code:
> Markup('fieldset', ' '/\\(:fieldset (\\[\d\s\w]+):\\)(.*?)\(:fieldsetend:\)/s',
> "\n$1\n$2\n");

You probably don't want the \\ before the [.  

Pm

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] markup question

2008-02-14 Thread noskule
hi list
could someone please take a look at this markup. I cant get it to work. 
It should rpoduce a fieldset:

code:
Markup('fieldset', '\n$1\n$2\n");

markup:
(:fieldsset fielname:)
XXX
(:fieldssetend:)

resut:

fieldname
XXX


thanks for any hints
nos



___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Markup question...

2007-04-02 Thread Patrick R. Michaud
On Mon, Apr 02, 2007 at 10:04:09AM -0400, The Editor wrote:
> On 4/2/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> >On Mon, Apr 02, 2007 at 05:40:43AM -0400, The Editor wrote:
> >> I have a simple markup I'm using to show Snippets code easily, and it
> >> works fine except I can't seem to get the >>box<< to process.
> >>
> >> Markup('ZAPshow', '_begin', '/\(:show (.*?):\\)/',
> >>   ">>box<<
> >> Examples: [[$1]](:input form:)(:textarea name=test rows=10
> >> cols=50:){(source $1#ID)}
> >> >><<");
> >
> >Sure.  In a markup rule, it would be ">>box<<" instead of 
> >">>box<<"
>
> Ok, I made the change but it still shows the >><<'s.  Do you see any
> other problem?

Oops, I forgot the last semicolon (and thus so did you).  It
should be ">>box<<" (note semicolon at end).

> Markup('ZAPshow', '<{$var}', '/\(:show (.*?):\\)/',
>   ">>box<<
> Examples: [[$1]](:input form:)(:textarea name=test rows=10
> cols=50:){(source $1#ID)}(:input end:)
> >><<");

Markup('ZAPshow', '<{$var}', '/\(:show (.*?):\\)/',
">>box<<
Examples: [[$1]](:input form:)(:textarea name=test rows=10
cols=50:){(source $1#ID)}(:input end:)
>><<");

Pm

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Markup question...

2007-04-02 Thread The Editor
On 4/2/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> On Mon, Apr 02, 2007 at 05:40:43AM -0400, The Editor wrote:
> > I have a simple markup I'm using to show Snippets code easily, and it
> > works fine except I can't seem to get the >>box<< to process.
> >
> > Markup('ZAPshow', '_begin', '/\(:show (.*?):\\)/',
> >   ">>box<<
> > Examples: [[$1]](:input form:)(:textarea name=test rows=10
> > cols=50:){(source $1#ID)}
> > >><<");
> >
> > Can anyone explain the secret to this?
>
> Sure.  In a markup rule, it would be ">>box<<" instead of ">>box<<"
> (because angle brackets are converted to HTML entities at the start of
> markup processing).
>
> Also note that in order for >><< markups to work they have to be at the 
> beginning of
> a line (this might not be true in the above if "(:show ...:) isn't at
> the beginning of a line).
>
> Lastly, it might not be a good idea to put this markup rule at '_begin',
> because it means that any [=...=] or [EMAIL PROTECTED]@] markups containing 
> (:show:)
> won't be processed correctly.  I'd pick a slightly later "when" target.
>
> Pm



Ok, I made the change but it still shows the >><<'s.  Do you see any
other problem?

Markup('ZAPshow', '<{$var}', '/\(:show (.*?):\\)/',
">>box<<
Examples: [[$1]](:input form:)(:textarea name=test rows=10
cols=50:){(source $1#ID)}(:input end:)
>><<");

Cheers,
Dan

PS. I'm using Hans' literal white space which is why there are not
trailing \\ for the line breaks.  Straight pasting of the text into
the page works fine.

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Markup question...

2007-04-02 Thread Patrick R. Michaud
On Mon, Apr 02, 2007 at 05:40:43AM -0400, The Editor wrote:
> I have a simple markup I'm using to show Snippets code easily, and it
> works fine except I can't seem to get the >>box<< to process.
> 
> Markup('ZAPshow', '_begin', '/\(:show (.*?):\\)/',
>   ">>box<<
> Examples: [[$1]](:input form:)(:textarea name=test rows=10
> cols=50:){(source $1#ID)}
> >><<");
> 
> Can anyone explain the secret to this?

Sure.  In a markup rule, it would be ">>box<<" instead of ">>box<<"
(because angle brackets are converted to HTML entities at the start of
markup processing).

Also note that in order for >><< markups to work they have to be at the 
beginning of
a line (this might not be true in the above if "(:show ...:) isn't at
the beginning of a line).

Lastly, it might not be a good idea to put this markup rule at '_begin',
because it means that any [=...=] or [EMAIL PROTECTED]@] markups containing 
(:show:)
won't be processed correctly.  I'd pick a slightly later "when" target.

Pm

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] Markup question...

2007-04-02 Thread The Editor
I have a simple markup I'm using to show Snippets code easily, and it
works fine except I can't seem to get the >>box<< to process.

Markup('ZAPshow', '_begin', '/\(:show (.*?):\\)/',
">>box<<
Examples: [[$1]](:input form:)(:textarea name=test rows=10
cols=50:){(source $1#ID)}
>><<");

Can anyone explain the secret to this?

Cheers,
Dan

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users