<?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>Kommentare zu: WordPress: Aufzählung der Kategorien und Tags im Satz</title>
	<atom:link href="http://dnaber.de/blog/2010/aufzaehlung-in-ganzen-saetzen/feed/" rel="self" type="application/rss+xml" />
	<link>http://dnaber.de/blog/2010/aufzaehlung-in-ganzen-saetzen/</link>
	<description>Die zehn neuesten Beiträge aus dem Blog von David Naber.</description>
	<lastBuildDate>Sat, 01 Oct 2011 10:34:40 +0000</lastBuildDate>
	<sy:updatePeriod>daily</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>Von: David</title>
		<link>http://dnaber.de/blog/2010/aufzaehlung-in-ganzen-saetzen/#comment-994</link>
		<dc:creator>David</dc:creator>
		<pubDate>Thu, 04 Mar 2010 09:51:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dnaber.de/?p=1107#comment-994</guid>
		<description>Das geht natürlich auch. Ich hab die Plural behandlung bewusst außen vor gelassen um mehr flexibilität im Satzbau zu lassen. 

P.S. Ich habe mir erlaubt, die Attribute &#039;line&#039; und &#039;escape&#039; aus dem &lt;pre&gt; zu nehmen, sonst erkennt mein Plugin das nicht als Code.</description>
		<content:encoded><![CDATA[<p>Das geht natürlich auch. Ich hab die Plural behandlung bewusst außen vor gelassen um mehr flexibilität im Satzbau zu lassen. </p>
<p>P.S. Ich habe mir erlaubt, die Attribute &#8216;line&#8217; und &#8216;escape&#8217; aus dem &lt;pre&gt; zu nehmen, sonst erkennt mein Plugin das nicht als Code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Thomas Scholz</title>
		<link>http://dnaber.de/blog/2010/aufzaehlung-in-ganzen-saetzen/#comment-993</link>
		<dc:creator>Thomas Scholz</dc:creator>
		<pubDate>Wed, 03 Mar 2010 22:47:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dnaber.de/?p=1107#comment-993</guid>
		<description>Ich gehe einen etwas anderen Weg, der auch Plural und Singular berücksichtigt:

&lt;pre lang=&quot;php&quot;&gt;function nice_cats(
	$singular=&#039;Thema&#039;, $plural=&#039;Themen&#039;, $sep=&#039;, &#039;, $last=&#039; und &#039;)
{
	$a  = explode(&#039;#&#039;, get_the_category_list(&#039;#&#039;));
	$n  = count($a);
	$t  = array_pop($a);

	/* Ja, das *ist* häßlich. */
	return ( 1 &lt; $n ? $plural : $singular )
		. &#039;: &#039; . implode($sep, $a) . ( 0 &lt; $n-1 ? $last : &#039;&#039; ) . $t;
}&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Ich gehe einen etwas anderen Weg, der auch Plural und Singular berücksichtigt:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> nice_cats<span style="color: #009900;">&#40;</span>
	<span style="color: #000088;">$singular</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'Thema'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$plural</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'Themen'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$sep</span><span style="color: #339933;">=</span><span style="color: #0000ff;">', '</span><span style="color: #339933;">,</span> <span style="color: #000088;">$last</span><span style="color: #339933;">=</span><span style="color: #0000ff;">' und '</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$a</span>  <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#'</span><span style="color: #339933;">,</span> get_the_category_list<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$n</span>  <span style="color: #339933;">=</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$t</span>  <span style="color: #339933;">=</span> <span style="color: #990000;">array_pop</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">/* Ja, das *ist* häßlich. */</span>
	<span style="color: #b1b100;">return</span> <span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> <span style="color: #000088;">$n</span> ? <span style="color: #000088;">$plural</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$singular</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #339933;">.</span> <span style="color: #0000ff;">': '</span> <span style="color: #339933;">.</span> <span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sep</span><span style="color: #339933;">,</span> <span style="color: #000088;">$a</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">0</span> <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> <span style="color: #000088;">$n</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span> ? <span style="color: #000088;">$last</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">''</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$t</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>Von: Francesco</title>
		<link>http://dnaber.de/blog/2010/aufzaehlung-in-ganzen-saetzen/#comment-992</link>
		<dc:creator>Francesco</dc:creator>
		<pubDate>Tue, 02 Mar 2010 21:23:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dnaber.de/?p=1107#comment-992</guid>
		<description>Gerade heute hab ich mir den Kopf zerbrochen, wie ich das bewerkstelligen könnte. Diese einfache Lösung passt wie die Faust auf&#039;s Auge – vielen Dank!</description>
		<content:encoded><![CDATA[<p>Gerade heute hab ich mir den Kopf zerbrochen, wie ich das bewerkstelligen könnte. Diese einfache Lösung passt wie die Faust auf&#8217;s Auge – vielen Dank!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

