<?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>Scarbous.de</title>
	<atom:link href="http://www.scarbous.de/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scarbous.de</link>
	<description>Ein weiteres tolles WordPress-Blog</description>
	<lastBuildDate>Fri, 13 May 2011 10:01:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>PHP &#8211; whitespaces aus HTML entfernen und gzip aktivieren</title>
		<link>http://www.scarbous.de/php-whitespaces-aus-html-entfernen-und-gzip-aktivieren/</link>
		<comments>http://www.scarbous.de/php-whitespaces-aus-html-entfernen-und-gzip-aktivieren/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 07:57:22 +0000</pubDate>
		<dc:creator>Sascha</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.scarbous.de/?p=160</guid>
		<description><![CDATA[Suchmaschinen finden es besser wenn eine Internetseite schnell geladen wird, daher ist es gut den ausgegebenen Inhalt zu Komprimieren und alle überflüssigen Zeichen zu entfernen. Das geht sehr einfach mit der Funktion ob_start diese wird ausgeführt bevor der durch PHP generierte Inhalt ausgegeben wird. Ich setze diese Funktion in Verbindung mit WordPress ein: 1 2 [...]]]></description>
			<content:encoded><![CDATA[<p>Suchmaschinen finden es besser wenn eine Internetseite schnell geladen wird, daher ist es gut den ausgegebenen Inhalt zu Komprimieren und alle überflüssigen Zeichen zu entfernen.<br />
<span id="more-160"></span><br />
Das geht sehr einfach mit der Funktion <code>ob_start</code> diese wird ausgeführt bevor der durch PHP generierte Inhalt ausgegeben wird.</p>
<p>Ich setze diese Funktion in Verbindung mit WordPress ein:</p>

<div class="wp_codebox"><table><tr id="p1602"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code" id="p160code2"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> make_html<span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$page</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/preg_replace"><span style="color: #990000;">preg_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/<span style="color: #000099; font-weight: bold;">\n</span>/&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span><a href="http://www.php.net/preg_replace"><span style="color: #990000;">preg_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/\s\s+/'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">' '</span><span style="color: #339933;">,</span><span style="color: #000088;">$page</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/strpos"><span style="color: #990000;">strpos</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;HTTP_ACCEPT_ENCODING&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;gzip&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">!==</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<a href="http://www.php.net/header"><span style="color: #990000;">header</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Encoding: gzip&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">return</span> <a href="http://www.php.net/gzencode"><span style="color: #990000;">gzencode</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>is_admin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span>
	<a href="http://www.php.net/ob_start"><span style="color: #990000;">ob_start</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'make_html'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Es werden erst alle whitespaces entfernt und anschließend überprüft ob der Browser gzip unterstützt und dann gegebenen falls Komprimiert was die Seite noch mal um ein vielfaches kleiner macht ( meist über 60%).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scarbous.de/php-whitespaces-aus-html-entfernen-und-gzip-aktivieren/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress &#8211; attachment PDF&#8217;s auflisten</title>
		<link>http://www.scarbous.de/wordpress-attachment-pdfs-auflisten/</link>
		<comments>http://www.scarbous.de/wordpress-attachment-pdfs-auflisten/#comments</comments>
		<pubDate>Tue, 18 Jan 2011 14:32:34 +0000</pubDate>
		<dc:creator>Sascha</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.scarbous.de/?p=157</guid>
		<description><![CDATA[Ich habe mir eine kleine Funktion programmiert mit der ich attachments auflisten lasse, um ein einheitliche darstellung der Dateien zu Der PHP code wird einfach mit in das Template eingebunden oder in eine Function integriert. 1 2 3 4 5 6 7 8 $pdfs = get_posts&#40;array&#40;'post_parent' =&#62; get_the_ID&#40;&#41;, 'post_type' =&#62; 'attachment', 'post_mime_type' =&#62; 'application/pdf', 'numberposts' [...]]]></description>
			<content:encoded><![CDATA[<p>Ich habe mir eine kleine Funktion programmiert mit der ich attachments auflisten lasse, um ein einheitliche darstellung der Dateien zu<br />
<span id="more-157"></span><br />
Der PHP code wird einfach mit in das Template eingebunden oder in eine Function integriert.</p>

<div class="wp_codebox"><table><tr id="p1574"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code" id="p157code4"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$pdfs</span> <span style="color: #339933;">=</span> get_posts<span style="color: #009900;">&#40;</span><a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'post_parent'</span> <span style="color: #339933;">=&gt;</span> get_the_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post_type'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'attachment'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post_mime_type'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'application/pdf'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'numberposts'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1000</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pdfs</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;div class=&quot;filelist&quot;&gt;'</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pdfs</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$pdf</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;a href=&quot;'</span><span style="color: #339933;">.</span>wp_get_attachment_url<span style="color: #009900;">&#40;</span><span style="color: #000088;">$pdf</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; title=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$pdf</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_title</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; target=&quot;blank&quot; class=&quot;pdf_download&quot;&gt;Download: '</span><span style="color: #339933;">.</span><span style="color: #000088;">$pdf</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_title</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/a&gt;&lt;br/&gt;'</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/div&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.scarbous.de/wordpress-attachment-pdfs-auflisten/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone &#8211; Die App Bump ist sehr kommunikativ</title>
		<link>http://www.scarbous.de/die-app-bump-ist-sehr-kommunikativ/</link>
		<comments>http://www.scarbous.de/die-app-bump-ist-sehr-kommunikativ/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 07:17:01 +0000</pubDate>
		<dc:creator>Sascha</dc:creator>
				<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.scarbous.de/?p=151</guid>
		<description><![CDATA[Bump empfand ich anfangs als schöne Spielerei, um auf einfache Art Kontakte auszutauschen. Doch mittlerweile gibt es eine neue Version die einen Verlauf der Bumps und eine Namensliste führt. Über die Namensliste kann ich jederzeit mit einer bereits verbundenen Person über die Bump App in Kontakt treten. Ich nutze die App als SMS alternative und [...]]]></description>
			<content:encoded><![CDATA[<p>Bump empfand ich anfangs als schöne Spielerei, um auf einfache Art Kontakte auszutauschen.<br />
<span id="more-151"></span><br />
Doch mittlerweile gibt es eine neue Version die einen Verlauf der Bumps und eine Namensliste führt.<br />
Über die Namensliste kann ich jederzeit mit einer bereits verbundenen Person über die Bump App in Kontakt treten. Ich nutze die App als SMS alternative und um Terminvorschläge zu versenden.<br />
Nachteil ist leider geht es bis jetzt nur mit dem iPhone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scarbous.de/die-app-bump-ist-sehr-kommunikativ/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone &#8211; die Facebook App</title>
		<link>http://www.scarbous.de/iphone-%e2%80%93-die-facebook-app/</link>
		<comments>http://www.scarbous.de/iphone-%e2%80%93-die-facebook-app/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 06:08:29 +0000</pubDate>
		<dc:creator>Sascha</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[App]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Social Media]]></category>

		<guid isPermaLink="false">http://www.scarbous.de/?p=143</guid>
		<description><![CDATA[Es gibt sie schon lange und dennoch für mich neu da ich erst mein iPhone bekommen habe. Es war eine der ersten Apps die auf das iPhone gekommen ist und auch die am meisten genutzt wird. Es ist einfach super praktisch Status Updates was machen die Freunde, Familie und Bekannten gerade und einfach mal ein [...]]]></description>
			<content:encoded><![CDATA[<p>Es gibt sie schon lange und dennoch für mich neu da ich erst mein iPhone bekommen habe. Es war eine der ersten Apps die auf das iPhone gekommen ist und auch die am meisten genutzt wird.<br />
<span id="more-143"></span>Es ist einfach super praktisch Status Updates was machen die Freunde, Familie und Bekannten gerade und einfach mal ein Bild hochladen. Die App ist schlicht gestaltet (eben wie Facebook) und ist einfach und intuitiv zu bedienen.<br />
Ab und zu gibt es komischerweise das Problem das die App sich einfach schließt sei es beim Posten eines Kommentars oder beim Öffnen des ein oder anderen Beitrags. Aber im Großen und Ganzen eine sehr gelungene App.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scarbous.de/iphone-%e2%80%93-die-facebook-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress &#8211; Eigene Post Types erstellen</title>
		<link>http://www.scarbous.de/wordpress-eigene-post-types-erstellen/</link>
		<comments>http://www.scarbous.de/wordpress-eigene-post-types-erstellen/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 06:14:08 +0000</pubDate>
		<dc:creator>Sascha</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[get_posts]]></category>
		<category><![CDATA[register_post_type]]></category>
		<category><![CDATA[Wordpress 3.0]]></category>

		<guid isPermaLink="false">http://www.scarbous.de/?p=130</guid>
		<description><![CDATA[WordPress 3.0 ist da und mit der neuen Version auch neue Funktionen wie register_post_type. Diese Funktion ermöglicht es uns auf einfachste Art neue Post Types zu definieren und Sie über das Backendpflegbar zu machen. Dabei ist der Post Type sehr flexibel Konfigurierbar wie z.B. will ich das Sonderfelder angelegt werden können oder soll es einen [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress 3.0 ist da und mit der neuen Version auch neue Funktionen wie <code>register_post_type</code>. Diese Funktion ermöglicht es uns auf einfachste Art neue Post Types zu definieren und Sie über das Backendpflegbar zu machen.<br />
<span id="more-130"></span><br />
Dabei ist der Post Type sehr flexibel Konfigurierbar wie z.B. will ich das Sonderfelder angelegt werden können oder soll es einen Editor geben möchte ich ein Post Thumbnail usw.</p>
<p><strong>Für was kann man es einsetzen?</strong><br />
also ich habe schon Einsatzmöglichkeiten gefunden z.B.:</p>
<ul>
<li>Kunden Statements oder Referenzen</li>
<li>Das Team einer Firma auflisten</li>
<li>Ein Verzeichnis für Personen oder Niederlassungen</li>
<li>usw.</li>
</ul>
<p>Also es gibt viele Möglichkeiten diese neue Funktion <code>register_post_type</code> zu nutzen.</p>
<p><strong>Wie kann man sie nun benutzen?</strong><br />
Ein Beispiel :<br />
In diesem Fall benutze ich es für das Team einer Firma. Ich möchte jeden Mitarbeiter anlegen und ein Bild dazu hochladen. Die Mitarbeiter werden dann auf einer Seite aufgelistet.</p>

<div class="wp_codebox"><table><tr id="p1307"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code" id="p130code7"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> post_type_team<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	register_post_type<span style="color: #009900;">&#40;</span>
	<span style="color: #0000ff;">'team'</span><span style="color: #339933;">,</span>
	<a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'label'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Team'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'singular_label'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'team'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'public'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'show_ui'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'capability_type'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'post'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'hierarchical'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'rewrite'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;slug&quot;</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">&quot;team&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'supports'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'editor'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'thumbnail'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'menu_position'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'menu_icon'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_url'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/images/icons/team.png'</span>
	<span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'init'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'post_type_team'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Wenn man diesen Code in die <code>functions.php</code> einfügt und anschließend in das WordPress Backend schaut wird man im Menü einen neuen Punkt sehen mit dem Namen Team.<br />
Dort kann ich ähnlich wie bei Seiten oder Posts neue Beiträge (in unserem Fall Teammitglieder) anlegen, eine Beschreibung eingeben und ein Bildhochladen und mehr bietet uns dieser neue Post type nicht.<br />
Um diesen jetzt in einer Seite zu verwenden muss einfach in eine Seiten Template folgender Code eingefügt werden.</p>

<div class="wp_codebox"><table><tr id="p1308"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code" id="p130code8"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;ul class=&quot;team&quot;&gt;'</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$pages</span> <span style="color: #339933;">=</span> get_posts<span style="color: #009900;">&#40;</span><a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'numberposts'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">1000</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'order'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'ASC'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'orderby'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'menu_order'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post_type'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'team'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pages</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$page</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> has_post_thumbnail<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$page</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>ID <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span>
		<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$image</span> <span style="color: #339933;">=</span> wp_get_attachment_image_src<span style="color: #009900;">&#40;</span> get_post_thumbnail_id<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$page</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>ID <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thumbnail'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span>
		<span style="color: #000088;">$img_src</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$image</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span>
		<span style="color: #000088;">$img_src</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;li id=&quot;page_id_'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$page</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>ID <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;img title=&quot;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$page</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>post_title <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot; src=&quot;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$img_src</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot; alt=&quot;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$page</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>post_title <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot; /&gt;'</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$page</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>post_title <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/li&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/ul&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>In diesem Teil wir per <code>get_posts</code> unser neuer Post Type <code>team</code> abgerufen und ausgegeben.</p>
<p><a title="register_post_type @ codex.wordpress.org" href="http://codex.wordpress.org/Function_Reference/register_post_type" target="_blank">Function Reference @ codex.wordpress.org: register_post_type</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.scarbous.de/wordpress-eigene-post-types-erstellen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress &#8211; Titelbild für Beiträge</title>
		<link>http://www.scarbous.de/titelbild-fur-beitraege/</link>
		<comments>http://www.scarbous.de/titelbild-fur-beitraege/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 08:00:25 +0000</pubDate>
		<dc:creator>Sascha</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.scarbous.de/?p=123</guid>
		<description><![CDATA[Bilder in einen Beitrag einbinden ist nichts Neues und keine schwere Sache. Aber ein Titelbild festzulegen war für mich etwas Neues aber nicht schwere. Um einem Beitrag die Funktion zu geben Titelbilder festzulegen wird der Befehl add_theme_support( 'post-thumbnails' ) in die functions.php Eingefügt. 1 2 3 4 add_action&#40; 'after_setup_theme', 'theme_setup' &#41;; function theme_setup&#40;&#41; &#123; add_theme_support&#40; [...]]]></description>
			<content:encoded><![CDATA[<p>Bilder in einen Beitrag einbinden ist nichts Neues und keine schwere Sache. Aber ein Titelbild festzulegen war für mich etwas Neues aber nicht schwere.<br />
<span id="more-123"></span><br />
Um einem Beitrag die Funktion zu geben Titelbilder festzulegen wird der Befehl <code> add_theme_support( 'post-thumbnails' )</code> in die <code>functions.php</code> Eingefügt.</p>

<div class="wp_codebox"><table><tr id="p12313"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p123code13"><pre class="php" style="font-family:monospace;">add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'after_setup_theme'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'theme_setup'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> theme_setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	add_theme_support<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'post-thumbnails'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Jetzt können wir schon in unserem Beitrag ein Bild als Titelbild festlegen.</p>
<p>Nun brauchen wir noch eine Funktion die uns das Bild ausgibt und wir müssen ein Standardbild festlegen.<br />
Das Standardbild wird folgendermaßen festegelegt. (der Code wird in die <code>funtions.php</code> eingefügt)</p>

<div class="wp_codebox"><table><tr id="p12314"><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code" id="p123code14"><pre class="php" style="font-family:monospace;"><a href="http://www.php.net/define"><span style="color: #990000;">define</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'HEADER_TEXTCOLOR'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://www.php.net/define"><span style="color: #990000;">define</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'NO_HEADER_TEXT'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://www.php.net/define"><span style="color: #990000;">define</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'HEADER_IMAGE'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'%s/images/headers/default_header.jpg'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// %s steht für das Template Verzeichnis</span>
<a href="http://www.php.net/define"><span style="color: #990000;">define</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'HEADER_IMAGE_WIDTH'</span><span style="color: #339933;">,</span> apply_filters<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'theme_header_img_width'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">710</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://www.php.net/define"><span style="color: #990000;">define</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'HEADER_IMAGE_HEIGHT'</span><span style="color: #339933;">,</span> apply_filters<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'theme_header_img_height'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">300</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
set_post_thumbnail_size<span style="color: #009900;">&#40;</span> HEADER_IMAGE_WIDTH<span style="color: #339933;">,</span> HEADER_IMAGE_HEIGHT<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
add_custom_image_header<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Bitte ändert den Wert <code>HEADER_IMAGE</code> und gebt an wo euer Standard Titelbild liegt.</p>
<p>Jetzt kommt eine Funktion die uns den Pfad und Titel des Bildes zurück gibt.</p>

<div class="wp_codebox"><table><tr id="p12315"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code" id="p123code15"><pre class="php" style="font-family:monospace;">add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'header_img'</span><span style="color: #339933;">,</span> get_header_img<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> get_header_img<span style="color: #009900;">&#40;</span><span style="color: #000088;">$img</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$post</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_singular<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> has_post_thumbnail<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$image</span> <span style="color: #339933;">=</span> wp_get_attachment_image_src<span style="color: #009900;">&#40;</span> get_post_thumbnail_id<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post-thumbnail'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$image</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&gt;=</span> HEADER_IMAGE_WIDTH <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span>
		<span style="color: #000088;">$image_data</span> <span style="color: #339933;">=</span> get_posts<span style="color: #009900;">&#40;</span><a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'post_type'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'attachment'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'include'</span><span style="color: #339933;">=&gt;</span> get_post_thumbnail_id<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$img</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'src'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$image</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$img</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$image_data</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_title</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span>
		<span style="color: #000088;">$img</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'src'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> get_header_image<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$img</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$img</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Der Filter <code> header_img </code> den wir hier ansprechen fügen wir noch an die Stelle ein an der das Bild angezeigt werden soll.<br />
In den meisten Fällen die <code>header.php</code>.</p>

<div class="wp_codebox"><table><tr id="p12316"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p123code16"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$header_img</span> <span style="color: #339933;">=</span> apply_filters<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'header_img'</span><span style="color: #339933;">,</span><a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$header_img</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php echo <span style="color: #006699; font-weight: bold;">$header_img</span> ['src']; ?&gt;&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php echo <span style="color: #006699; font-weight: bold;">$header_img</span>['title']; ?&gt;&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php echo <span style="color: #006699; font-weight: bold;">$header_img</span>['title']; ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php
<span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>So nun wird schon überall unser Standardbild angezeigt wenn wir in einem Beitrag ein Titelbild hochladen und festlegen. Wird auf der Seite des Beitrages unser festgelegtes Bild angezeigt.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scarbous.de/titelbild-fur-beitraege/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress &#8211; Hintergrund über das Backend ändern</title>
		<link>http://www.scarbous.de/hintergrund-ueber-das-backend-aendern/</link>
		<comments>http://www.scarbous.de/hintergrund-ueber-das-backend-aendern/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 06:25:30 +0000</pubDate>
		<dc:creator>Sascha</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[after_setup_theme]]></category>
		<category><![CDATA[Hintergrund]]></category>
		<category><![CDATA[Theme]]></category>

		<guid isPermaLink="false">http://www.scarbous.de/?p=116</guid>
		<description><![CDATA[Heute fällt unser Blick auf eine Funktion namens add_custom_background, diese Funktion ermöglicht es den Hintergrund der Seite über das WordPress Backend zu ändern. Um diese Funktion zu nutzen Erweitern wir die functions.php um folgende Zeilen: 1 2 3 4 add_action&#40; 'after_setup_theme', 'theme_setup' &#41;; function theme_setup&#40;&#41; &#123; add_custom_background&#40;&#41;; &#125; Nach dem speichern der kleinen Erweiterung kann [...]]]></description>
			<content:encoded><![CDATA[<p>Heute fällt unser Blick auf eine Funktion namens <code>add_custom_background</code>, diese Funktion ermöglicht es  den Hintergrund der Seite über das WordPress Backend zu ändern.<br />
<span id="more-116"></span></p>
<p>Um diese Funktion zu nutzen Erweitern wir die <code>functions.php</code> um folgende Zeilen:</p>

<div class="wp_codebox"><table><tr id="p11618"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p116code18"><pre class="php" style="font-family:monospace;">add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'after_setup_theme'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'theme_setup'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> theme_setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	add_custom_background<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Nach dem speichern der kleinen Erweiterung kann auch schon unter Design -> Hintergrund der Hintergrund selber angepasst werden.</p>
<p><a href="http://codex.wordpress.org/Function_Reference/add_custom_background" title="add_custom_background @ codex.wordpress.org" target="_blank">Function Reference @ codex.wordpress.org: add_custom_background</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.scarbous.de/hintergrund-ueber-das-backend-aendern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress &#8211; PHP Code in Post</title>
		<link>http://www.scarbous.de/wordpress-php-code-in-post/</link>
		<comments>http://www.scarbous.de/wordpress-php-code-in-post/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 18:24:01 +0000</pubDate>
		<dc:creator>Sascha</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.scarbous.de/?p=94</guid>
		<description><![CDATA[Wenn ihr auch wie ich auf der suche seit/wart nach einer Möglichkeit schön quellcode darzustellen dann kann ich euch die &#8220;WP-CodeBox&#8221; empfehlen. Beispiel: 1 2 3 4 5 6 $array = array&#40;&#34;Apfel&#34;, &#34;Birne&#34;, &#34;Banane&#34;, &#34;Kiwi&#34;&#41;; echo '&#60;ul&#62;'; foreach&#40;$array as $element&#41; : echo &#34;&#60;li&#62;$element&#60;/li&#62;&#34;; endforeach; echo '&#60;/ul&#62;'; Plugin: wp-codebox]]></description>
			<content:encoded><![CDATA[<p>Wenn ihr auch wie ich auf der suche seit/wart nach einer Möglichkeit schön quellcode darzustellen dann kann ich euch die &#8220;WP-CodeBox&#8221; empfehlen.<br />
<span id="more-94"></span><br />
<strong>Beispiel:</strong></p>

<div class="wp_codebox"><table><tr id="p9420"><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code" id="p94code20"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$array</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Apfel&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Birne&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Banane&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Kiwi&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;ul&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$array</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$element</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;li&gt;<span style="color: #006699; font-weight: bold;">$element</span>&lt;/li&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/ul&gt;'</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Plugin: <a href="http://wordpress.org/extend/plugins/wp-codebox/" title="wp-codebox @ wordpress.org">wp-codebox</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.scarbous.de/wordpress-php-code-in-post/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress &#8211; Rahmen(blur) um aktiven Link deaktivieren</title>
		<link>http://www.scarbous.de/wordpress-rahmen-blurum-aktiven-link-deaktivieren/</link>
		<comments>http://www.scarbous.de/wordpress-rahmen-blurum-aktiven-link-deaktivieren/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 11:56:15 +0000</pubDate>
		<dc:creator>Sascha</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.scarbous.de/?p=88</guid>
		<description><![CDATA[Ich habe mir eine kleine function erstellt um die wie ich finde nicht so schönen Rahmen wenn man einen Link anklickt zu entfernen. Durch add_action("wp_footer", "no_blur") wird am ende der Seite das ergebnis der Funktion no_blur ausgegben. Es ist eine einfache Javascript Funktion die allen links die Funktion onFocus setzt um den Rahmen zu entfernen. [...]]]></description>
			<content:encoded><![CDATA[<p>Ich habe mir eine kleine function erstellt um die wie ich finde nicht so schönen Rahmen wenn man einen Link anklickt zu entfernen.<br />
<span id="more-88"></span><br />
Durch <code>add_action("wp_footer", "no_blur")</code> wird am ende der Seite das ergebnis der Funktion <code>no_blur</code> ausgegben. Es ist eine einfache Javascript Funktion die allen links die Funktion <code>onFocus</code> setzt um den Rahmen zu entfernen.</p>
<p>Das Script wird einfach in die funktions.php kopiert.</p>

<div class="wp_codebox"><table><tr id="p8822"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code" id="p88code22"><pre class="php" style="font-family:monospace;">add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;wp_footer&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;no_blur&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> no_blur<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
all_links <span style="color: #339933;">=</span> document<span style="color: #339933;">.</span>getElementsByTagName<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'a'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> all_links<span style="color: #339933;">.</span>length<span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	all_links<span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span>setAttribute<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;onfocus&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;this.blur()&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.scarbous.de/wordpress-rahmen-blurum-aktiven-link-deaktivieren/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress &#8211; jquery in WordPress</title>
		<link>http://www.scarbous.de/wordpress-jquery-in-wordpress/</link>
		<comments>http://www.scarbous.de/wordpress-jquery-in-wordpress/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 14:45:50 +0000</pubDate>
		<dc:creator>Sascha</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[wp_enqueue_script]]></category>

		<guid isPermaLink="false">http://www.scarbous.de/?p=82</guid>
		<description><![CDATA[Wenn man in seinem WordPress Theme oder Plugin das Javascript Framework JQuery nutzen will kann man es ganz einfach einbinden mit den Bordmitteln von WordPress. 1 &#60;?php wp_enqueue_script&#40;'jquery'&#41;; ?&#62; Am besten in die funktions.php eintragen es wird dann automatisch in den &#60;head&#62; von WordPress eingetragen. Function Reference @ codex.wordpress.org: wp_enqueue_script]]></description>
			<content:encoded><![CDATA[<p>Wenn man in seinem WordPress Theme oder Plugin das Javascript Framework JQuery nutzen will kann man es ganz einfach einbinden mit den Bordmitteln von WordPress.<br />
<span id="more-82"></span></p>

<div class="wp_codebox"><table><tr id="p8224"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p82code24"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquery'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Am besten in die <code>funktions.php</code> eintragen es wird dann automatisch in den <code>&lt;head&gt;</code> von WordPress eingetragen.</p>
<p><a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script" title="wp_enqueue_script @ codex.wordpress.org" target="_blank">Function Reference @ codex.wordpress.org: wp_enqueue_script</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.scarbous.de/wordpress-jquery-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

