<?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: Creating a user directory, part 2: Building the page template</title>
	<atom:link href="http://sillybean.net/wordpress/creating-a-user-directory-part-2-building-the-user-page-template/feed/" rel="self" type="application/rss+xml" />
	<link>http://sillybean.net/wordpress/creating-a-user-directory-part-2-building-the-user-page-template/</link>
	<description>reading, writing, web design, and the intersections thereof</description>
	<lastBuildDate>Thu, 02 Sep 2010 11:29:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
	<item>
		<title>By: Piet</title>
		<link>http://sillybean.net/wordpress/creating-a-user-directory-part-2-building-the-user-page-template/comment-page-1/#comment-18907</link>
		<dc:creator>Piet</dc:creator>
		<pubDate>Thu, 25 Feb 2010 03:55:17 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress-as-cms.com/?p=170#comment-18907</guid>
		<description>&lt;p&gt;Yup, that indeed does the trick!&lt;/p&gt;

&lt;p&gt;Thanks so much for your help Stephanie!&lt;/p&gt;

&lt;p&gt;I have bookmarked your post and will surely visit again &lt;img src=&#039;http://wordpress/wp-includes/images/smilies/icon_smile.gif&#039; alt=&#039;:)&#039; class=&#039;wp-smiley&#039; /&gt; &lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Yup, that indeed does the trick!</p>
<p>Thanks so much for your help Stephanie!</p>
<p>I have bookmarked your post and will surely visit again <img src='http://wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephanie</title>
		<link>http://sillybean.net/wordpress/creating-a-user-directory-part-2-building-the-user-page-template/comment-page-1/#comment-18905</link>
		<dc:creator>Stephanie</dc:creator>
		<pubDate>Thu, 25 Feb 2010 01:34:19 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress-as-cms.com/?p=170#comment-18905</guid>
		<description>&lt;p&gt;Sure. Replace this:&lt;/p&gt;



