Page 1 of 1

Slight problem in comment.tpl

Posted: Sat Feb 24, 2007 7:21 pm
by Don Chambers
I found a problem in comments.tpl from the template/default/ folder...

Code: Select all

<div id="serendipity_comment_{$comment.id}" class="serendipity_comment serendipity_comment_author_{$comment.author|@makeFilename} {if $entry.author == $comment.author}serendipity_comment_author_self{/if}{cycle values="comment_oddbox, comment_evenbox"}" style="padding-left: {$comment.depth*20}px">
In the middle is this:

{if $entry.author == $comment.author}serendipity_comment_author_self{/if}{cycle values="comment_oddbox, comment_evenbox"}"

There needs to be a space before the {/if}, otherwise, you get a class of "serendipity_comment_author_selfcomment_oddbox", which obviously means that neither of the 2 intended classes of "serendipity_comment_author_self" nor "comment_oddbox" will work.

IMHO, the style of "padding-left" should be replaced with "margin-left" to produce a better graphic representation for threaded comments.

Re: Slight problem in comment.tpl

Posted: Mon Feb 26, 2007 8:52 am
by garvinhicking
Hi!

Thanks for telling us about that bug, I just fixed it in SVN for the upcoming versions.

However with the padding/margin, changing this might introduce glitches in different browsers, so I'd like to avoid changing that - especially because some themes CSS files are dependant on that padding inside the comments.tpl file of the default template, and that might break those themes.

Best regards,
Garvin

Posted: Mon Feb 26, 2007 4:01 pm
by Don Chambers
No problem Garvin. I'm not overly concerned about the margin vs. padding issue - I just stated it as an opinion. I understand how it might affect prior templates.