Page 1 of 1

serendipity_replyform_{$comment.id}

Posted: Thu Aug 06, 2009 4:32 pm
by yellowled
In /templates/default/comments.tpl, we have:

Code: Select all

<div id="serendipity_replyform_{$comment.id}"></div>
Does this have to be a div or could it as well be a span, as long as it keeps the id?

YL

Re: serendipity_replyform_{$comment.id}

Posted: Thu Aug 06, 2009 5:33 pm
by Don Chambers
I cannot even tell what purpose this div actually serves, but I doubt it makes any difference whatsoever whether it is a div or span...

Re: serendipity_replyform_{$comment.id}

Posted: Thu Aug 06, 2009 6:15 pm
by yellowled
Don Chambers wrote:I cannot even tell what purpose this div actually serves
As far as I know, without it replying to other users in comments won't work, i.e. the select box in the comment form becomes redundant. Might as well affect some plugins like the one which quotes comments. Plus, it is somehow connected to the comment preview.

So actually it's quite important as far as I can tell :) Garvin?
Don Chambers wrote:but I doubt it makes any difference whatsoever whether it is a div or span...
Just imagine some part of the core relating to "div#serendipity_replyform_{$comment.id}" directly.

YL

Re: serendipity_replyform_{$comment.id}

Posted: Thu Aug 06, 2009 7:03 pm
by Don Chambers
I use a custom comment form on my site.... I changed that ID name a long time ago and it had no effect... replying to a previous comment (so that threading is preserved) is handled with the link:

Code: Select all

<a class="comment_reply" href="#serendipity_CommentForm" id="serendipity_reply_{$comment.id}" onclick="document.getElementById('serendipity_replyTo').value='{$comment.id}'; {$comment_onchange}">{$CONST.REPLY}</a>
I do not believe this div serves any purpose at all, other than perhaps as a separator....

There is certainly an easy way to find out - change it to a span in a test environment and see if commenting is affected in any way. I'll bet that you could completely eliminate it (not just change it to a span).

Re: serendipity_replyform_{$comment.id}

Posted: Fri Aug 07, 2009 10:45 am
by yellowled
Don Chambers wrote:I'll bet that you could completely eliminate it (not just change it to a span).
Yeah, I did that once. Resulted in the comment preview not working any longer, which is why I posted this question in the first place.

YL

Re: serendipity_replyform_{$comment.id}

Posted: Fri Aug 07, 2009 12:29 pm
by garvinhicking
Hi!

I believe this DIV is required for the dynamic comment plugins, serendipity_event_livecomment. It needs to be a DIV, as it needs to be a block level element.

Regards,
Garvin

Re: serendipity_replyform_{$comment.id}

Posted: Fri Aug 07, 2009 12:57 pm
by yellowled
garvinhicking wrote:It needs to be a DIV, as it needs to be a block level element.
Thought so, thanks. Never mind.

YL

Re: serendipity_replyform_{$comment.id}

Posted: Fri Aug 07, 2009 4:17 pm
by Don Chambers
Well, I have never used serendipity_event_livecomment, so I have no experience there. As mentioned earlier, I renamed that DIV ID in my current template... comment previews work just fine. Oh well...