another color to my comment

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
Sasni
Regular
Posts: 18
Joined: Wed Nov 10, 2010 9:36 pm
Location: Poland
Contact:

another color to my comment

Post by Sasni »

How can I change the color only in my responses in commentlist?
I use i3theme.

this line changes color every second comment.

Code: Select all

<li id="comment-{$comment.id}" class="{cycle values="alt, even"}"> 
...EDIT...
I found the solution

Code: Select all

   <li id="comment-{$comment.id}"  {if $comment.author == 'Sasni'} class="sasni" {else} class="{cycle values="alt, even"}" {/if}>
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: another color to my comment

Post by yellowled »

Sasni wrote:

Code: Select all

<li id="comment-{$comment.id}"  {if $comment.author == 'Sasni'} class="sasni" {else} class="{cycle values="alt, even"}" {/if}>
That might work for the time being or in your particular situation. If you ever change your username or have additional authors in your blog, it won't.

Code: Select all

<li id="comment-{$comment.id}" {if $comment.author == $entry.author} class="entry_author"{else} class="{cycle values="alt, even"}"{/if}>
is much more bulletproof.

YL
Sasni
Regular
Posts: 18
Joined: Wed Nov 10, 2010 9:36 pm
Location: Poland
Contact:

Re: another color to my comment

Post by Sasni »

it works! thanks for your reply.
Post Reply