[pmwiki-users] commentbox q.

John Rankin john.rankin at affinity.co.nz
Thu Jul 27 21:30:50 CDT 2006


On Wednesday, 26 July 2006 3:31 AM, noskule at gmx.net wrote:
><snip>
>
>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.
>>
>><snip>
>
>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}
>

I assume the second example is for single posts per day. As 
specified, the format won't let the code find the date to
insert multiple comments on the same day. Also, I'd probably
use the same syntax as used to denote fields in wikiform 
view templates. I need to think about this proposal some more.

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

I support your view that a title should be a separate field -- that's  
how the "post a story" option works on the wiki calendar. And putting 
date, time, author after the title makes sense. This formulation would 
have to give away the idea of a date followed by multiple stories. But 
that's probably OK, as the title becomes the main organising feature.

I'll see what I can do...

>
>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")

Is the problem just that the div uses an id instad of a class?? I'm still
unclear what the problem is here.
>
>$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?

I'll investigate. My understanding is that this adds a {$PostCount}
markup variable, where the count is based on the number of occurrences
of a specified '>>classname<<' string.
>
>
>one thing more:
>CommentBoxFmt  uses div id=comment . ..  this seams part of the problem  to 
>use the commentbox 
>more than one time. This is not allways the case, for example of using it as 
>ShoutBox and for comment pages
>
>$CommentBoxFmt = "
><div id='message'><form action='\$PageUrl' method='post'>
>
>could be:
><div class='commentbox
>

I'll change this.
>
>using (pmwiki) standard css class for the form element to provide css 
>compatibility 
>with other extensions for example
>
><div class='commentbox . .. . . ...
>
>        <input type='text' name='author' value='\$Author' class='inputbox 
>commentboxbox' />
>        <input type='submit' name='post' value=' $[Post]' class='inputbutton 
>commentboxbutton' />-->
>        <input type='reset' value='$[Reset]'  class='inputbutton 
>commentboxbutton' />
>

I'll add the standard pmwiki class names (which of course didn't exist 
at the time commentbox was born). I don't think the commentbox classes 
are needed. The boxes are always inside a named div (currently an id 
but soon to be a class). So one can write 

    "div.commentbox input.inputbox { ... }" 

to get specific effects. This will need to be tested.

-- 
JR
--
John Rankin







More information about the pmwiki-users mailing list