[pmwiki-users] Fwd: Re: commentbox q.

noskule noskule at gmx.net
Tue Jul 25 09:25:42 CDT 2006



----------  Weitergeleitete Nachricht  ----------

Subject: Re: [pmwiki-users] commentbox q.
Date: Dienstag, 25. Juli 2006 16:25
From: noskule <noskule at gmx.net>
To: John Rankin <john.rankin at affinity.co.nz>

Am Donnerstag, 13. Juli 2006 02:30 schrieb John Rankin:
> On Tuesday, 11 July 2006 3:49 AM, noskule at gmx.net wrote:
> >Am Samstag, 1. Juli 2006 02:11 schrieb John Rankin:
> >hi john
> >I'm on the way configuring the commentbox. So I write you some
> >expiricence/suggestions.
>
> I have refreshed my memory and will walk through the options...
>
> >At default a comment looks like this:
> >>>message<<
> >
> >!17:32 by '''[[~Admin]]'''!This is the comment title
> >This is the comments sentence. This is the comments sentence. This is the
> >comments sentence. This is the comments sentence. This is the comments
> >sentence. This is the comments sentence.
> >
> >>><<
> >
> >* It seams that there is either missing a "\n" at the end of
> >"$MPTimeFmt"
>
> It is in fact correct.
> The default setting uses the "run-in head" markup extension
> to save space in the output. You may prefer to change it to
> something like:
>
> "\n\n>>message<<\n''\$Time by '''\$Author''' ''"
>
> This gives the run-in effect a different way.
>
> >This are the output of the commentbox.php
> >
> ><MPDateFmt><MPTimeFmt>This is the comment Title
> >This is the comments sentence. This is the comments sentence. This is the
> >comments sentence. This is the comments sentence. This is the comments
> >sentence. This is the comments sentence.
> ><MPItemFmt><MPItemEndFmt>
> >
> >* MPItemFmt is at the end of the message. I'm wondering if it  shouldnt be
> > at the beginning of the comments sentence cause MPItemEndFmt follows
> > right after the end of MPItemFmt
>
> The $MPItemFmt variable was introduced for people who want to put the
> author and / or time after the message, instead of before. For example:
>
> $MPTimeFmt = "\n\n>>message<<\n";
> $MPItemFmt = "\n\n%right%''\$Time by '''\$Author''' ''";
>
> >So far I understand it is hard to cusomize the commentbox template cause
> > the order of the variables are fixed. Would there be a solution to have a
> > template that defines the order in wikitext format like:
> >
> >CommentTemplate="
> >!!!! MPDateFmt
> >!! MPTitleFmt
> >MPCommentFmt
> >$Autor, MPTimeFmt
> >";
> >
> >grz nos
>
> The intent is that the variables are sufficiently flexible that an
> administrator can achieve a desired output effect. The order is:
>
> $MPDateFmt
> $MPTimeFmt
> the text from the comment box
> $MPItemFmt
> $MPItemEndFmt
>
> If the administrator sets $MultipleItemsPerDay = false, it uses
>
> $MPDateTimeFmt
> the text from the comment box
> $MPItemFmt
> $MPItemEndFmt
>
> I quite like the idea of a comment template, but will need to
> think about it.

The template could posssibly be a "wikipage" (defined as a wikipage or string
like above) that uses variables to insert date, time, .... So one could
design the commentbox output like a normal wikipage.

> Doing the right substitutions in the right
> order was very tricky to get right across all the cases. The
> risk in introducing a template is that an administrator
> may be able to define a template that causes the code to
> break. Testing such an approach would have to be done very
> carefully. The bit that requires care is handling multiple
> posts on the same date at different times, with support for
> either latest first or latest last posting.
>
> This means knowing what the date format is, so the code can
> determine where to insert a new comment and whether or not
> the new comment needs a date or just a time.
>
> The code evolved as the environment changed and has perhaps
> reached an evolutionary dead end -- perfectly adapted to its
> niche but unable to deal with an influx of offshore predators.
>
> One place to start could be to define the comment style you'd
> like

so (multiple posts per day):
{$date}
{$comment title}
[- {$time} by {$name}-]
{$comment text}

or (the date is part of the comment info):
{$comment title}
[- {$date}, {$time} by {$name}-]
{$comment text}

the thing about the comment info (date time name) above the comment is that
 if the comment is uge one dont have to scroll to get the info.

one question is how to handle the title. I personaly think that it should in
 a separate field, cause otherways most users dont get it. At the moment I
 use no title if someone wants one he have to write a "!" in the textfield.

Theres a method (guess per default) that the first line is automaticly a
title. I like that personaly cause its easy to work with, but most of the
users dont get it and it looks ugly if the whole comment is a title.

Diffrent subject, "post to another page":
I checked this out and it works, but has the problem that it does not if
 there are more than one commentbox on a view. This typicaly happens if one
 use the commentbox in the sidebar as shoutbox and at the same time the user
 looking at a blog with comment feature. You can see the effect on the test
installation
http://www.netstreams.org/test/skin/skin/index.php?n=SkinTestsShoutbox.Commen
tCombination (to edit use "Admin" and "youradminpassword")

$postcount variable:
Then in commentbox styled there is a postcount variable that is realy usefull
for using commentbox with a blog, could this also be implemented in
commentbox?

grz nos

> to achieve and see whether it can be implemented in the
> current structure.
>
> Hope this clarifies the way the recipe works.

-------------------------------------------------------




More information about the pmwiki-users mailing list