<?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>T3-Blogart &#187; Tutorial</title>
	<atom:link href="http://blog.t3-artwork.info/tag/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.t3-artwork.info</link>
	<description>Das T3-Artwork Blog rund um das Thema &#34;Wordpress&#34;...</description>
	<lastBuildDate>Thu, 06 Oct 2011 16:47:51 +0000</lastBuildDate>
	<language>de</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Post-Thumbnail Spielereien: Bilder-Zoom mit jQuery Tooltip</title>
		<link>http://blog.t3-artwork.info/2011/08/post-thumbnail-spielereien-bilder-zoom-mit-jquery-tooltip/</link>
		<comments>http://blog.t3-artwork.info/2011/08/post-thumbnail-spielereien-bilder-zoom-mit-jquery-tooltip/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 19:05:34 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress-Funktionen]]></category>
		<category><![CDATA[Bilder]]></category>
		<category><![CDATA[Bilder-Zoom]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Post-Thumbnails]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.t3-artwork.info/?p=467</guid>
		<description><![CDATA[Vor kurzem habe ich unseren Familienblog mit einem neuen Theme ausgestattet, in dem ich auch die &#8220;Post_Thumbnail&#8221;-Funktion nutze &#8211; für mich eine der besten Funktion der jüngeren WordPress-Entwicklung. Allerdings gab das Theme nur eine begrenzte Größe der Vorschaubilder her, so dass ich eine Möglichkeit suchte, die Vorschaubilder bei dem Überfahren mit der Maus zu vergrößern&#8230; [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fblog.t3-artwork.info%2F2011%2F08%2Fpost-thumbnail-spielereien-bilder-zoom-mit-jquery-tooltip%2F' data-shr_title='Post-Thumbnail+Spielereien%3A+Bilder-Zoom+mit+jQuery+Tooltip'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.t3-artwork.info%2F2011%2F08%2Fpost-thumbnail-spielereien-bilder-zoom-mit-jquery-tooltip%2F' data-shr_title='Post-Thumbnail+Spielereien%3A+Bilder-Zoom+mit+jQuery+Tooltip'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><div id="attachment_488" class="wp-caption alignleft" style="width: 310px"><a href="http://blog.t3-artwork.info/wp-content/uploads/2011/08/scree-tooltip-hover.jpg"><img class="size-medium wp-image-488 " title="scree-tooltip-hover" src="http://blog.t3-artwork.info/wp-content/uploads/2011/08/scree-tooltip-hover-300x237.jpg" alt="" width="300" height="237" /></a><p class="wp-caption-text">Using jQuery Tooltip as Image-Zoom</p></div>
<p>Vor kurzem habe ich unseren Familienblog mit einem neuen Theme ausgestattet, in dem ich auch die &#8220;Post_Thumbnail&#8221;-Funktion nutze &#8211; für mich eine der besten Funktion der jüngeren WordPress-Entwicklung. Allerdings gab das Theme nur eine begrenzte Größe der Vorschaubilder her, so dass ich eine Möglichkeit suchte, die Vorschaubilder bei dem Überfahren mit der Maus zu vergrößern&#8230;</p>
<p>Da ich jQuery schon für andere Effekte in diesem Theme nutzte, entschied ich mich für den <a title="jQuery Tooltip" href="http://flowplayer.org/tools/tooltip/index.html" target="_blank">jQuery Tooltip</a>. Ein äußerst schlankes jQuery-Plugin mit einem schönen Effekt.<br />
Um anstelle des klassichen Tooltips mit dem Title-Tag einen Zoom-Effekt für Vorschaubilder zu ereichen, muss man nur eine kleine Änderung im Loop vornehmen&#8230; Und so geht´s.<span id="more-467"></span></p>
<h3>1. jQuery-Tooltip im Theme installieren und verfügbar machen</h3>
<p>Zum Einbinden des Tooltip-Scripts stehen zwei Varianten zur Verfügung. Entweder, ihr installiert das Script in eurem Theme-Ordner, oder ihr bindet es direkt von der Projekt-Seite in euer Theme ein. Egal welche Methode ihr bevorzugt, der Aufruf ist nahezu identisch.</p>
<p>Öffnet die <strong>functions.php</strong> eures Themes und tragt dort folgende Funktion ein;</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">// load jQuery-Tooltip</span><br />
<span style="color: #000000; font-weight: bold;">function</span> my_tooltip<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
<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: #009900;">&#123;</span><br />
wp_register_script<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'tooltip'</span><span style="color: #339933;">,</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/js/jquery.tools.min.js'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</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><br />
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><br />
wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'tooltip'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'init'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'my_tooltip'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>In dieser Funktion laden wir das Tooltip-Script aus unserem Theme Ordner direkt in den Footer unseres Themes. In meinem Beispiel gibt es einen Unterordner <strong>/js</strong> in dem sich das Script befindet. Herunterladen könnt ihr es euch auf der <a title="Download jQuery Tooltip-Script" href="http://flowplayer.org/tools/download/index.html" target="_blank">Projekt-Seite</a>.</p>
<p>Die zweite Möglichkeit ist das Laden des Scripts direkt von der Projekt-Seite. Hierfür ersetzt ihr einfach die Zeile</p>
<p><code class="codecolorer php default"><span class="php">wp_register_script<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'tooltip'</span><span style="color: #339933;">,</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/js/jquery.tools.min.js'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</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></span></code></p>
<p><strong>mit</strong></p>
<p><code class="codecolorer php default"><span class="php">wp_register_script<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'tooltip'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'http://cdn.jquerytools.org/1.2.5/jquery.tools.min.js'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</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></span></code></p>
<p>Damit haben wir das Tooltip-Script unserem Theme zur Verfügung gestellt.<br />
Weiter geht es mit dem Javascript-Code zum Aufruf des Tooltips. Dafür öffnet ihr nun die <strong>footer.php</strong> eures Themes und tragt folgende Zeilen hinzu:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span><br />
<span style="color: #006600; font-style: italic;">//&lt;![CDATA[</span><br />
jQuery.<span style="color: #660066;">noConflict</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
jQuery<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.zoomer&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">tooltip</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><br />
effect<span style="color: #339933;">:</span> <span style="color: #3366CC;">'fade'</span><span style="color: #339933;">,</span><br />
fadeInSpeed<span style="color: #339933;">:</span> <span style="color: #CC0000;">300</span><span style="color: #339933;">,</span><br />
relative<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #006600; font-style: italic;">//]]&gt;</span><br />
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></div></td></tr></tbody></table></div>
<p>Damit lösen wir den Tooltip mit einem Fade-Effekt beim Überfahren aller Elemente mit der Klasse &#8220;Zoomer&#8221; aus (dazu später mehr). Das Attribut &#8220;relative&#8221; ist nicht zwingend erforderlich für die Funktion des Scripts, aber es wird bei Dartellungsproblemen des Effekts benötigt. Hier gilt es zu auszuprobieren&#8230;</p>
<p><strong>Wichtig:</strong> Diese Zeilen müssen <strong>nach</strong> dem <em><strong>wp_footer();</strong></em> &#8211; Tag notiert werden, da dort der Aufruf des Tooltip-Scripts erfolgt (wie oben beschrieben), und das <strong>muss vor</strong> dem eigentlichen Javascript geschehen!</p>
<p>Kommen wir nun zum &#8220;Füllen&#8221; des Tooltips für unseren Zoom-Effekt.</p>
<h3>2. the_post_thumbnail anpassen und mit dem Tooltip verknüpfen</h3>
<p>Zuerst sollten wir noch wissen, dass der jQuery-Tooltip auch jegliche Art von Inhalt darstellt, und nicht nur den klassischen &#8220;Title-Tag&#8221; eines Elements. Ein gutes Beispiel hierfür liefert uns die <a title="Demo für Tooltip mit HTML-Inhalten" href="http://flowplayer.org/tools/demos/tooltip/any-html.html" target="_blank">Dokumentation des Scripts</a>. Nur wollen wir anstelle der dort beschriebenen Tabelle unser vergrößertes Bild wiedergeben.<br />
Ein Blick auf den Demo-Code lohnt sich aber auf jeden Fall, da hier sehr einfach die Funktionsweise beschrieben wird.</p>
<p>Jetzt benötigen wir die Vorschaubilder (Post-Thumbnails). Wenn wir beispielsweise den Effekt auf der Startseite nutzen möchten, öffnen wir die <em><strong>index.php</strong></em> unseres Themes und suchen nach dem Aufruf der Vorschaubilder innerhalb unseres Loops und ersetzen diesen mit folgendem Code:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> have_posts<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;">while</span> <span style="color: #009900;">&#40;</span> have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> the_post<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
...<br />
<span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> has_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// check if the post has a Post Thumbnail assigned to it.</span><br />
<span style="color: #000088;">$thumb</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;">'|title=&quot;[^&quot;]*&quot;|U'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> get_the_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: #339933;">,</span> <span style="color: #0000ff;">'thumbnail'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;div class=&quot;zoomer&quot;&gt;'</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$thumb</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/div&gt; &lt;div class=&quot;tooltip&quot;&gt;'</span> <span style="color: #339933;">.</span> get_the_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: #339933;">,</span> <span style="color: #0000ff;">'medium'</span><span style="color: #009900;">&#41;</span> <span style="color: #0000ff;">'&lt;/div&gt;'</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
...<br />
<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_content<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
...</div></td></tr></tbody></table></div>
<p>Was tut dieser Code? Im Grunde folgendes&#8230; Zuerst prüfe, ob es überhaupt ein Vorschaubild gibt. Wenn ja, dann lade es und entferne den Titel-Tag des Bildes. Dieser Schritt ist nicht zwingend erforderlich, aber er verhindert ein Fehlverhalten des Tooltips.</p>
<p>In der Box mit der Klasse &#8220;tooltip&#8221; laden wir nun das selbe Vorschaubild noch einmal in der &#8220;Medium-Größe&#8221;. Da das kleine Vorschaubild im DIV mit der Klasse &#8220;zoomer&#8221; (wie oben beschrieben) geladen wird, zeigt uns der Mouseover jetzt den div &#8220;tooltip&#8221; mit dem größeren Bild.</p>
<p>Natürlich kann man mit den Dimensionen der Bilder viel experemtieren. Hierfür gibt uns die <a title="Doku zu den Post-Thumbnails" href="http://codex.wordpress.org/Function_Reference/the_post_thumbnail" target="_blank">WordPress-Doku</a> genug Spielraum, oder ihr schaut mal auf diesen Artikel&#8230; Hier habe ich mal die <a title="Kick off the “add_image_size” Function" href="http://blog.t3-artwork.info/2010/09/die-add_image_size-funktion-anstosen/" target="_blank">&#8220;add_image_size&#8221; &#8211; Funktion</a> beschrieben.</p>
<p>Zu guter Letzt noch die notwendigen CSS &#8211; Anweisungen.<br />
Damit wir nur die vergrößerten Bilder beim Mouseover zeigen, <em>müssen</em> wir der CSS-Klasse <em>.tooltip display: none;</em> zuweisen. Die Standard-CSS sieht so aus:</p>
<div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6666ff;">.tooltip</span> <span style="color: #00AA00;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span><br />
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span><br />
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span><br />
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">40px</span> <span style="color: #933;">30px</span> <span style="color: #933;">10px</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
<span style="color: #808080; font-style: italic;">/* mouseover state */</span><br />
<span style="color: #6666ff;">.zoomer</span><span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">-80px</span> <span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/* clicked state */</span><br />
<span style="color: #6666ff;">.zoomer</span><span style="color: #3333ff;">:focus </span><span style="color: #00AA00;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span> <span style="color: #933;">-80px</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<p>Natürlich sind der Gestaltung hier keine Grenzen gesetzt.</p>
<p>Und das war´s im Grunde auch schon. Das Script ist fertig und sollte euch einen schönen Zoom-Effekt für Vorschaubilder liefern.</p>
<p>Ein Live-Demo könnt ihr euch <a title="Live-Demo des Tooltip-Scripts" href="http://than.t3-artwork.info" target="_blank">hier auf meinem Familienblog</a> ansehen. Ich nutze den Tooltip auf der Startseite und den Archiven und habe es noch mit dem Beitrags-Titel und den Link zum Artikel ergänzt. Auch hier sind eurer Kreativität kaum Grenzen gesetzt.</p>
<p>Viel Spaß beim &#8220;Zoomen&#8221; <img src='http://blog.t3-artwork.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="shr-publisher-467"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://blog.t3-artwork.info/2011/08/post-thumbnail-spielereien-bilder-zoom-mit-jquery-tooltip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Integration: bbPress 1.0.3 mit WordPress 3.1.1 verbinden</title>
		<link>http://blog.t3-artwork.info/2011/04/integration-bbpress-1-0-3-mit-wordpress-3-1-1-verbinden/</link>
		<comments>http://blog.t3-artwork.info/2011/04/integration-bbpress-1-0-3-mit-wordpress-3-1-1-verbinden/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 19:06:28 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[bbPress]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[bbPress installieren]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[WordPress einrichten]]></category>
		<category><![CDATA[WordPress Integration]]></category>

		<guid isPermaLink="false">http://blog.t3-artwork.info/?p=311</guid>
		<description><![CDATA[bbPress&#8230; Die Foren-Software aus dem Hause Automattic &#8211; also den &#8220;Machern&#8221; von WordPress &#8211; ist hierzulande leider nicht so verbreitet. Auch die Community hängt weit hinter der von WordPress hinterher. Schade, wie ich finde, denn bbPress ist eine einfache, schnelle und schlanke Foren-Software, die ohne viel Schnick Schnack auf den Punkt kommt &#8211; die Diskussion [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fblog.t3-artwork.info%2F2011%2F04%2Fintegration-bbpress-1-0-3-mit-wordpress-3-1-1-verbinden%2F' data-shr_title='Integration%3A+bbPress+1.0.3+mit+WordPress+3.1.1+verbinden'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.t3-artwork.info%2F2011%2F04%2Fintegration-bbpress-1-0-3-mit-wordpress-3-1-1-verbinden%2F' data-shr_title='Integration%3A+bbPress+1.0.3+mit+WordPress+3.1.1+verbinden'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>bbPress&#8230; Die Foren-Software aus dem Hause <a title="Automattic" href="http://automattic.com/" target="_blank">Automattic</a> &#8211; also den &#8220;Machern&#8221; von WordPress &#8211; ist hierzulande leider nicht so verbreitet. Auch die Community hängt weit hinter der von WordPress hinterher. Schade, wie ich finde, denn bbPress ist eine einfache, schnelle und schlanke Foren-Software, die ohne viel Schnick Schnack auf den Punkt kommt &#8211; die <em>Diskussion</em> steht hier im Fokus.</p>
<p>Da bbPress und WordPress aus einem &#8220;Hause&#8221; stammen, kann man beides hervorragend miteinder kombinieren und gemeinsam nutzen. So die Theorie, doch wie so oft steckt der Teufel im Detail. Beides in Einklang zu bekommen ist nicht schwer, wenn man einige grundlegende Punkte beachtet. Welche das sind, möchte ich kurz zusammen tragen&#8230;<span id="more-311"></span></p>
<h3>1. Download bbPress</h3>
<p>Die aktuellste stabile Version von bbPress (derzeit 1.0.3) gibt es auf der offiziellen <a title="Download bbPress" href="http://bbpress.org/download/" target="_blank">bbPress Seite zum Download</a>.<br />
Einfach herunterladen, entpacken und via FTP in einen separaten Ordner auf den Webserver übertragen. Ich habe mich für dieses Tutorial für eine lokale Installation unter XAMPP im Ordner &#8220;bbPress&#8221; entschieden (wie auf den Screenshots zu sehen sein wird).</p>
<h3>2. Installation von bbPress</h3>
<p>Nach dem Hochladen kann es auch gleich mit der Installation weiter gehen. Ähnlich wie bei WordPress ruft man die <em><strong>install.php</strong></em> über den Browser auf.  In meinem Beispiel: http://localhost/bbPress/bb-admin/install.php</p>
<p>Und hier erwartet einen schon die erste Überraschung: Fehlermeldungen wohin das Auge blickt. Grund für die Fehler ist das s.g. Fehlerreporting unter PHP 5.3. Aber kein Grund zur Sorge, mit einer einfachen Änderung in der <em>bb-load.php</em> kann man dies umgehen. Zudem entstehen keine Nachteile beim weiteren Umgang mit bbPress.</p>
<p>Zum Ändern einfach die <strong>bb-load.php</strong> (im Root-Verzeichnis der bbPress-Installation) öffnen und folgende Zeile ergänzen:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><a href="http://www.php.net/error_reporting"><span style="color: #990000;">error_reporting</span></a><span style="color: #009900;">&#40;</span> <span style="color: #009900; font-weight: bold;">E_ALL</span> ^ <span style="color: #009900; font-weight: bold;">E_NOTICE</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p><strong>ersetzen mit</strong></p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><a href="http://www.php.net/error_reporting"><span style="color: #990000;">error_reporting</span></a><span style="color: #009900;">&#40;</span> <span style="color: #009900; font-weight: bold;">E_ALL</span> ^ E_DEPRECATED ^ <span style="color: #009900; font-weight: bold;">E_NOTICE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>&#8230;speichern und zurück auf den Webserver laden.</p>
<p>Auch nachzulesen unter: <a title="Lösung" href="http://bbpress.org/forums/topic/tons-of-depreciated-errors#post-70000" target="_blank">http://bbpress.org/forums/topic/tons-of-depreciated-errors#post-70000</a></p>
<p>Ein erneuter Blick auf den Installationsbildschirm zeigt, dass wir nun eine &#8220;saubere&#8221; Seite haben.</p>

<a href='http://blog.t3-artwork.info/2011/04/integration-bbpress-1-0-3-mit-wordpress-3-1-1-verbinden/bbpress-1/' title='Screen 1 - bbPress Installation'><img width="150" height="150" src="http://blog.t3-artwork.info/wp-content/uploads/2011/04/bbpress-1-150x150.jpg" class="attachment-thumbnail" alt="Vor den Änderungen in der bb-load.php" title="Screen 1 - bbPress Installation" /></a>
<a href='http://blog.t3-artwork.info/2011/04/integration-bbpress-1-0-3-mit-wordpress-3-1-1-verbinden/bbpress-2/' title='Screen 2 - bbPress Installation'><img width="150" height="150" src="http://blog.t3-artwork.info/wp-content/uploads/2011/04/bbpress-2-150x150.jpg" class="attachment-thumbnail" alt="Nach der Änderung in der bb-load.php" title="Screen 2 - bbPress Installation" /></a>

<p><strong>Weiter geht´s auf der nächsten Seite mit der Einrichtung der Datenbank und der Integration mit WordPress&#8230;</strong></p>
<div class="shr-publisher-311"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://blog.t3-artwork.info/2011/04/integration-bbpress-1-0-3-mit-wordpress-3-1-1-verbinden/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>the_excerpt – Wenige Worte mit großer Wirkung</title>
		<link>http://blog.t3-artwork.info/2010/09/the_excerpt-wenige-worte-mit-groser-wirkung/</link>
		<comments>http://blog.t3-artwork.info/2010/09/the_excerpt-wenige-worte-mit-groser-wirkung/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 18:23:19 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress-Funktionen]]></category>
		<category><![CDATA[the_excerpt]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[WP-Funktionen]]></category>

		<guid isPermaLink="false">http://blog.t3-artwork.info/?p=253</guid>
		<description><![CDATA[Es ist kein neues Thema &#8211; keine neue Funktion, aber sie verdient trotzdem etwas mehr Aufmerksamkeit. Vor einiger Zeit habe ich ein Design mit WordPress umgesetzt, das mir relativ wenig Spielraum für Texte ließ. WordPress bietet von Hause aus die Funktion the_excerpt, die einen Textauszug der Beiträge wiedergibt. Somit war es eine gute Gelegenheit sich [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fblog.t3-artwork.info%2F2010%2F09%2Fthe_excerpt-wenige-worte-mit-groser-wirkung%2F' data-shr_title='the_excerpt+%E2%80%93+Wenige+Worte+mit+gro%C3%9Fer+Wirkung'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.t3-artwork.info%2F2010%2F09%2Fthe_excerpt-wenige-worte-mit-groser-wirkung%2F' data-shr_title='the_excerpt+%E2%80%93+Wenige+Worte+mit+gro%C3%9Fer+Wirkung'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Es ist kein neues Thema &#8211; keine neue Funktion, aber sie verdient trotzdem etwas mehr Aufmerksamkeit.<br />
Vor einiger Zeit habe ich ein Design mit WordPress umgesetzt, das mir relativ wenig Spielraum für Texte ließ. WordPress bietet von Hause aus die Funktion<strong> <a title="WordPress-Doku: the_excerpt" href="http://codex.wordpress.org/Function_Reference/the_excerpt" target="_blank">the_excerpt</a></strong>, die einen Textauszug der Beiträge wiedergibt. Somit war es eine gute Gelegenheit sich etwas genauer mit dieser Funktion zu beschäftigen.<br />
Zugegeben, ich war erstaunt zu sehen, welche Möglichkeiten sich mit diesem &#8220;Textauszug&#8221; ergeben, und wie flexibel man diesen nutzen kann.</p>
<p><strong>Was ist eigentlich the_excerpt?</strong><br />
Mit the_excerpt gibt WordPress eine Art Anlesetext &#8211; oder Auszug &#8211; eines Artikels wieder. Hierfür gibt es bei der Erstellung eines Artikels die Möglichkeit, einen optionalen &#8220;Auszug&#8221; zu erstellen. Tut man dies nicht und lässt das Feld leer, erstellt WordPress automatisch einen Auszug des Artikels &#8211; den so genannten Auto-Excerpt.<br />
<span id="more-253"></span><br />
Wie man den Anlesetext nach persönlichen Bedürfnissen anpassen und sinnvoll nutzen kann, möchte ich mit diesem Beitrag kurz erläutern. Schließlichh bietet er mehr Möglichkeiten, als nur in den Archiven zu verstauben&#8230;</p>
<h3>1. Textlänge von the_excerpt anpassen</h3>
<p>the_excerpt wird von WordPress standardmäßig auf 55 Wörter beschränkt. Wem dies zu viel oder zu wenig ist, der kann mit einer einfachen Funktion die Länge problemlos anpassen. Dafür einfach folgende Zeilen in die <strong>functions.php</strong> Eures Themes einfügen:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> new_excerpt_length<span style="color: #009900;">&#40;</span><span style="color: #000088;">$length</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #b1b100;">return</span> <span style="color: #cc66cc;">20</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'excerpt_length'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'new_excerpt_length'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Der Wert <strong>20</strong> gibt nun die &#8220;neue&#8221; Länge von the_excerpt an.</p>
<h3>2. Die [...] entfernen / ersetzen</h3>
<p>Greift WordPress auf den automatischen Auszug zurück, wird am Ende die berühmte eckige Klammer mit den 3 Punkten <strong>[...]</strong> als Hinweis für mehr Inhalt gesetzt. Wer nun 5 Punkte haben möchte, oder eben gar nichts, der kann auch hier mit einer kleinen Funktion für Abhilfe sorgen. Wiederum in der<strong> functions.php</strong> Eures Themes ergänzt Ihr folgende Zeilen:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> new_excerpt_more<span style="color: #009900;">&#40;</span><span style="color: #000088;">$excerpt</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #b1b100;">return</span> <a href="http://www.php.net/str_replace"><span style="color: #990000;">str_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'[...]'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">' =&gt; '</span><span style="color: #339933;">,</span> <span style="color: #000088;">$excerpt</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_trim_excerpt'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'new_excerpt_more'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Zur veranschaulichung habe ich die regulären <strong>[...]</strong> mit dem <strong> =&gt; </strong> ersetzt. Was Ihr hier hinein schreibt, ist natürlich Euch selbst überlassen.</p>
<h3>3. Die [...] mit dem Artikel verlinken</h3>
<p>Mit dieser Option kann man den &#8220;weiter lesen&#8221; Link zum Artikel erstellen, der so eigentlich nur verfügbar ist, wenn the_content genutzt wird. Eine tolle Möglichkeit, wenn man nicht zwingend die Titel / Überschriften verlinken möchte. Und so geht´s. Auch hier wieder den Code in die functions.php einfügen:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> new_excerpt_more<span style="color: #009900;">&#40;</span><span style="color: #000088;">$more</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$post</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'&lt;a href=&quot;'</span><span style="color: #339933;">.</span> get_permalink<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;">'&quot;&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' [...] '</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/a&gt;'</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'excerpt_more'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'new_excerpt_more'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Wie im Beispiel 2 beschrieben, kann man natürlich die <strong>[...]</strong> mit eigenem Text wie <em>weiter lesen&#8230;</em> ersetzen.</p>
<p>Mit diesen 3 Basics kann man das Aussehen des Auszugs schon prima anpassen. Aber das ist noch nicht alles.</p>
<p>the_excerpt hat einen großen Vorteil gegenüber the_content : Der Text ist unformatiert. Alle HTML-Tags werden von WordPress entfernt, was ihn sehr universell einsetzbar macht. Ein Beispiel: Ich habe in einem Theme das verstaubte <a href="http://de.selfhtml.org/html/kopfdaten/meta.htm">META-Tag &#8220;description&#8221;</a> benutzt, und lasse diesen mit dem Excerpt füllen. Eine simple Funktion, die so aussieht:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">//Beitragsauszug als META-Beschreibung</span><br />
<span style="color: #000000; font-weight: bold;">function</span> meta_description <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #000088;">$HeadExcerpt</span> <span style="color: #339933;">=</span> get_the_excerpt<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><a href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$HeadExcerpt</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #000088;">$auszug</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/htmlspecialchars"><span style="color: #990000;">htmlspecialchars</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$HeadExcerpt</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">ENT_QUOTES</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #009900;">&#125;</span><br />
add_action <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'meta_description'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Zur Veranschaulichung; Diese Funktion prüft, ob der Auszug gefüllt ist. Wenn ja, nimmt sie den Inhalt und schreibt ihn das META-Tag. Um sicherzustellen, das &#8221; (Anführungszeichen) entfert werden (diese würden das Tag vorzeitig schließen) ersetzt die Funktion mit htmlspecialchars unerwartete Sonderzeichen.<br />
<strong>Nachteil:</strong> Ist das optionale Auszugsfeld <span style="text-decoration: underline;">nicht gefüllt</span> &#8211; der Excerpt also leer &#8211; dann wird auch kein Tag in den Kopf der Seite geschrieben.</p>
<p>All diese Beispiele sind getestet und funktionieren. <img src='http://blog.t3-artwork.info/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
In Verbindung mit Vorschaubildern (Thumbnails) bietet the_excerpt viele Möglichkeiten der Gestaltung, auch wenn natürlich nicht der volle Umfang von the_content gegeben ist. Die Frage &#8220;Excerpt vs. Content&#8221; muss sich also jeder selbst stellen.</p>
<p><strong>Nachweise: </strong><br />
Die hier gezeigten Beispiele (1-3) basieren auf dem WordPress Codex <a href="http://codex.wordpress.org/Function_Reference/the_excerpt">the_excerpt</a>.</p>
<p>Viel Spaß beim &#8220;Ausprobieren&#8221;. Bei Fragen&#8230; Fragt! <img src='http://blog.t3-artwork.info/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div class="shr-publisher-253"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://blog.t3-artwork.info/2010/09/the_excerpt-wenige-worte-mit-groser-wirkung/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Quicky: Eigenes Facebook-Konto richtig verlinken</title>
		<link>http://blog.t3-artwork.info/2010/05/quicky-eigenes-facebook-konto-richtig-verlinken/</link>
		<comments>http://blog.t3-artwork.info/2010/05/quicky-eigenes-facebook-konto-richtig-verlinken/#comments</comments>
		<pubDate>Tue, 11 May 2010 18:31:33 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[altop]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.t3-artwork.info/?p=240</guid>
		<description><![CDATA[Mit der Version 1.4 meines Altop-Themes kam eine neue Funktion hinzu &#8211; Der direkte Link zum eigenen Facebook-Konto. Der Link ist hier schon komplett eingerichtet, und muss nur durch die eigene ID ergänzt werden. Das eigene Konto zu verlinken ist im Grunde denkbar einfach und bedarf keinem Plugin. Wie das in wenigen Schritten funktioniert, möchte [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fblog.t3-artwork.info%2F2010%2F05%2Fquicky-eigenes-facebook-konto-richtig-verlinken%2F' data-shr_title='Quicky%3A+Eigenes+Facebook-Konto+richtig+verlinken'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.t3-artwork.info%2F2010%2F05%2Fquicky-eigenes-facebook-konto-richtig-verlinken%2F' data-shr_title='Quicky%3A+Eigenes+Facebook-Konto+richtig+verlinken'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Mit der Version 1.4 meines Altop-Themes kam eine neue Funktion hinzu &#8211; Der direkte Link zum eigenen Facebook-Konto. Der Link ist hier schon komplett eingerichtet, und muss nur durch die eigene ID ergänzt werden. Das eigene Konto zu verlinken ist im Grunde denkbar einfach und bedarf keinem Plugin. Wie das in wenigen Schritten funktioniert, möchte ich kurz erläutern.<span id="more-240"></span></p>
<p>1. Um das Konto direkt anzusprechen, wird die eigene <strong><em>Account-ID</em></strong> benötigt. Diese findet Ihr, wenn Ihr euch bei Facebook einloggt, und auf Eurer &#8220;Profilseite&#8221; seid.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-242" style="border: 1px solid #ccc; margin-top: 5px; margin-bottom: 5px;" title="Get-ID" src="http://blog.t3-artwork.info/wp-content/uploads/2010/05/Get-ID.jpg" alt="Get your Facebook-ID" width="512" height="56" /></p>
<p>Mit dieser ID habt Ihr schon den wichtigsten Schritt für die Kontenverwaltung geschaffen.</p>
<p>2. Der &#8220;richtige&#8221; Link zum Konto<br />
Der Standard-Link sieht bei Facebook so aus;<br />
<em>http://www.facebook.com/profile.php?id=100000999999999&amp;ref=profile</em><br />
Um einen &#8220;schöneren&#8221; Link zu Eurem Konto zu erstellen, brauchen wir nur die richtige URL. Und diese sieht wie folgt aus;</p>
<p><span style="color: #333399;">http://www.facebook.com/people/@/100000999999999</span></p>
<p>Die Zahl am Ende wird jetzt einfach nur durch Eure ID ersetzt. Das @ wird beim Seitenaufruf durch Euren Facebook-Namen ersetzt. Fertig.</p>
<p>Wenn Ihr die Funktion im Altop-Theme benutzen möchtet, tragt Ihr bitte <strong>nur</strong> die <strong>ID</strong> in das entsprechende Feld in das Facebook-Feld ein.</p>
<div class="shr-publisher-240"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://blog.t3-artwork.info/2010/05/quicky-eigenes-facebook-konto-richtig-verlinken/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Tutorial: Ein WordPress-Theme mit PoEdit lokalisieren</title>
		<link>http://blog.t3-artwork.info/2010/04/tutorial-ein-wordpress-theme-mit-poedit-lokalisieren/</link>
		<comments>http://blog.t3-artwork.info/2010/04/tutorial-ein-wordpress-theme-mit-poedit-lokalisieren/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 20:49:21 +0000</pubDate>
		<dc:creator>Thomas</dc:creator>
				<category><![CDATA[Themes]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[lokalisieren]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[WP-Theme]]></category>

		<guid isPermaLink="false">http://blog.t3-artwork.info/?p=164</guid>
		<description><![CDATA[Ein WordPress-Theme lokalisieren &#8211; was bedeutet das eigentlich? Im Grunde nichts anderes, als das man seinen Blog in verschiedenen Sprachen anbietet. Das bedeutet nicht, dass die Inhalte mehrsprachig zur Verfügung gestellt werden, sondern die &#8220;statischen&#8221; Texte, auf die man sonst keinen Einfluss hat. Ein Beispiel; In vielen Themen ist die Zeile zu finden: &#8220;posted by [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fblog.t3-artwork.info%2F2010%2F04%2Ftutorial-ein-wordpress-theme-mit-poedit-lokalisieren%2F' data-shr_title='Tutorial%3A+Ein+WordPress-Theme+mit+PoEdit+lokalisieren'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fblog.t3-artwork.info%2F2010%2F04%2Ftutorial-ein-wordpress-theme-mit-poedit-lokalisieren%2F' data-shr_title='Tutorial%3A+Ein+WordPress-Theme+mit+PoEdit+lokalisieren'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Ein WordPress-Theme lokalisieren &#8211; was bedeutet das eigentlich? Im Grunde nichts anderes, als das man seinen Blog in verschiedenen Sprachen anbietet. Das bedeutet nicht, dass die Inhalte mehrsprachig zur Verfügung gestellt werden, sondern die &#8220;statischen&#8221; Texte, auf die man sonst keinen Einfluss hat.<br />
Ein Beispiel; In vielen Themen ist die Zeile zu finden: &#8220;posted by Admin&#8221;.  Daraus wollen wir gerne &#8220;geschrieben von Admin&#8221; machen&#8230; Wie das geht ohne die Texte &#8220;starr&#8221; im Theme zu ändern, möchte ich in diesem Tutorial erklären.</p>
<h4>Warum ein Theme lokalisieren und nicht &#8220;starr&#8221; übersetzen?</h4>
<p>Die Vorteile eines lokalisiertem Themes liegen in der Flexibilität, die diese Option mit sich bringt. Mein <a href="http://blog.t3-artwork.info/2010/04/altop-neues-wordpress-theme/" title="altop-Theme">aktuelles Theme</a> habe ich beispielsweise zur Übersetzung vorbereitet, und wurde kurz nach Veröffentlichung in französisch übersetzt. Somit wurde es für den französisch sprechenden Teil dieser Welt etwas interessanter.<br />
Auch wenn dies natürlich mit etwas Aufwand verbunden ist, hätte sich wahrscheinlich niemand die Arbeit gemacht, die Texte im Quellcode des Themes zu übersetzen.<br />
<span id="more-164"></span></p>
<h3>Vorbereitung</h3>
<p><strong>Nach welchen Kriterien wird ein Text übersetzt?</strong><br />
Um dem Theme zu sagen, dass hier ein Text steht, der später flexibel übersetzt werden soll / kann, muss dieser entsprechend gekennzeichnet werden. Dazu wird der Text in eine einfache PHP-Anweisung geschrieben und für die Übersetzung &#8220;freigegeben&#8221;. Zur Verfügung stehen uns hierfür zwei einfache Parameter.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">_e<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">//für einen einfachen String - also in unserem Fall einfacher Text und</span><br />
__<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">//für ein Verkettung von Strings und die Übersetzung innerhalb von Funktionen.</span></div></td></tr></tbody></table></div>
<p>Das <strong>_e()</strong> steht übrigens nicht für &#8220;englisch&#8221; oder &#8220;einfach&#8221;, sondern sagt WordPress, dass hier eine <a href="http://doku.wordpress-deutschland.org/Bearbeitung_der_Sprachdatei">Gettext-Datei</a> angesprochen &#8211; also übersetzt &#8211; werden soll.</p>
<p><strong>Den Quellcode im Theme für die Übersetzung vorbereiten</strong><br />
Nachdem wir nun wissen, wie die zu übersetzenden Texte gekennzeichnet werden sollen, müssen wir nun die entsprechenden Passagen im Quellcode des Themes finden und ergänzen.</p>
<p>So wird aus</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/h2.html"><span style="color: #000000; font-weight: bold;">h2</span></a>&gt;</span>Sorry, no posts found...<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/h2.html"><span style="color: #000000; font-weight: bold;">h2</span></a>&gt;</span></div></td></tr></tbody></table></div>
<p>diese Zeile</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;h2&gt; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sorry, no posts found...'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'ThemeName'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> &lt;/h2&gt;</div></td></tr></tbody></table></div>
<p><strong>Wichtig!</strong> Im obigen Beispiel ist zu sehen, dass in der PHP-Zeile der Parameter <strong>&#8216;ThemeName&#8217;</strong> mit aufgerufen wird. Dieser muss auch dort stehen, da die Übersetzung sonst nicht einwandfrei funktionieren wird. Dazu aber später mehr&#8230;</p>
<p>Für die Übersetzung einer Funktion sieht das Ganze dann so aus:<br />
<em>Beispiel einer Archiv-Überschrift</em></p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;h2&gt; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <a href="http://www.php.net/printf"><span style="color: #990000;">printf</span></a><span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Archive for the &amp;#8216; %s &amp;#8217; Category'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'ThemeName'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> single_cat_title<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</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;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> &lt;/h2&gt;</div></td></tr></tbody></table></div>
<p>Auch hier muss der Parameter <strong>&#8216;ThemeName&#8217;</strong> mit angegeben werden.</p>
<p>Diese Prozedur muss in allen Theme-Dateien fortgesetzt werden, um auch keine Passage zu vergessen. Bei einem vorhandenen Theme ist dies wahrscheinlich etwas mühseliger als bei einem, das gerade erstellt wird. </p>
<div class="shr-publisher-164"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://blog.t3-artwork.info/2010/04/tutorial-ein-wordpress-theme-mit-poedit-lokalisieren/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
