[Pmwiki-users] (:addcomment:) markup

Knut Alboldt pmwiki
Thu Oct 28 13:08:24 CDT 2004


At 16:46 28.10.2004, you wrote:
>On Thu, Oct 28, 2004 at 02:02:48PM +0000, Knut Alboldt wrote:
> > I'm on my way to implement a (:addcomment:) markup for v2. ( I need this
> > for error-tracking)
> > Just before I set this up as a cookbook-entry and want your remarks on it
> > (or just the hint that all is already implemented somewhere :-).
>
>Well, it's not already implemented somewhere, but a comments feature will be
>implemented as a part of the 2.0 distribution.  I'm still working out the
>syntax and details for it.  This isn't to discourage you from writing one,
>just to note that there is one "on its way" (although I don't have a
>completion timeframe).

I think I will start the implementation (cause I need the feature - 
yesterday ?) and when it's in the standard I can change to it.
Second, it's real fun to implement something for working with v2 to get 
more and more into the implentation. It's fantastic ! You've done a good 
work (I only have to get used to these regex-cryptic things :-)

BTW one question to stdmarkup.php:  often, you used double quotes in the 3. 
and 4. argument of markup() which makes the regex more complicated (using 
more escaping \) and more difficult to read.

(example:

Markup('if','fulltext',"/\\(:(if[^\n]*?):\\)(.*?)(?=\\(:if[^\n]*?:\\)|$)/se",
   "CondText(\$pagename,PSS('$1'),PSS('$2'))");

could it be :

Markup('if','fulltext','/\(:(if[^\n]*?):\)(.*?)(?=\(:if[^\n]*?:\)|$)/se',
   'CondText($pagename,PSS('$1'),PSS('$2'))');

as well ?
)

Is there a special reason ? Or didn't I get the markup-processing well ?


> > I want to implement a feature that adds user comments as textblocks to an
> > existing page. So here are the topics I want to implement:
> >
> > * adding a new markup (:addcomment:) / (:addcomment pagename:) to display a
> >   link like 
> ...?pagename=$self/specified?action=addcomment?referer=$pagename
> > * adding new action=addcomment which displays a form to enter 
> additional text
> >   which is added as a user's comment to the specified page
>
>I was thinking that there ought to be a (:commentform:) markup which displays
>the comments form directly in the text of the page, in addition to having
>an "add comment" form that displays in its own page (with preview).

Thats a good idea !

> > * a global var $AddcommentWhere (or $Addcomment['where'] ?) which specifies
> >   where the user's comment will be placed within the specified text:
> >   'top' or 'bottom' (t/b)
>
>My thoughts have been that this belongs in the markup somehow -- i.e.,
>that part of the directives indicate where the comment should go and if
>it should go above the directive or below it.

I like your's better, too. Another thing is, that I also add the directive 
to a GroupHeader or -Footer, so there are situations where the comment 
can't be put in relationship of the markup (cause it won't be in the page's 
text)

> > The referred pagetext can be changed while the user enteres the comments
> > I wont take care of that in the first step.
>
>Many have requested that the ability to add comments work even on pages
>that are locked -- i.e., adding a comment shouldn't allow one to edit
>the existing page text.

for now I need it only this way that writing (submitting) the comment may 
not be done, if a page is locked for editing.
I won't implement it that start entering the comment will lock the entire page.

>Pm




More information about the pmwiki-users mailing list