<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>since1985.de</title>
	<atom:link href="http://since1985.de/feed/" rel="self" type="application/rss+xml" />
	<link>http://since1985.de</link>
	<description>Das Weblog von Gerrit Fries</description>
	<lastBuildDate>Sat, 13 Feb 2010 14:18:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP: Den durchschnittlichen Farbwert eines Bildes ermitteln</title>
		<link>http://since1985.de/2010/02/13/php-den-durchschnittlichen-farbwert-eines-bildes-ermitteln/</link>
		<comments>http://since1985.de/2010/02/13/php-den-durchschnittlichen-farbwert-eines-bildes-ermitteln/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 14:04:16 +0000</pubDate>
		<dc:creator>Gerrit Fries</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[avarage]]></category>
		<category><![CDATA[bild]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[durchschnitt]]></category>
		<category><![CDATA[farbe]]></category>
		<category><![CDATA[gdlib]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[range]]></category>
		<category><![CDATA[wert]]></category>

		<guid isPermaLink="false">http://since1985.de/?p=324</guid>
		<description><![CDATA[Mit den folgenden Zeilen Code erhält man die durchschnittliche Farbe eines Bild als RGB-Wert. Das entsprechende Bild wird auf einen Pixel skaliert, der RGB-Farbwert dieses Pixel im Array $color gespeichert.
Recht nützlich, um beispielsweise eine freie Fläche oder einen Hintergrund neben einem Bild automatisch mit einer passenden Farbe zu füllen. Hier gibt es ein Beispiel: http://gfries.de/324.php
&#60;?php
 [...]]]></description>
			<content:encoded><![CDATA[<p>Mit den folgenden Zeilen Code erhält man die durchschnittliche Farbe eines Bild als RGB-Wert. Das entsprechende Bild wird auf einen Pixel skaliert, der RGB-Farbwert dieses Pixel im Array <code>$color</code> gespeichert.</p>
<p>Recht nützlich, um beispielsweise eine freie Fläche oder einen Hintergrund neben einem Bild automatisch mit einer passenden Farbe zu füllen. Hier gibt es ein Beispiel: <a href="http://gfries.de/324.php">http://gfries.de/324.php</a></p>
<pre class="php"><span style="color: #ac1a2f; font-weight: bold;">&lt;?php</span>
  <span style="color: #f90;">$file</span> = <span style="color: #666;">'deinbild.jpg'</span>;
  <span style="color: #f90;">$image</span> = imagecreatefromjpeg<span style="color: #f90;">&#40;</span><span style="color: #f90;">$file</span><span style="color: #f90;">&#41;</span>;
  <span style="color: #f90;">$w</span> = imagesx<span style="color: #f90;">&#40;</span><span style="color: #f90;">$image</span><span style="color: #f90;">&#41;</span>;
  <span style="color: #f90;">$h</span> = imagesy<span style="color: #f90;">&#40;</span><span style="color: #f90;">$image</span><span style="color: #f90;">&#41;</span>;
  <span style="color: #f90;">$avarage_pixel</span> = imagecreatetruecolor<span style="color: #f90;">&#40;</span><span style="color: #9db700;">1</span>, <span style="color: #9db700;">1</span><span style="color: #f90;">&#41;</span>;
  imagecopyresampled<span style="color: #f90;">&#40;</span><span style="color: #f90;">$avarage_pixel</span>, <span style="color: #f90;">$image</span>, <span style="color: #9db700;">0</span>, <span style="color: #9db700;">0</span>, <span style="color: #9db700;">0</span>, <span style="color: #9db700;">0</span>, <span style="color: #9db700;">1</span>, <span style="color: #9db700;">1</span>, <span style="color: #f90;">$w</span>, <span style="color: #f90;">$h</span><span style="color: #f90;">&#41;</span>;
  <span style="color: #f90;">$rgb</span> = imagecolorat<span style="color: #f90;">&#40;</span><span style="color: #f90;">$avarage_pixel</span>, <span style="color: #9db700;">0</span>, <span style="color: #9db700;">0</span><span style="color: #f90;">&#41;</span>;
  <span style="color: #f90;">$color</span> = imagecolorsforindex<span style="color: #f90;">&#40;</span><span style="color: #f90;">$avarage_pixel</span>, <span style="color: #f90;">$rgb</span><span style="color: #f90;">&#41;</span>;
  <span style="color: #f90;">$r</span> = <span style="color: #f90;">$color</span><span style="color: #f90;">&#91;</span><span style="color: #666;">'red'</span><span style="color: #f90;">&#93;</span>;
  <span style="color: #f90;">$g</span> = <span style="color: #f90;">$color</span><span style="color: #f90;">&#91;</span><span style="color: #666;">'green'</span><span style="color: #f90;">&#93;</span>;
  <span style="color: #f90;">$b</span> = <span style="color: #f90;">$color</span><span style="color: #f90;">&#91;</span><span style="color: #666;">'blue'</span><span style="color: #f90;">&#93;</span>;
<span style="color: #ac1a2f; font-weight: bold;">?&gt;</span></pre><span class='plaintext'><a href='http://since1985.de/wordpress/wp-content/themes/sevenfive/media/code/since1985de_5794e45b.txt' class='external'>Als Textdatei öffnen</a> | <span>since1985de_5794e45b.txt | 455 Byte</span></span>
]]></content:encoded>
			<wfw:commentRss>http://since1985.de/2010/02/13/php-den-durchschnittlichen-farbwert-eines-bildes-ermitteln/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress-Klassen und Funktionen außerhalb der Installation verwenden</title>
		<link>http://since1985.de/2010/02/07/wordpress-klassen-und-funktionen-auserhalb-der-installation-verwenden/</link>
		<comments>http://since1985.de/2010/02/07/wordpress-klassen-und-funktionen-auserhalb-der-installation-verwenden/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 11:55:15 +0000</pubDate>
		<dc:creator>Gerrit Fries</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[funktionen]]></category>
		<category><![CDATA[global]]></category>
		<category><![CDATA[klassen]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://since1985.de/?p=310</guid>
		<description><![CDATA[Um alle WordPress-Funktionen und Klassen auch außerhalb der WordPress-Installation verwenden zu können, muss man nur die wp-config.php in das jeweilige Script includen. In diesem Snippet erstelle ich so beispielsweise ein XML-Feed meiner Blogposts indem ich die als global deklarierte Datenbank-Klasse $wpdb nutze.
&#60;?php include_once&#40;'wordpress/wp-config.php'&#41;;
&#160;
	function create_xml_feed&#40;&#41;&#123;
&#160;
		global $wpdb, $table_prefix;
&#160;
		$result = $wpdb-&#62;get_results&#40;'SELECT * FROM '.$table_prefix.'posts
		WHERE post_status=&#34;publish&#34; ORDER BY ID [...]]]></description>
			<content:encoded><![CDATA[<p>Um alle WordPress-Funktionen und Klassen auch außerhalb der WordPress-Installation verwenden zu können, muss man nur die wp-config.php in das jeweilige Script includen. In diesem Snippet erstelle ich so beispielsweise ein XML-Feed meiner Blogposts indem ich die als <code>global</code> deklarierte Datenbank-Klasse <code>$wpdb</code> nutze.</p>
<pre class="php"><span style="color: #ac1a2f; font-weight: bold;">&lt;?php</span> <span style="color: #207aaa;">include_once</span><span style="color: #f90;">&#40;</span><span style="color: #666;">'wordpress/wp-config.php'</span><span style="color: #f90;">&#41;</span>;
&nbsp;
	<span style="color: #ac1a2f; font-weight: bold;">function</span> create_xml_feed<span style="color: #f90;">&#40;</span><span style="color: #f90;">&#41;</span><span style="color: #f90;">&#123;</span>
&nbsp;
		<a href="http://www.php.net/global"><span style="color: #207aaa;">global</span></a> <span style="color: #f90;">$wpdb</span>, <span style="color: #f90;">$table_prefix</span>;
&nbsp;
		<span style="color: #f90;">$result</span> = <span style="color: #f90;">$wpdb</span>-&gt;<span style="color: #f90;">get_results</span><span style="color: #f90;">&#40;</span><span style="color: #666;">'SELECT * FROM '</span>.<span style="color: #f90;">$table_prefix</span>.<span style="color: #666;">'posts
		WHERE post_status=&quot;publish&quot; ORDER BY ID DESC'</span><span style="color: #f90;">&#41;</span>;
&nbsp;
		<span style="color: #f90;">$xml</span> = <span style="color: #666;">'&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
		&lt;buildup&gt;'</span>;
&nbsp;
		<span style="color: #207aaa;">foreach</span><span style="color: #f90;">&#40;</span><span style="color: #f90;">$result</span> <span style="color: #207aaa;">as</span> <span style="color: #f90;">$post</span><span style="color: #f90;">&#41;</span><span style="color: #f90;">&#123;</span>
			<span style="color: #f90;">$xml</span> .=
			<span style="color: #666;">'
&lt;post id=&quot;'</span>.<span style="color: #f90;">$post</span>-&gt;<span style="color: #f90;">ID</span>.<span style="color: #666;">'&quot;&gt;
				&lt;ID&gt;'</span>.<span style="color: #f90;">$post</span>-&gt;<span style="color: #f90;">ID</span>.<span style="color: #666;">'&lt;/ID&gt;
&lt;post_author&gt;&lt;![CDATA['</span>.<span style="color: #f90;">$post</span>-&gt;<span style="color: #f90;">post_author</span>.<span style="color: #666;">']]&gt;&lt;/post_author&gt;
&lt;post_date&gt;'</span>.<span style="color: #f90;">$post</span>-&gt;<span style="color: #f90;">post_date</span>.<span style="color: #666;">'&lt;/post_date&gt;
&lt;post_date_gmt&gt;'</span>.<span style="color: #f90;">$post</span>-&gt;<span style="color: #f90;">post_date_gmt</span>.<span style="color: #666;">'&lt;/post_date_gmt&gt;
&lt;post_content&gt;&lt;![CDATA['</span>.<span style="color: #f90;">$post</span>-&gt;<span style="color: #f90;">post_content</span>.<span style="color: #666;">']]&gt;&lt;/post_content&gt;
&lt;post_title&gt;&lt;![CDATA['</span>.<span style="color: #f90;">$post</span>-&gt;<span style="color: #f90;">post_title</span>.<span style="color: #666;">']]&gt;&lt;/post_title&gt;
&lt;post_name&gt;'</span>.<span style="color: #f90;">$post</span>-&gt;<span style="color: #f90;">post_name</span>.<span style="color: #666;">'&lt;/post_name&gt;
&lt;post_modified&gt;'</span>.<span style="color: #f90;">$post</span>-&gt;<span style="color: #f90;">post_modified</span>.<span style="color: #666;">'&lt;/post_modified&gt;
&lt;post_modified_gmt&gt;'</span>.<span style="color: #f90;">$post</span>-&gt;<span style="color: #f90;">post_modified_gmt</span>.<span style="color: #666;">'&lt;/post_modified_gmt&gt;
				&lt;guid&gt;'</span>.<span style="color: #f90;">$post</span>-&gt;<span style="color: #f90;">guid</span>.<span style="color: #666;">'&lt;/guid&gt;
				&lt;comment_count&gt;'</span>.<span style="color: #f90;">$post</span>-&gt;<span style="color: #f90;">comment_count</span>.<span style="color: #666;">'&lt;/comment_count&gt;
			&lt;/post&gt;'</span>;
		<span style="color: #f90;">&#125;</span>
&nbsp;
		file_put_contents<span style="color: #f90;">&#40;</span><span style="color: #666;">'feed.xml'</span>, <span style="color: #f90;">$xml</span>.<span style="color: #666;">'&lt;/buildup&gt;'</span><span style="color: #f90;">&#41;</span>;
&nbsp;
	<span style="color: #f90;">&#125;</span>
&nbsp;
<span style="color: #ac1a2f; font-weight: bold;">?&gt;</span></pre><span class='plaintext'><a href='http://since1985.de/wordpress/wp-content/themes/sevenfive/media/code/since1985de_e2304277.txt' class='external'>Als Textdatei öffnen</a> | <span>since1985de_e2304277.txt | 1.05 Kilobyte</span></span>
]]></content:encoded>
			<wfw:commentRss>http://since1985.de/2010/02/07/wordpress-klassen-und-funktionen-auserhalb-der-installation-verwenden/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP: SimpleXML-Tipp um Ausgabefehler frühzeitig zu vermeiden</title>
		<link>http://since1985.de/2010/02/06/php-simplexml-tipp-um-ausgabefehler-fruhzeitig-zu-vermeiden/</link>
		<comments>http://since1985.de/2010/02/06/php-simplexml-tipp-um-ausgabefehler-fruhzeitig-zu-vermeiden/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 10:40:42 +0000</pubDate>
		<dc:creator>Gerrit Fries</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[bom]]></category>
		<category><![CDATA[byte order mark]]></category>
		<category><![CDATA[entfernen]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[fehler]]></category>
		<category><![CDATA[optimieren]]></category>
		<category><![CDATA[remove]]></category>
		<category><![CDATA[simplexml]]></category>
		<category><![CDATA[trim]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://since1985.de/?p=284</guid>
		<description><![CDATA[Vor kurzem hat sich Script von mir zerschossen, weil beim umwandeln einer XML-Datei in ein Objekt via simplexml_load_file() ein Fehler durch das BOM in der XML-Datei ausgelöst wurde. 
Als Byte Order Mark (BOM, dt. „Bytereihenfolge-Markierung“) wird das Unicode-Zeichen U+FEFF (zero-width non-breaking space) am Anfang eines Datenstroms bezeichnet, wo es als Signatur zur Definition der Byte-Reihenfolge [...]]]></description>
			<content:encoded><![CDATA[<p>Vor kurzem hat sich Script von mir zerschossen, weil beim umwandeln einer XML-Datei in ein Objekt via <code>simplexml_load_file()</code> ein Fehler durch das <abbr title="Byte Order Mark">BOM</abbr> in der XML-Datei ausgelöst wurde. </p>
<blockquote><p>Als Byte Order Mark (BOM, dt. „Bytereihenfolge-Markierung“) wird das Unicode-Zeichen U+FEFF (zero-width non-breaking space) am Anfang eines Datenstroms bezeichnet, wo es als Signatur zur Definition der Byte-Reihenfolge und Kodierungsform in UCS/Unicode-Zeichenketten verwendet wird. <a href="http://de.wikipedia.org/wiki/Byte_Order_Mark">http://de.wikipedia.org/wiki/Byte_Order_Mark</a></p></blockquote>
<p>Mein Script war zu diesem Zeitpunkt noch sehr fehleranfällig: Ich habe lediglich geprüft, ob die benötigte XML-Datei auf dem Server vorhanden ist und sie im Erfolgsfall mittels <code>simplexml_load_file()</code> als Objekt zurück geben lassen.</p>
<pre class="php"><span style="color: #ac1a2f; font-weight: bold;">&lt;?php</span>
	<span style="color: #f90;">$file</span> = <span style="color: #666;">'xml/data.xml'</span>;
	<span style="color: #207aaa;">if</span><span style="color: #f90;">&#40;</span><a href="http://www.php.net/file_exists"><span style="color: #207aaa;">file_exists</span></a><span style="color: #f90;">&#40;</span><span style="color: #f90;">$file</span><span style="color: #f90;">&#41;</span><span style="color: #f90;">&#41;</span><span style="color: #f90;">&#123;</span>
		<span style="color: #f90;">$xml</span> = simplexml_load_file<span style="color: #f90;">&#40;</span><span style="color: #f90;">$file</span><span style="color: #f90;">&#41;</span>;
		<span style="color: #f90;">$txt</span> = <span style="color: #f90;">$xml</span>-&gt;<span style="color: #f90;">screen</span>-&gt;<span style="color: #f90;">txt</span>;
	<span style="color: #f90;">&#125;</span>
	<a href="http://www.php.net/echo"><span style="color: #207aaa;">echo</span></a> <span style="color: #f90;">$txt</span>;
<span style="color: #ac1a2f; font-weight: bold;">?&gt;</span></pre><span class='plaintext'><a href='http://since1985.de/wordpress/wp-content/themes/sevenfive/media/code/since1985de_ef558f9b.txt' class='external'>Als Textdatei öffnen</a> | <span>since1985de_ef558f9b.txt | 185 Byte</span></span>
<h4>Eine andere Lösung musste her.</h4>
<p>Aber durch den vom BOM ausgelösten Fehler – der sich zwar durch manuelles entfernen beheben lassen würde – merkte ich, dass man, gerade wenn man keine Kontrolle über die XML-Dateien hat da sie von mehreren Anwendern bearbeitet werden, einen kleinen Umweg gehen muss. Der Inhalt der XML-Datei wird mittels <code>file_get_contents()</code> ausgelesen und per <code>simplexml_load_string()</code> als Objekt zurück geliefert. Außerdem wird das BOM durch die Funktion <code>trim()</code> entfernt und bei Bedarf ein Fehler ausgegeben.</p>
<pre class="php"><span style="color: #ac1a2f; font-weight: bold;">&lt;?php</span>
	<span style="color: #f90;">$file</span> = <span style="color: #666;">'xml/data.xml'</span>;
	<span style="color: #207aaa;">if</span><span style="color: #f90;">&#40;</span><a href="http://www.php.net/file_exists"><span style="color: #207aaa;">file_exists</span></a><span style="color: #f90;">&#40;</span><span style="color: #f90;">$file</span><span style="color: #f90;">&#41;</span><span style="color: #f90;">&#41;</span><span style="color: #f90;">&#123;</span>
		<span style="color: #f90;">$string</span> = <a href="http://www.php.net/trim"><span style="color: #207aaa;">trim</span></a><span style="color: #f90;">&#40;</span><a href="http://www.php.net/file_get_contents"><span style="color: #207aaa;">file_get_contents</span></a><span style="color: #f90;">&#40;</span><span style="color: #f90;">$file</span><span style="color: #f90;">&#41;</span><span style="color: #f90;">&#41;</span>;
		<span style="color: #f90;">$xml</span> = simplexml_load_string<span style="color: #f90;">&#40;</span><span style="color: #f90;">$string</span><span style="color: #f90;">&#41;</span>;
		<span style="color: #f90;">$txt</span> = <span style="color: #f90;">$xml</span>-&gt;<span style="color: #f90;">screen</span>-&gt;<span style="color: #f90;">txt</span>;
	<span style="color: #f90;">&#125;</span> <span style="color: #207aaa;">else</span> <span style="color: #f90;">&#123;</span>
		<span style="color: #f90;">$txt</span> = <span style="color: #666;">'Fehler: Ich konnte '</span>.<span style="color: #f90;">$file</span>.<span style="color: #666;">' nicht finden.'</span>;
	<span style="color: #f90;">&#125;</span>
	<a href="http://www.php.net/echo"><span style="color: #207aaa;">echo</span></a> <span style="color: #f90;">$txt</span>;
<span style="color: #ac1a2f; font-weight: bold;">?&gt;</span></pre><span class='plaintext'><a href='http://since1985.de/wordpress/wp-content/themes/sevenfive/media/code/since1985de_8e8ccd83.txt' class='external'>Als Textdatei öffnen</a> | <span>since1985de_8e8ccd83.txt | 298 Byte</span></span>
<h4>Wenn man schon dabei ist …</h4>
<p>Nachdem ich nun schon recht zufrieden mit dieser weniger fehleranfälligen Version meines Scripts war, habe ich mir noch gedacht, dass es vielleicht sinnvoll wäre neben der Existenz der XML-Datei auch noch zu prüfen, ob es sich bei dem zurück gelieferten Wert um en Objekt handelt.</p>
<pre class="php"><span style="color: #ac1a2f; font-weight: bold;">&lt;?php</span>
	<span style="color: #f90;">$file</span> = <span style="color: #666;">'xml/data.xml'</span>;
	<span style="color: #207aaa;">if</span><span style="color: #f90;">&#40;</span><a href="http://www.php.net/file_exists"><span style="color: #207aaa;">file_exists</span></a><span style="color: #f90;">&#40;</span><span style="color: #f90;">$file</span><span style="color: #f90;">&#41;</span><span style="color: #f90;">&#41;</span><span style="color: #f90;">&#123;</span>
		<span style="color: #f90;">$string</span> = <a href="http://www.php.net/trim"><span style="color: #207aaa;">trim</span></a><span style="color: #f90;">&#40;</span><a href="http://www.php.net/file_get_contents"><span style="color: #207aaa;">file_get_contents</span></a><span style="color: #f90;">&#40;</span><span style="color: #f90;">$file</span><span style="color: #f90;">&#41;</span><span style="color: #f90;">&#41;</span>;
		<span style="color: #f90;">$xml</span> = simplexml_load_string<span style="color: #f90;">&#40;</span><span style="color: #f90;">$string</span><span style="color: #f90;">&#41;</span>;
		<span style="color: #207aaa;">if</span><span style="color: #f90;">&#40;</span><a href="http://www.php.net/is_object"><span style="color: #207aaa;">is_object</span></a><span style="color: #f90;">&#40;</span><span style="color: #f90;">$xml</span><span style="color: #f90;">&#41;</span><span style="color: #f90;">&#41;</span><span style="color: #f90;">&#123;</span>
			<span style="color: #f90;">$txt</span> = <span style="color: #f90;">$xml</span>-&gt;<span style="color: #f90;">screen</span>-&gt;<span style="color: #f90;">txt</span>;
		<span style="color: #f90;">&#125;</span> <span style="color: #207aaa;">else</span> <span style="color: #f90;">&#123;</span>
			<span style="color: #f90;">$txt</span> = <span style="color: #666;">'Fehler: Damit kann ich nicht arbeiten.'</span>;
		<span style="color: #f90;">&#125;</span>
	<span style="color: #f90;">&#125;</span> <span style="color: #207aaa;">else</span> <span style="color: #f90;">&#123;</span>
		<span style="color: #f90;">$txt</span> = <span style="color: #666;">'Fehler: Ich konnte '</span>.<span style="color: #f90;">$file</span>.<span style="color: #666;">' nicht finden.'</span>;
	<span style="color: #f90;">&#125;</span>
	<a href="http://www.php.net/echo"><span style="color: #207aaa;">echo</span></a> <span style="color: #f90;">$txt</span>;
<span style="color: #ac1a2f; font-weight: bold;">?&gt;</span></pre><span class='plaintext'><a href='http://since1985.de/wordpress/wp-content/themes/sevenfive/media/code/since1985de_c7ec04e2.txt' class='external'>Als Textdatei öffnen</a> | <span>since1985de_c7ec04e2.txt | 389 Byte</span></span>
]]></content:encoded>
			<wfw:commentRss>http://since1985.de/2010/02/06/php-simplexml-tipp-um-ausgabefehler-fruhzeitig-zu-vermeiden/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Toyota IQ-Font</title>
		<link>http://since1985.de/2010/01/20/toyota-iq-font/</link>
		<comments>http://since1985.de/2010/01/20/toyota-iq-font/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 00:01:58 +0000</pubDate>
		<dc:creator>Gerrit Fries</dc:creator>
				<category><![CDATA[Video]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[inspiration]]></category>
		<category><![CDATA[vimeo]]></category>

		<guid isPermaLink="false">http://since1985.de/?p=280</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<div class='vimeo'><object type='application/x-shockwave-flash' width='400' height='300' data='http://vimeo.com/moogaloop.swf?clip_id=5233789&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=207aaa&amp;fullscreen=1&amp;server=vimeo.com'><param name='src' value='http://vimeo.com/moogaloop.swf?clip_id=5233789&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=207aaa&amp;fullscreen=1&amp;server=vimeo.com'/><param name='allowfullscreen' value='true'/><param name='menu' value='false'/></object></div>
]]></content:encoded>
			<wfw:commentRss>http://since1985.de/2010/01/20/toyota-iq-font/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The PEN Story</title>
		<link>http://since1985.de/2010/01/01/the-pen-story/</link>
		<comments>http://since1985.de/2010/01/01/the-pen-story/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 12:45:37 +0000</pubDate>
		<dc:creator>Gerrit Fries</dc:creator>
				<category><![CDATA[Video]]></category>
		<category><![CDATA[stopmotion]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://since1985.de/?p=274</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<div class='vimeo'><object type='application/x-shockwave-flash' width='400' height='300' data='http://vimeo.com/moogaloop.swf?clip_id=5520752&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=207aaa&amp;fullscreen=1&amp;server=vimeo.com'><param name='src' value='http://vimeo.com/moogaloop.swf?clip_id=5520752&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=207aaa&amp;fullscreen=1&amp;server=vimeo.com'/><param name='allowfullscreen' value='true'/><param name='menu' value='false'/></object></div>
]]></content:encoded>
			<wfw:commentRss>http://since1985.de/2010/01/01/the-pen-story/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>360° Zeitraffer</title>
		<link>http://since1985.de/2009/12/23/360%c2%b0-zeitraffer/</link>
		<comments>http://since1985.de/2009/12/23/360%c2%b0-zeitraffer/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 12:03:19 +0000</pubDate>
		<dc:creator>Gerrit Fries</dc:creator>
				<category><![CDATA[Video]]></category>
		<category><![CDATA[360°]]></category>
		<category><![CDATA[timelapse]]></category>
		<category><![CDATA[vimeo]]></category>
		<category><![CDATA[zeitraffer]]></category>

		<guid isPermaLink="false">http://since1985.de/?p=269</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<div class='vimeo'><object type='application/x-shockwave-flash' width='400' height='300' data='http://vimeo.com/moogaloop.swf?clip_id=8270175&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=207aaa&amp;fullscreen=1&amp;server=vimeo.com'><param name='src' value='http://vimeo.com/moogaloop.swf?clip_id=8270175&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=207aaa&amp;fullscreen=1&amp;server=vimeo.com'/><param name='allowfullscreen' value='true'/><param name='menu' value='false'/></object></div>
]]></content:encoded>
			<wfw:commentRss>http://since1985.de/2009/12/23/360%c2%b0-zeitraffer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP: Prüfen ob Wert gerade oder ungerade ist.</title>
		<link>http://since1985.de/2009/12/23/php-prufen-ob-wert-gerade-oder-ungerade-ist/</link>
		<comments>http://since1985.de/2009/12/23/php-prufen-ob-wert-gerade-oder-ungerade-ist/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 11:46:55 +0000</pubDate>
		<dc:creator>Gerrit Fries</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[abwechselnd]]></category>
		<category><![CDATA[check]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[even]]></category>
		<category><![CDATA[gerade]]></category>
		<category><![CDATA[odd]]></category>
		<category><![CDATA[prüfen]]></category>
		<category><![CDATA[ungerade]]></category>

		<guid isPermaLink="false">http://since1985.de/?p=260</guid>
		<description><![CDATA[Mit dieser Funktion kann man prüfen, ob eine Zahl gerade oder ungerade ist. Nützlich um beispielsweise einzelne Listenpunkte abwechselnd einzufärben.
&#60;?php
function is_odd&#40;$number&#41; &#123;
	$number % 2 == 0 ? $out = false : $out = true;
	return $out;
&#125;
&#160;
/* Beispiel */
for&#40;$i = 0; $i &#60;=10; $i++&#41;&#123;
	is_odd&#40;$i&#41; ? $class = &#34;ungerade&#34; : $class = &#34;gerade&#34;;
	$out = '
&#60;li class=&#34;'.$class.'&#34;&#62;'.$i.' ist '.$class.'&#60;/li&#62;
&#160;
';
	echo [...]]]></description>
			<content:encoded><![CDATA[<p>Mit dieser Funktion kann man prüfen, ob eine Zahl gerade oder ungerade ist. Nützlich um beispielsweise einzelne Listenpunkte abwechselnd einzufärben.</p>
<pre class="php"><span style="color: #ac1a2f; font-weight: bold;">&lt;?php</span>
<span style="color: #ac1a2f; font-weight: bold;">function</span> is_odd<span style="color: #f90;">&#40;</span><span style="color: #f90;">$number</span><span style="color: #f90;">&#41;</span> <span style="color: #f90;">&#123;</span>
	<span style="color: #f90;">$number</span> % <span style="color: #9db700;">2</span> == <span style="color: #9db700;">0</span> ? <span style="color: #f90;">$out</span> = <span style="color: #ac1a2f; font-weight: bold;">false</span> : <span style="color: #f90;">$out</span> = <span style="color: #ac1a2f; font-weight: bold;">true</span>;
	<span style="color: #207aaa;">return</span> <span style="color: #f90;">$out</span>;
<span style="color: #f90;">&#125;</span>
&nbsp;
<span style="color: #207aaa; font-style: italic;">/* Beispiel */</span>
<span style="color: #207aaa;">for</span><span style="color: #f90;">&#40;</span><span style="color: #f90;">$i</span> = <span style="color: #9db700;">0</span>; <span style="color: #f90;">$i</span> &lt;=<span style="color: #9db700;">10</span>; <span style="color: #f90;">$i</span>++<span style="color: #f90;">&#41;</span><span style="color: #f90;">&#123;</span>
	is_odd<span style="color: #f90;">&#40;</span><span style="color: #f90;">$i</span><span style="color: #f90;">&#41;</span> ? <span style="color: #f90;">$class</span> = <span style="color: #666;">&quot;ungerade&quot;</span> : <span style="color: #f90;">$class</span> = <span style="color: #666;">&quot;gerade&quot;</span>;
	<span style="color: #f90;">$out</span> = <span style="color: #666;">'
&lt;li class=&quot;'</span>.<span style="color: #f90;">$class</span>.<span style="color: #666;">'&quot;&gt;'</span>.<span style="color: #f90;">$i</span>.<span style="color: #666;">' ist '</span>.<span style="color: #f90;">$class</span>.<span style="color: #666;">'&lt;/li&gt;
&nbsp;
'</span>;
	<a href="http://www.php.net/echo"><span style="color: #207aaa;">echo</span></a> <span style="color: #f90;">$out</span>;
<span style="color: #f90;">&#125;</span>
<span style="color: #ac1a2f; font-weight: bold;">?&gt;</span></pre><span class='plaintext'><a href='http://since1985.de/wordpress/wp-content/themes/sevenfive/media/code/since1985de_dbc64b2a.txt' class='external'>Als Textdatei öffnen</a> | <span>since1985de_dbc64b2a.txt | 325 Byte</span></span>
]]></content:encoded>
			<wfw:commentRss>http://since1985.de/2009/12/23/php-prufen-ob-wert-gerade-oder-ungerade-ist/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>PHP: Ordner, Dateien oder bestimmten Dateityp eines Verzeichnis auslesen mit nur einer Zeile Code</title>
		<link>http://since1985.de/2009/12/22/php-ordner-dateien-oder-bestimmten-dateityp-eines-verzeichnis-auslesen-mit-nur-einer-zeile-code/</link>
		<comments>http://since1985.de/2009/12/22/php-ordner-dateien-oder-bestimmten-dateityp-eines-verzeichnis-auslesen-mit-nur-einer-zeile-code/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 13:32:26 +0000</pubDate>
		<dc:creator>Gerrit Fries</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[anzeigen]]></category>
		<category><![CDATA[auslesen]]></category>
		<category><![CDATA[datei]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[folder]]></category>
		<category><![CDATA[name]]></category>
		<category><![CDATA[ordner]]></category>
		<category><![CDATA[preg_match]]></category>
		<category><![CDATA[scandir]]></category>

		<guid isPermaLink="false">http://since1985.de/?p=245</guid>
		<description><![CDATA[Achtung, in diesem Beispiel wird die PHP5-Funktion scandir() verwendet!
Dieses Thema kommt immer wieder auf: Man möchte alle Ordner, Dateien, oder bestimmte Dateitypen eines Verzeichnis auslesen. Dank der PHP5-Funktion scandir() und der schon länger geliebten Funktion preg_match() geht das mittlerweile quasi in einer Zeile. Zwar ist mein Ansatz nicht ganz unanfällig für Fehler, da theoretisch auch [...]]]></description>
			<content:encoded><![CDATA[<h4><i>Achtung, in diesem Beispiel wird die PHP5-Funktion scandir() verwendet!</i></h4>
<p>Dieses Thema kommt immer wieder auf: Man möchte alle Ordner, Dateien, oder bestimmte Dateitypen eines Verzeichnis auslesen. Dank der PHP5-Funktion scandir() und der schon länger geliebten Funktion preg_match() geht das mittlerweile quasi in einer Zeile. Zwar ist mein Ansatz nicht ganz unanfällig für Fehler, da theoretisch auch Ordner Punkte im Dateinamen enthalten können, aber mit diesem Wissen im Hintergrund und der Vermeidung eben solcher Schreibweisen verfügt man über eine – in meinen Augen – recht performante Lösung.</p>
<pre class="php"><span style="color: #ac1a2f; font-weight: bold;">&lt;?php</span>
<span style="color: #ac1a2f; font-weight: bold;">function</span> getSubfolder<span style="color: #f90;">&#40;</span><span style="color: #f90;">$path</span><span style="color: #f90;">&#41;</span><span style="color: #f90;">&#123;</span>
	<span style="color: #207aaa;">foreach</span><span style="color: #f90;">&#40;</span>scandir<span style="color: #f90;">&#40;</span><span style="color: #f90;">$path</span><span style="color: #f90;">&#41;</span> <span style="color: #207aaa;">as</span> <span style="color: #f90;">$item</span><span style="color: #f90;">&#41;</span>
	!<a href="http://www.php.net/preg_match"><span style="color: #207aaa;">preg_match</span></a><span style="color: #f90;">&#40;</span><span style="color: #666;">&quot;/<span style="color: #ac1a2f; font-weight: bold;">\.</span>/&quot;</span>, <span style="color: #f90;">$item</span><span style="color: #f90;">&#41;</span> ? <span style="color: #f90;">$out</span> .= <span style="color: #f90;">$item</span>.<span style="color: #666;">'&lt;br/&gt;'</span> : <span style="color: #ac1a2f; font-weight: bold;">NULL</span>;
	<span style="color: #207aaa;">return</span> <span style="color: #f90;">$out</span>;
<span style="color: #f90;">&#125;</span>
<a href="http://www.php.net/echo"><span style="color: #207aaa;">echo</span></a> getSubfolder<span style="color: #f90;">&#40;</span><span style="color: #f90;">$_SERVER</span><span style="color: #f90;">&#91;</span><span style="color: #666;">'DOCUMENT_ROOT'</span><span style="color: #f90;">&#93;</span><span style="color: #f90;">&#41;</span>;
&nbsp;
<span style="color: #ac1a2f; font-weight: bold;">function</span> getFile<span style="color: #f90;">&#40;</span><span style="color: #f90;">$path</span><span style="color: #f90;">&#41;</span><span style="color: #f90;">&#123;</span>
	<span style="color: #207aaa;">foreach</span><span style="color: #f90;">&#40;</span>scandir<span style="color: #f90;">&#40;</span><span style="color: #f90;">$path</span><span style="color: #f90;">&#41;</span> <span style="color: #207aaa;">as</span> <span style="color: #f90;">$item</span><span style="color: #f90;">&#41;</span>
	<a href="http://www.php.net/preg_match"><span style="color: #207aaa;">preg_match</span></a><span style="color: #f90;">&#40;</span><span style="color: #666;">&quot;/<span style="color: #ac1a2f; font-weight: bold;">\.</span>/&quot;</span>, <span style="color: #f90;">$item</span><span style="color: #f90;">&#41;</span> &amp;&amp; <span style="color: #f90;">$item</span> != <span style="color: #666;">'.'</span> &amp;&amp; <span style="color: #f90;">$item</span> != <span style="color: #666;">'..'</span> ? <span style="color: #f90;">$out</span> .= <span style="color: #f90;">$item</span>.<span style="color: #666;">'&lt;br/&gt;'</span> : <span style="color: #ac1a2f; font-weight: bold;">NULL</span>;
	<span style="color: #207aaa;">return</span> <span style="color: #f90;">$out</span>;
<span style="color: #f90;">&#125;</span>
<a href="http://www.php.net/echo"><span style="color: #207aaa;">echo</span></a> getFile<span style="color: #f90;">&#40;</span><span style="color: #f90;">$_SERVER</span><span style="color: #f90;">&#91;</span><span style="color: #666;">'DOCUMENT_ROOT'</span><span style="color: #f90;">&#93;</span><span style="color: #f90;">&#41;</span>;
&nbsp;
<span style="color: #ac1a2f; font-weight: bold;">function</span> getFileByType<span style="color: #f90;">&#40;</span><span style="color: #f90;">$path</span>, <span style="color: #f90;">$type</span> = <span style="color: #666;">'jpg'</span><span style="color: #f90;">&#41;</span><span style="color: #f90;">&#123;</span>
	<span style="color: #207aaa;">foreach</span><span style="color: #f90;">&#40;</span>scandir<span style="color: #f90;">&#40;</span><span style="color: #f90;">$path</span><span style="color: #f90;">&#41;</span> <span style="color: #207aaa;">as</span> <span style="color: #f90;">$item</span><span style="color: #f90;">&#41;</span>
	<a href="http://www.php.net/preg_match"><span style="color: #207aaa;">preg_match</span></a><span style="color: #f90;">&#40;</span><span style="color: #666;">&quot;/<span style="color: #ac1a2f; font-weight: bold;">\.</span>$type/&quot;</span>, <span style="color: #f90;">$item</span><span style="color: #f90;">&#41;</span> &amp;&amp; <span style="color: #f90;">$item</span> != <span style="color: #666;">'.'</span> &amp;&amp; <span style="color: #f90;">$item</span> != <span style="color: #666;">'..'</span> ? <span style="color: #f90;">$out</span> .= <span style="color: #f90;">$item</span>.<span style="color: #666;">'&lt;br/&gt;'</span> : <span style="color: #ac1a2f; font-weight: bold;">NULL</span>;
	<span style="color: #207aaa;">return</span> <span style="color: #f90;">$out</span>;
<span style="color: #f90;">&#125;</span>
<a href="http://www.php.net/echo"><span style="color: #207aaa;">echo</span></a> getFileByType<span style="color: #f90;">&#40;</span><span style="color: #f90;">$_SERVER</span><span style="color: #f90;">&#91;</span><span style="color: #666;">'DOCUMENT_ROOT'</span><span style="color: #f90;">&#93;</span><span style="color: #f90;">&#41;</span>;
<span style="color: #ac1a2f; font-weight: bold;">?&gt;</span></pre><span class='plaintext'><a href='http://since1985.de/wordpress/wp-content/themes/sevenfive/media/code/since1985de_76228e48.txt' class='external'>Als Textdatei öffnen</a> | <span>since1985de_76228e48.txt | 693 Byte</span></span>
<h4>Ein Beispiel aus der Praxis</h4>
<p>In einem Framework von mit verwende ich eine Variation, um Dateien per include_once() einzubinden.</p>
<pre class="php"><span style="color: #ac1a2f; font-weight: bold;">&lt;?php</span>
<span style="color: #ac1a2f; font-weight: bold;">function</span> dirEachFileIncludeOnce<span style="color: #f90;">&#40;</span><span style="color: #f90;">$path</span><span style="color: #f90;">&#41;</span><span style="color: #f90;">&#123;</span>
    <span style="color: #207aaa;">foreach</span><span style="color: #f90;">&#40;</span>scandir<span style="color: #f90;">&#40;</span><span style="color: #f90;">$path</span><span style="color: #f90;">&#41;</span> <span style="color: #207aaa;">as</span> <span style="color: #f90;">$item</span><span style="color: #f90;">&#41;</span> !<a href="http://www.php.net/preg_match"><span style="color: #207aaa;">preg_match</span></a><span style="color: #f90;">&#40;</span><span style="color: #666;">&quot;/<span style="color: #ac1a2f; font-weight: bold;">\.</span>/&quot;</span>, <span style="color: #f90;">$item</span><span style="color: #f90;">&#41;</span> ? <span style="color: #207aaa;">include_once</span><span style="color: #f90;">&#40;</span><span style="color: #f90;">$path</span>.<span style="color: #f90;">$item</span>.<span style="color: #666;">'/'</span>.<span style="color: #f90;">$item</span>.<span style="color: #666;">'.php'</span><span style="color: #f90;">&#41;</span> : <span style="color: #ac1a2f; font-weight: bold;">NULL</span>;
<span style="color: #f90;">&#125;</span>
<span style="color: #ac1a2f; font-weight: bold;">?&gt;</span></pre><span class='plaintext'><a href='http://since1985.de/wordpress/wp-content/themes/sevenfive/media/code/since1985de_12d9d71f.txt' class='external'>Als Textdatei öffnen</a> | <span>since1985de_12d9d71f.txt | 214 Byte</span></span>
]]></content:encoded>
			<wfw:commentRss>http://since1985.de/2009/12/22/php-ordner-dateien-oder-bestimmten-dateityp-eines-verzeichnis-auslesen-mit-nur-einer-zeile-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: Die eigene Domain als ShortURL nutzen</title>
		<link>http://since1985.de/2009/12/21/wordpress-die-eigene-domain-als-shorturl-nutzen/</link>
		<comments>http://since1985.de/2009/12/21/wordpress-die-eigene-domain-als-shorturl-nutzen/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 09:54:30 +0000</pubDate>
		<dc:creator>Gerrit Fries</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[kurz]]></category>
		<category><![CDATA[short]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://since1985.de/?p=227</guid>
		<description><![CDATA[Gerade diejenigen unter euch, die ihre Artikel über Twitter oder andere Soziale-Netzwerke bekannt machen, greifen sicherlich häufig zu Diensten wie tinyurl.com oder bit.ly zurück um den ansonsten zu langen Hyperlinks noch etwas Text beizustellen und sie somit interessant zu machen. Doch wenn ihr WordPress nutzt, könnt ihr darauf gut und gerne verzichten. Hier zeige ich euch wie. ]]></description>
			<content:encoded><![CDATA[<p>Gerade diejenigen unter euch, die ihre Artikel über Twitter oder andere Soziale-Netzwerke bekannt machen, greifen sicherlich häufig zu Diensten wie tinyurl.com oder bit.ly zurück um den ansonsten zu langen Hyperlinks noch etwas Text beizustellen und sie somit interessant zu machen. Doch wenn ihr WordPress nutzt, könnt ihr darauf gut und gerne verzichten. Hier zeige ich euch wie. </p>
<h4>Umleiten: Ja – Duplicate-Content: Nein</h4>
<p>Die folgende Funktion macht sich die WordPress-eigene URL-Struktur zu nutze. Links auf Posts lauten eigentlich immer http://example.com/index.php?p=postID – die meisten unter euch werden jedoch SEO-freundlichere Links verwenden. Trotzdem bleiben die Posts über den ursprünglichen Weg erreichbar und werden sogar permanent umgeleitet – es gibt also keinen bösen Duplicate-Content. Packt den Code-Schnipsel einfach in eure <i>functions.php</i>.</p>
<pre class="php"><span style="color: #ac1a2f; font-weight: bold;">&lt;?php</span>
<span style="color: #ac1a2f; font-weight: bold;">function</span> shorturl<span style="color: #f90;">&#40;</span><span style="color: #f90;">&#41;</span><span style="color: #f90;">&#123;</span>
    <a href="http://www.php.net/global"><span style="color: #207aaa;">global</span></a> <span style="color: #f90;">$post</span>;
    is_single<span style="color: #f90;">&#40;</span><span style="color: #f90;">&#41;</span> == <span style="color: #ac1a2f; font-weight: bold;">true</span> ? <span style="color: #f90;">$out</span> = get_bloginfo<span style="color: #f90;">&#40;</span><span style="color: #666;">'url'</span><span style="color: #f90;">&#41;</span>.<span style="color: #666;">&quot;/&quot;</span>.<span style="color: #f90;">$post</span>-&gt;<span style="color: #f90;">ID</span> : <span style="color: #f90;">$out</span> = get_bloginfo<span style="color: #f90;">&#40;</span><span style="color: #666;">'url'</span><span style="color: #f90;">&#41;</span>.<span style="color: #666;">&quot;/&quot;</span>;
    <a href="http://www.php.net/echo"><span style="color: #207aaa;">echo</span></a> <span style="color: #f90;">$out</span>;
<span style="color: #f90;">&#125;</span>
&nbsp;
<span style="color: #207aaa; font-style: italic;">/* Beispiel-Aufruf */</span>
<span style="color: #207aaa; font-style: italic;">/* &lt;a href=&quot;&lt;?php shorturl(); ?&gt;&quot;&gt;Nutze den kurzen Link: &lt;?php shorturl(); ?&gt;&lt;/a&gt; */</span>
<span style="color: #ac1a2f; font-weight: bold;">?&gt;</span></pre><span class='plaintext'><a href='http://since1985.de/wordpress/wp-content/themes/sevenfive/media/code/since1985de_7b29ee40.txt' class='external'>Als Textdatei öffnen</a> | <span>since1985de_7b29ee40.txt | 311 Byte</span></span>
<h4>Die halbe Miete</h4>
<p>Da http://example.com/index.php?p=postID auch nicht wirklich kurz ist verwenden wir noch eine mod_rewrite-Regel mit der wir das durch die Funktion erzeugte und wesentlich kürzere http://example.com/postID auf besagte URL umleiten. Dazu müsst ihr eure <i>.htaccess</i> um folgende Regeln erweitern.</p>
<pre>RewriteEngine On
RewriteRule ^([0-9]+[0-9])$ /index.php?p=$1 [L]</pre><span class='plaintext'><a href='http://since1985.de/wordpress/wp-content/themes/sevenfive/media/code/since1985de_3411f4de.txt' class='external'>Als Textdatei öffnen</a> | <span>since1985de_3411f4de.txt | 64 Byte</span></span>
]]></content:encoded>
			<wfw:commentRss>http://since1985.de/2009/12/21/wordpress-die-eigene-domain-als-shorturl-nutzen/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress: Inhalte auf delicious.com als Lesezeichen setzen</title>
		<link>http://since1985.de/2009/12/20/wordpress-inhalte-auf-delicious-com-als-lesezeichen-setzen/</link>
		<comments>http://since1985.de/2009/12/20/wordpress-inhalte-auf-delicious-com-als-lesezeichen-setzen/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 10:16:41 +0000</pubDate>
		<dc:creator>Gerrit Fries</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[bookmark]]></category>
		<category><![CDATA[delicious]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[lesezeichen]]></category>
		<category><![CDATA[permalink]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[share]]></category>
		<category><![CDATA[teilen]]></category>

		<guid isPermaLink="false">http://since1985.de/?p=212</guid>
		<description><![CDATA[Wer seinen Besuchern anbieten möchte Inhalte auf delicious.com als Lesezeichen zu setzen, ohne dabei auf unnötige Plugins zurückzugreifen, packt am besten den nachfolgenden Code in seine functions.php.
Die Funktion muss dann nur noch in einem Link innerhalb des href-Attributes aufgerufen werden und Besucher können deine Seite mit einem Klick auf delicious.com als Lesezeichen hinzufügen.
&#60;?php
function delicious_link&#40;&#41;&#123;
&#160;
  [...]]]></description>
			<content:encoded><![CDATA[<p>Wer seinen Besuchern anbieten möchte Inhalte auf delicious.com als Lesezeichen zu setzen, ohne dabei auf unnötige Plugins zurückzugreifen, packt am besten den nachfolgenden Code in seine <i>functions.php</i>.</p>
<p>Die Funktion muss dann nur noch in einem Link innerhalb des href-Attributes aufgerufen werden und Besucher können deine Seite mit einem Klick auf delicious.com als Lesezeichen hinzufügen.</p>
<pre class="php"><span style="color: #ac1a2f; font-weight: bold;">&lt;?php</span>
<span style="color: #ac1a2f; font-weight: bold;">function</span> delicious_link<span style="color: #f90;">&#40;</span><span style="color: #f90;">&#41;</span><span style="color: #f90;">&#123;</span>
&nbsp;
    <a href="http://www.php.net/global"><span style="color: #207aaa;">global</span></a> <span style="color: #f90;">$post</span>;
    <span style="color: #f90;">$link</span> = get_permalink<span style="color: #f90;">&#40;</span><span style="color: #f90;">$post</span>-&gt;<span style="color: #f90;">ID</span><span style="color: #f90;">&#41;</span>;
    <span style="color: #f90;">$url</span> = <span style="color: #666;">'http://del.icio.us/post?url='</span>.<a href="http://www.php.net/urlencode"><span style="color: #207aaa;">urlencode</span></a><span style="color: #f90;">&#40;</span><span style="color: #f90;">$link</span><span style="color: #f90;">&#41;</span>.<span style="color: #666;">'&amp;title='</span>.<a href="http://www.php.net/urlencode"><span style="color: #207aaa;">urlencode</span></a><span style="color: #f90;">&#40;</span><span style="color: #f90;">$post</span>-&gt;<span style="color: #f90;">post_title</span><span style="color: #f90;">&#41;</span>;
    <span style="color: #207aaa;">return</span> <span style="color: #f90;">$url</span>;
&nbsp;
<span style="color: #f90;">&#125;</span>
&nbsp;
<span style="color: #207aaa; font-style: italic;">// Beispiel-Link</span>
<span style="color: #207aaa; font-style: italic;">// &lt;a href=&quot;&lt;?php delicious_link(); ?&gt;&quot; title=&quot;&quot;&gt;auf delicious.com als Lesezeichen setzen&lt;/a&gt;</span>
&nbsp;
<span style="color: #ac1a2f; font-weight: bold;">?&gt;</span>
&nbsp;</pre><span class='plaintext'><a href='http://since1985.de/wordpress/wp-content/themes/sevenfive/media/code/since1985de_79e9ec01.txt' class='external'>Als Textdatei öffnen</a> | <span>since1985de_79e9ec01.txt | 372 Byte</span></span>
]]></content:encoded>
			<wfw:commentRss>http://since1985.de/2009/12/20/wordpress-inhalte-auf-delicious-com-als-lesezeichen-setzen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