[code lang=&quot;php&quot;]
if (!empty($auser[&#039;last&#039;]))
[/code]



&lt;p&gt;with this:&lt;/p&gt;



[code lang=&quot;php&quot;]
if ($auser[&#039;nicename&#039;] != &#039;admin&#039;)
[/code]</description>
		<content:encoded><![CDATA[<p>Sure. Replace this:</p>
<pre class="brush: php;">
if (!empty($auser['last']))
</pre>
<p>with this:</p>
<pre class="brush: php;">
if ($auser['nicename'] != 'admin')
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Piet</title>
		<link>http://sillybean.net/wordpress/creating-a-user-directory-part-2-building-the-user-page-template/comment-page-1/#comment-18904</link>
		<dc:creator>Piet</dc:creator>
		<pubDate>Thu, 25 Feb 2010 01:10:13 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress-as-cms.com/?p=170#comment-18904</guid>
		<description>&lt;p&gt;OK for now I &#8220;solved&#8221; it with what you said earlier &#8220;a bit in my working code to exclude people who haven&#226;</description>
		<content:encoded><![CDATA[<p>OK for now I &#8220;solved&#8221; it with what you said earlier &#8220;a bit in my working code to exclude people who haven&acirc;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Piet</title>
		<link>http://sillybean.net/wordpress/creating-a-user-directory-part-2-building-the-user-page-template/comment-page-1/#comment-18902</link>
		<dc:creator>Piet</dc:creator>
		<pubDate>Thu, 25 Feb 2010 00:41:36 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress-as-cms.com/?p=170#comment-18902</guid>
		<description>&lt;p&gt;Hi Stephanie, yeah with an if statement it indeed does make sense. I was not sure however where to include it.&lt;/p&gt;

&lt;p&gt;So I have added it now and tested it, but it still shows everyone. &lt;/p&gt;

&lt;p&gt;I have tried a couple of different alterations, such as [&#039;1&#039;], other user &lt;span class=&quot;caps&quot;&gt;ID&#8217;&lt;/span&gt;s, etc., but none have the desired result.&lt;/p&gt;

&lt;p&gt;Do you have any other suggestions or would it help if I send you my code?&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Hi Stephanie, yeah with an if statement it indeed does make sense. I was not sure however where to include it.</p>
<p>So I have added it now and tested it, but it still shows everyone. </p>
<p>I have tried a couple of different alterations, such as ['1'], other user <span class="caps">ID&#8217;</span>s, etc., but none have the desired result.</p>
<p>Do you have any other suggestions or would it help if I send you my code?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephanie</title>
		<link>http://sillybean.net/wordpress/creating-a-user-directory-part-2-building-the-user-page-template/comment-page-1/#comment-18900</link>
		<dc:creator>Stephanie</dc:creator>
		<pubDate>Thu, 25 Feb 2010 00:01:22 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress-as-cms.com/?p=170#comment-18900</guid>
		<description>&lt;p&gt;Piet, sure! In fact, I have a bit in my working code to exclude people who haven&#8217;t entered a last name, but I took it out for the demo.&lt;/p&gt;

&lt;p&gt;You just need to add an if statement inside the foreach loop that generates the table rows. Here&#8217;s how mine looks:&lt;/p&gt;



[code lang=&quot;php&quot;]
foreach ($allusers as $auser) { 
			if (!empty($auser[&#039;last&#039;])) { ?&gt;
			&lt;tr class=&quot;vcard&quot; id=&quot;&lt;?php echo $auser[&#039;nicename&#039;]; ?&gt;&quot;&gt;
                &lt;td class=&quot;fn uid&quot;&gt;&lt;?php echo $auser[&#039;last&#039;].&quot;, &quot;.$auser[&#039;first&#039;]; ?&gt;&lt;/td&gt;
                &lt;td class=&quot;title&quot;&gt;&lt;?php echo $auser[&#039;title&#039;]; ?&gt;&lt;/td&gt;
                &lt;td class=&quot;tell&quot;&gt;&lt;span class=&quot;areacode&quot;&gt;(979) &lt;/span&gt;&lt;?php echo $auser[&#039;phone&#039;]; ?&gt;&lt;/td&gt;
                &lt;td class=&quot;email&quot;&gt;&lt;a href=&quot;mailto:&lt;?php echo $auser[&#039;email&#039;]; ?&gt;&quot;&gt;&lt;?php echo $auser[&#039;email&#039;]; ?&gt;&lt;/td&gt;
                &lt;td&gt;&lt;a href=&quot;http://feeds.technorati.com/contacts/uwc.tamu.edu/?p=&lt;?php echo $post-&gt;ID.&#039;#&#039;.$auser[&#039;nicename&#039;]; ?&gt;&quot;&gt;
                    &lt;img src=&quot;/images/vcard.gif&quot; title=&quot;Add &lt;?php echo $auser[&#039;first&#039;].&#039; &#039;.$auser[&#039;last&#039;]; ?&gt; to your address book&quot; 
                    alt=&quot;Add &lt;?php echo $auser[&#039;first&#039;].&#039; &#039;.$auser[&#039;last&#039;]; ?&gt; to your address book&quot; /&gt;&lt;/a&gt;&lt;/td&gt;
			&lt;/tr&gt;
		&lt;?php } } ?&gt;
[/code]



&lt;p&gt;To exclude a particular user &lt;span class=&quot;caps&quot;&gt;ID,&lt;/span&gt; I would use something like this:&lt;/p&gt;



[code lang=&quot;php&quot;]
foreach ($allusers as $auser) { 
                $id = array_keys($auser);
                // since $auser has just one element, we can safely say:
                if ($id[0] != $user_to_exclude) {
                   // &lt;tr&gt; loop here
                }
		&lt;?php } } ?&gt;
[/code]



&lt;p&gt;I haven&#8217;t tested that, but I think it should work.&lt;/p&gt;

&lt;p&gt;Did that make sense?&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Piet, sure! In fact, I have a bit in my working code to exclude people who haven&#8217;t entered a last name, but I took it out for the demo.</p>
<p>You just need to add an if statement inside the foreach loop that generates the table rows. Here&#8217;s how mine looks:</p>
<pre class="brush: php;">
foreach ($allusers as $auser) {
			if (!empty($auser['last'])) { ?&gt;
			&lt;tr class=&quot;vcard&quot; id=&quot;&lt;?php echo $auser['nicename']; ?&gt;&quot;&gt;
                &lt;td class=&quot;fn uid&quot;&gt;&lt;?php echo $auser['last'].&quot;, &quot;.$auser['first']; ?&gt;&lt;/td&gt;
                &lt;td class=&quot;title&quot;&gt;&lt;?php echo $auser['title']; ?&gt;&lt;/td&gt;
                &lt;td class=&quot;tell&quot;&gt;&lt;span class=&quot;areacode&quot;&gt;(979) &lt;/span&gt;&lt;?php echo $auser['phone']; ?&gt;&lt;/td&gt;
                &lt;td class=&quot;email&quot;&gt;&lt;a href=&quot;mailto:&lt;?php echo $auser['email']; ?&gt;&quot;&gt;&lt;?php echo $auser['email']; ?&gt;&lt;/td&gt;
                &lt;td&gt;&lt;a href=&quot;http://feeds.technorati.com/contacts/uwc.tamu.edu/?p=&lt;?php echo $post-&gt;ID.'#'.$auser['nicename']; ?&gt;&quot;&gt;
                    &lt;img src=&quot;/images/vcard.gif&quot; title=&quot;Add &lt;?php echo $auser['first'].' '.$auser['last']; ?&gt; to your address book&quot;
                    alt=&quot;Add &lt;?php echo $auser['first'].' '.$auser['last']; ?&gt; to your address book&quot; /&gt;&lt;/a&gt;&lt;/td&gt;
			&lt;/tr&gt;
		&lt;?php } } ?&gt;
</pre>
<p>To exclude a particular user <span class="caps">ID,</span> I would use something like this:</p>
<pre class="brush: php;">
foreach ($allusers as $auser) {
                $id = array_keys($auser);
                // since $auser has just one element, we can safely say:
                if ($id[0] != $user_to_exclude) {
                   // &lt;tr&gt; loop here
                }
		&lt;?php } } ?&gt;
</pre>
<p>I haven&#8217;t tested that, but I think it should work.</p>
<p>Did that make sense?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Piet</title>
		<link>http://sillybean.net/wordpress/creating-a-user-directory-part-2-building-the-user-page-template/comment-page-1/#comment-18897</link>
		<dc:creator>Piet</dc:creator>
		<pubDate>Wed, 24 Feb 2010 22:37:19 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress-as-cms.com/?p=170#comment-18897</guid>
		<description>&lt;p&gt;Hi Stephanie, many thanks for the above code example! I finally came across your post and you made my day!!!&lt;/p&gt;

&lt;p&gt;I have adapted the code a bit to suit my needs, but one thing I cannot figure out: I would like to be able to hide a specific person from the list. How can I do that? with an exclude user-ID command or by explicitly using the name of the person? And how and what should I do to hide that person?&lt;/p&gt;

&lt;p&gt;Many thanks in advance!&lt;/p&gt;

&lt;p&gt;Piet&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Hi Stephanie, many thanks for the above code example! I finally came across your post and you made my day!!!</p>
<p>I have adapted the code a bit to suit my needs, but one thing I cannot figure out: I would like to be able to hide a specific person from the list. How can I do that? with an exclude user-ID command or by explicitly using the name of the person? And how and what should I do to hide that person?</p>
<p>Many thanks in advance!</p>
<p>Piet</p>
]]></content:encoded>
	</item>
</channel>
</rss>
