<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Styling Comments by Author</title>
	<atom:link href="http://buynowshop.com/2009/05/styling-comments-by-author/feed/" rel="self" type="application/rss+xml" />
	<link>http://buynowshop.com/2009/05/styling-comments-by-author/</link>
	<description>WordPress administration, installation, and development.</description>
	<lastBuildDate>Mon, 06 Feb 2012 15:29:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Edward Caissie</title>
		<link>http://buynowshop.com/2009/05/styling-comments-by-author/comment-page-1/#comment-10</link>
		<dc:creator>Edward Caissie</dc:creator>
		<pubDate>Sun, 07 Jun 2009 00:11:59 +0000</pubDate>
		<guid isPermaLink="false">http://buynowshop.com/?p=73#comment-10</guid>
		<description>I do enjoy your comments.  They make for interesting reading and great for new ideas. I believe your latest comment would lead to a more automated styling approach whereas my original post is very much a manual approach.  FYI, user_id=0 identifies non-registered users.</description>
		<content:encoded><![CDATA[<p>I do enjoy your comments.  They make for interesting reading and great for new ideas. I believe your latest comment would lead to a more automated styling approach whereas my original post is very much a manual approach.  FYI, user_id=0 identifies non-registered users.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chip Bennett</title>
		<link>http://buynowshop.com/2009/05/styling-comments-by-author/comment-page-1/#comment-9</link>
		<dc:creator>Chip Bennett</dc:creator>
		<pubDate>Sat, 06 Jun 2009 21:04:47 +0000</pubDate>
		<guid isPermaLink="false">http://buynowshop.com/?p=73#comment-9</guid>
		<description>You could also do something like:

li class=&quot;user-PHPSTUFFHERE&quot;

where PHPSTUFFHERE =

php echo $comment-&gt;user_id;

So UserID 1 would have:

li class=&quot;user-1&quot;

And UserID 15 would have:

li class=&quot;user-15&quot;

You could also wrap an if statement around the user-id call, and differentiate between registered commenters and non-registered commenters; something like (this may not be *exactly* right, since i don&#039;t know what gets returned for an anonymous comment):

li class=&quot;PHPSTUFF&quot;

where PHPSTUFF = 

if $comment-&gt;user_id {
     $user_status = registered_user;
     echo $user_status. &quot; user-&quot;.$comment-&gt;user_id;
} else {
     $user_status = non_registered_user;
     echo $user_status;
} endif;

(Feel free to correct if my PHP syntax is wrong there.)

That way, for a non-registered user, you would get:

li class=&quot;non_registered_user&quot;

And for a registered user with user_id 5, you would get:

li class=&quot;registered_user user-5&quot;

That way, you could style the comments differently for registered and anonymous users, and also for each user ID.

(Nice post; thanks for the food for thought! I might try something like this on my own blog.)</description>
		<content:encoded><![CDATA[<p>You could also do something like:</p>
<p>li class=&#8221;user-PHPSTUFFHERE&#8221;</p>
<p>where PHPSTUFFHERE =</p>
<p>php echo $comment->user_id;</p>
<p>So UserID 1 would have:</p>
<p>li class=&#8221;user-1&#8243;</p>
<p>And UserID 15 would have:</p>
<p>li class=&#8221;user-15&#8243;</p>
<p>You could also wrap an if statement around the user-id call, and differentiate between registered commenters and non-registered commenters; something like (this may not be *exactly* right, since i don&#8217;t know what gets returned for an anonymous comment):</p>
<p>li class=&#8221;PHPSTUFF&#8221;</p>
<p>where PHPSTUFF = </p>
<p>if $comment->user_id {<br />
     $user_status = registered_user;<br />
     echo $user_status. &#8221; user-&#8221;.$comment->user_id;<br />
} else {<br />
     $user_status = non_registered_user;<br />
     echo $user_status;<br />
} endif;</p>
<p>(Feel free to correct if my PHP syntax is wrong there.)</p>
<p>That way, for a non-registered user, you would get:</p>
<p>li class=&#8221;non_registered_user&#8221;</p>
<p>And for a registered user with user_id 5, you would get:</p>
<p>li class=&#8221;registered_user user-5&#8243;</p>
<p>That way, you could style the comments differently for registered and anonymous users, and also for each user ID.</p>
<p>(Nice post; thanks for the food for thought! I might try something like this on my own blog.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JellyBeen</title>
		<link>http://buynowshop.com/2009/05/styling-comments-by-author/comment-page-1/#comment-8</link>
		<dc:creator>JellyBeen</dc:creator>
		<pubDate>Sat, 06 Jun 2009 18:31:40 +0000</pubDate>
		<guid isPermaLink="false">http://buynowshop.com/?p=73#comment-8</guid>
		<description>That&#039;s a great little snippet to keep in mind Chip, thanks for sharing it here.

I am using this method here to differentiate between two, or more, registered members of the blog, giving each registered member (and for that matter it can be extended to non-registered members) a unique style for their comments. For example this reply.</description>
		<content:encoded><![CDATA[<p>That&#8217;s a great little snippet to keep in mind Chip, thanks for sharing it here.</p>
<p>I am using this method here to differentiate between two, or more, registered members of the blog, giving each registered member (and for that matter it can be extended to non-registered members) a unique style for their comments. For example this reply.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chip Bennett</title>
		<link>http://buynowshop.com/2009/05/styling-comments-by-author/comment-page-1/#comment-7</link>
		<dc:creator>Chip Bennett</dc:creator>
		<pubDate>Sat, 06 Jun 2009 16:39:14 +0000</pubDate>
		<guid isPermaLink="false">http://buynowshop.com/?p=73#comment-7</guid>
		<description>I use another method, that also does not expose the author&#039;s email address:

(wrapped in php tags, of course):

$isByAuthor = false;
if($comment-&gt;user_id == $post-&gt;post_author) {
     $isByAuthor = true;
 }

Then, inside the comment LI:

if($isByAuthor ) { echo &#039;class=&quot;authorcomment&quot;&#039;;}

Then, of course, the style sheet will define li.authorcomment.

I think it might be a bit cleaner, and isn&#039;t dependent upon knowing the author/admin UserID.

(I&#039;m sure I picked up this method from someone/somewhere (perhaps the Codex; perhaps not). I&#039;d give credit, but I don&#039;t remember anymore...)</description>
		<content:encoded><![CDATA[<p>I use another method, that also does not expose the author&#8217;s email address:</p>
<p>(wrapped in php tags, of course):</p>
<p>$isByAuthor = false;<br />
if($comment-&gt;user_id == $post-&gt;post_author) {<br />
     $isByAuthor = true;<br />
 }</p>
<p>Then, inside the comment LI:</p>
<p>if($isByAuthor ) { echo &#8216;class=&#8221;authorcomment&#8221;&#8216;;}</p>
<p>Then, of course, the style sheet will define li.authorcomment.</p>
<p>I think it might be a bit cleaner, and isn&#8217;t dependent upon knowing the author/admin UserID.</p>
<p>(I&#8217;m sure I picked up this method from someone/somewhere (perhaps the Codex; perhaps not). I&#8217;d give credit, but I don&#8217;t remember anymore&#8230;)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

