[pmwiki-users] Cookbook:CommentBoxPlus question

Patrick R. Michaud pmichaud at pobox.com
Fri Sep 22 12:44:18 CDT 2006


Américo Albuquerque wrote:
> On Fri, 22 Sep 2006 08:30:44 -0500, Patrick R. Michaud wrote:
>  > Yes, commenting and editing will be able to have separate authorizations.
>  > Commenting will be the ability to add content to a page (but not change
>  > what is there), while editing includes the ability to modify existing
>  > contents.
>  >
> Comment is not the same as editing, even in a restrict form. Comment is 
> more in the line of an attribute. It's something that is added to a page 
> but without changing the page text contents. When editing a page I 
> expect to edit it's text without the comments. A comment could be added 
> or deleted but not modified.

This is only one way way to look at commenting; there are several ways
that administrators and authors will want to handle comments, and I'm
wanting to support multiple of them as opposed to just one way of
doing it.

In this case, you would have the comments be stored on a separate
"-Comments" page as opposed to the page itself.  Then editing
the page would indeed not edit the comments.  But commenting is 
still just the act of adding content to a page; in this case we're 
adding content to a -Comments page that is separate from the one
being commented upon. 

For example, suppose I have Article.CoolFeature, and I want people
to be able to add comments to the article but not modify Article.CoolFeature
itself.  In that case, I add the following markup to Article.CoolFeature:

    (:include {$FullName}-Comments:)
    (:commentbox {$FullName}-Comments:)

This displays any comments that have already been entered (include),
and displays a form that allows visitors to add new comments.
However, those comments get added to the Article.CoolFeature-Comments 
page, as opposed to being added to Article.CoolFeature.

And if for some reason the comments need to be edited (e.g., due
to inappropriate content), then an author with appropriate
privileges simply edits the Article.CoolFeature-Comments
page directly.

----

Other sites will want the ability to have comments added directly
to the current page and not a separate page.  This will be possible 
by simply using

    (:commentbox {$FullName}:)

so that the form will be displayed and any comments will be directly
added to the current page, as opposed to a separate "-Comments" page.

(And yes, there will be options for specifying the order in which
comments are displayed, the format of the comments, for determining 
the basename of a page without any -Comments suffix, the default
location where comments are to be added, etc.)

>  > I see commenting as just a restricted form of editing, so whatever
>  > blocking mechanisms are available for editing will also be available
>  > for commenting.
>  >
> The blocking mechanisms should be available for commenting but 
> commenting should not be related to editing. There should be the 
> possibility to receive a notice when a page is edited (text contents 
> modified) and not when a new comment is added (text contents remains the 
> same) and vice-versa, receiving a notice just when a page has a new comment.

Sure, no problem.  Using Site.NotifyList:

   # tell alice about page edits except for comments
   notify=alice at example.com name=!*-Comments

   # tell bob only about added comments
   notify=bob at example.com name=*-Comments

> If the text md5 is implemented I expect it's value be related to the 
> page text contents and not to the page comments

Depends on whether you want the comments to be added to the current
page or to a separate -Comments page as I've outlined above.  The
implementation I'm working on allows for both possibilities, and
perhaps more that we haven't considered.

Pm




More information about the pmwiki-users mailing list