Slight problem in comment.tpl

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Slight problem in comment.tpl

Post 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.
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Slight problem in comment.tpl

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post 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.
=Don=
Post Reply