<?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>PehBehBeh &#187; WordPress</title>
	<atom:link href="http://pehbehbeh.de/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://pehbehbeh.de</link>
	<description>Erfahrungen eines Hobby-Webentwicklers</description>
	<lastBuildDate>Sun, 05 Feb 2012 21:12:57 +0000</lastBuildDate>
	<language>de</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WordPress: Akismet &amp; Hello Dolly entgültig entfernen</title>
		<link>http://pehbehbeh.de/wordpress/tipps/akismet-hello-dolly-entgueltig-entfernen/</link>
		<comments>http://pehbehbeh.de/wordpress/tipps/akismet-hello-dolly-entgueltig-entfernen/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 18:21:24 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Tipps]]></category>
		<category><![CDATA[Akismet]]></category>
		<category><![CDATA[Aktualisierung]]></category>
		<category><![CDATA[CORE_UPGRADE_SKIP_NEW_BUNDLED]]></category>
		<category><![CDATA[Hello Dolly]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[TwentyTen]]></category>
		<category><![CDATA[Update]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wp-config.php]]></category>
		<category><![CDATA[wp-content]]></category>

		<guid isPermaLink="false">http://pehbehbeh.de/?p=1806</guid>
		<description><![CDATA[<img width="64" height="64" src="http://pehbehbeh.de/wp-content/uploads/2011/07/wordpress.png" class="attachment-post-thumbnail wp-post-image" alt="WordPress" title="WordPress" style="float: left; padding: 6px; margin: 0 6px 6px 0; border: 6px solid #eee;" />Mit jeder Aktualisierung des WordPress-Kerns werden auch Plugins wie Akismet und Hello Dolly oder Themes wie TwentyTen aktualisiert. Hat man diese gelöscht, sind sie nach einem Update wieder vorhanden. Seit WordPress 3.2 gibt es die Möglichkeit, WordPress zu verbieten, den &#8230; <a href="http://pehbehbeh.de/wordpress/tipps/akismet-hello-dolly-entgueltig-entfernen/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<img width="64" height="64" src="http://pehbehbeh.de/wp-content/uploads/2011/07/wordpress.png" class="attachment-post-thumbnail wp-post-image" alt="WordPress" title="WordPress" style="float: left; padding: 6px; margin: 0 6px 6px 0; border: 6px solid #eee;" /><p>Mit jeder Aktualisierung des WordPress-Kerns werden auch Plugins wie <a href="http://wordpress.org/extend/plugins/akismet/">Akismet</a> und <a href="http://wordpress.org/extend/plugins/hello-dolly/">Hello Dolly</a> oder Themes wie <a href="http://wordpress.org/extend/themes/twentyten">TwentyTen</a> aktualisiert. Hat man diese gelöscht, sind sie nach einem Update wieder vorhanden. Seit WordPress 3.2 gibt es die Möglichkeit, WordPress zu verbieten, den <code>wp-content</code>-Ordner anzurühren.</p>
<p><hr style="clear: both;" /></p>
<p>Im Grunde genommen brauchen wir nur eine Konstante, die in die <code>wp-config.php</code> eingefügt wird &#8211; und zwar <code>CORE_UPGRADE_SKIP_NEW_BUNDLED</code>.</p>
<p>Die Zeile in der <code>wp-config.php</code> sieht dann so aus:
<div class="pms">
<table class="php">
<tbody>
<tr class="li1">
<td class="ln">
<pre class="de1">1
</pre>
</td>
<td class="de1">
<pre class="de1"><span class="kw3">define</span><span class="br0">&#40;</span><span class="st_h">'CORE_UPGRADE_SKIP_NEW_BUNDLED'</span><span class="sy0">,</span> <span class="kw4">true</span> <span class="br0">&#41;</span><span class="sy0">;</span></pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>Bei folgenden Aktualisierungen wird also nur noch der WordPress-Kern aktualisiert. Plugins und Themes, die vorinstalliert sind müssen ab jetzt manuell aktualisiert werden.</p>
<hr />
<p>
    <strong>Kategorie:</strong> <a href="http://pehbehbeh.de/wordpress/" title="Alle Artikel in WordPress ansehen">WordPress</a> &raquo; <a href="http://pehbehbeh.de/wordpress/tipps/" title="Alle Artikel in Tipps ansehen">Tipps</a> |
    <strong>Tags:</strong> <a href="http://pehbehbeh.de/tag/akismet/" rel="tag">Akismet</a>, <a href="http://pehbehbeh.de/tag/aktualisierung/" rel="tag">Aktualisierung</a>, <a href="http://pehbehbeh.de/tag/core_upgrade_skip_new_bundled/" rel="tag">CORE_UPGRADE_SKIP_NEW_BUNDLED</a>, <a href="http://pehbehbeh.de/tag/hello-dolly/" rel="tag">Hello Dolly</a>, <a href="http://pehbehbeh.de/tag/plugin/" rel="tag">Plugin</a>, <a href="http://pehbehbeh.de/tag/theme/" rel="tag">Theme</a>, <a href="http://pehbehbeh.de/tag/twentyten/" rel="tag">TwentyTen</a>, <a href="http://pehbehbeh.de/tag/update/" rel="tag">Update</a>, <a href="http://pehbehbeh.de/tag/wordpress/" rel="tag">WordPress</a>, <a href="http://pehbehbeh.de/tag/wp-config-php/" rel="tag">wp-config.php</a>, <a href="http://pehbehbeh.de/tag/wp-content/" rel="tag">wp-content</a>
</p>
<p>
    <a href="http://pehbehbeh.de/wordpress/tipps/akismet-hello-dolly-entgueltig-entfernen/">zum Artikel</a> |
    <a href="http://pehbehbeh.de/wordpress/tipps/akismet-hello-dolly-entgueltig-entfernen/#comments">keine Kommentare</a>
</p> <p><a href="http://pehbehbeh.de/?flattrss_redirect&amp;id=1806&amp;md5=2a973f501619068a0873631dea30b0b7" title="Flattr" target="_blank"><img src="http://pehbehbeh.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://pehbehbeh.de/wordpress/tipps/akismet-hello-dolly-entgueltig-entfernen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="http://pehbehbeh.de/?flattrss_redirect&amp;id=1806&amp;md5=2a973f501619068a0873631dea30b0b7" type="text/html" />
	</item>
		<item>
		<title>WordPress: Auslagern der wp-config.php</title>
		<link>http://pehbehbeh.de/wordpress/tipps/auslagern-wp-config-php/</link>
		<comments>http://pehbehbeh.de/wordpress/tipps/auslagern-wp-config-php/#comments</comments>
		<pubDate>Fri, 13 May 2011 07:07:04 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Tipps]]></category>

		<guid isPermaLink="false">http://pehbehbeh.de/?p=1620</guid>
		<description><![CDATA[<img width="64" height="64" src="http://pehbehbeh.de/wp-content/uploads/2011/05/config.png" class="attachment-post-thumbnail wp-post-image" alt="Konfiguration" title="Konfiguration" style="float: left; padding: 6px; margin: 0 6px 6px 0; border: 6px solid #eee;" />Durch Server-Versagen oder Hintertürchen in diversen Skripten kann es immer wieder vorkommen, dass PHP-Dateien des Servers in Klartext lesbar sind. Der Albtraum für jeden Webmaster, der Konfigurations-Dateien im öffentlichen Verzeichnis hat. Da dies bei nahezu jeder WordPress-Installation der Fall ist, &#8230; <a href="http://pehbehbeh.de/wordpress/tipps/auslagern-wp-config-php/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<img width="64" height="64" src="http://pehbehbeh.de/wp-content/uploads/2011/05/config.png" class="attachment-post-thumbnail wp-post-image" alt="Konfiguration" title="Konfiguration" style="float: left; padding: 6px; margin: 0 6px 6px 0; border: 6px solid #eee;" /><p>Durch Server-Versagen oder Hintertürchen in diversen Skripten kann es immer wieder vorkommen, dass PHP-Dateien des Servers in Klartext lesbar sind. Der Albtraum für jeden Webmaster, der Konfigurations-Dateien im öffentlichen Verzeichnis hat. Da dies bei nahezu jeder WordPress-Installation der Fall ist, möchte ich hier einen einfachen aber effektiven Weg zeigen, die <code>wp-config.php</code> zu schützen.</p>
<p><hr style="clear: both;" /></p>
<h2>Die Auslagerung</h2>
<p>Man kann die Auslagerung in folgenden vier Schritten zusammenfassen:</p>
<ol>
<li>Ausschneiden der sicherheitsrelevanten Einträge der <code>wp-config.php</code></li>
<li>Einfügen in eine eigene Datei (Bsp. <code>config.php</code>)</li>
<li>Abspeichern dieser Datei außerhalb des öffentlichen Stammverzeichnisses</li>
<li>Einbinden dieser Datei in der <code>wp-config.php</code></li>
</ol>
<p>Konkret könnte die originale <code>wp-config.php</code> dann so aussehen:
<div class="pms">
<table class="none">
<tbody>
<tr class="li1">
<td class="ln">
<pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre>
</td>
<td class="de1">
<pre class="de1">&lt;?php
/**
&nbsp;* WordPress Config
&nbsp;*/
require_once(dirname(dirname(__FILE__)) . '/config.php');
&nbsp;
// Lokalisierungs-Einstellungen
define('WPLANG', 'de_DE');
&nbsp;
// Debug-Einstellungen
define('WP_DEBUG', false);
&nbsp;
// WordPress-Einstellungen
if (!defined('ABSPATH'))
&nbsp; &nbsp; define('ABSPATH', dirname(__FILE__) . '/');
&nbsp;
require_once(ABSPATH . 'wp-settings.php');</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>Die <code>config.php</code> liegt in diesem Fall im übergeordneten Ordner und enthält die sensiblen Daten, wie Zugang zu Datenbank, FTP-Server oder auch die Sicherheitsschlüssel:
<div class="pms">
<table class="none">
<tbody>
<tr class="li1">
<td class="ln">
<pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre>
</td>
<td class="de1">
<pre class="de1">&lt;?php
&nbsp;
// MySQL-Einstellungen
define('DB_NAME', &nbsp; &nbsp; 'xxxxxx');
define('DB_USER', &nbsp; &nbsp; 'xxxxxx');
define('DB_PASSWORD', 'xxxxxx');
define('DB_HOST', &nbsp; &nbsp; 'localhost');
define('DB_CHARSET', &nbsp;'utf8');
define('DB_COLLATE', &nbsp;'');
$table_prefix = 'wp_';
&nbsp;
// FTP-Einstellungen
define('FTP_HOST', &nbsp;'xxxxxx');
define('FTP_USER', &nbsp;'xxxxxx');
define('FTP_PASS', &nbsp;'xxxxxx');
define('FS_METHOD', 'direct');
&nbsp;
// Sicherheits-Einstellungen
define('AUTH_KEY', &nbsp; &nbsp; &nbsp; &nbsp; 'xxxxxx');
define('SECURE_AUTH_KEY', &nbsp;'xxxxxx');
define('LOGGED_IN_KEY', &nbsp; &nbsp;'xxxxxx');
define('NONCE_KEY', &nbsp; &nbsp; &nbsp; &nbsp;'xxxxxx');
define('AUTH_SALT', &nbsp; &nbsp; &nbsp; &nbsp;'xxxxxx');
define('SECURE_AUTH_SALT', 'xxxxxx');
define('LOGGED_IN_SALT', &nbsp; 'xxxxxx');
define('NONCE_SALT', &nbsp; &nbsp; &nbsp; 'xxxxxx');</pre>
</td>
</tr>
</tbody>
</table>
</div>
<h2>Die Alternative</h2>
<p>Es kann sein, dass man nicht die nötigen Rechte hat auf den Überordner zuzugreifen. Falls es erlaubt ist eine <code>.htaccess</code>-Datei anzulegen und <code>mod_rewrite</code> aktiviert ist, gibt es dennoch eine Variante, die <code>wp-config.php</code> vor der Öffentlichkeit zu schützen:
<div class="pms">
<div class="none">
<pre class="de1">&lt;files wp-config.php&gt;
Order deny,allow
deny from all
&lt;/files&gt;</pre>
</div>
</div>
<p>Diese Regeln verhindern, dass die <code>wp-config.php</code> vom allgemeinen Web-User aufgerufen werden kann. Somit ist sie ebenfalls relativ gut geschützt.</p>
<p>Ich verwende sogar beide Methoden. Sicher ist sicher. <img src='http://pehbehbeh.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<hr />
<p>
    <strong>Kategorie:</strong> <a href="http://pehbehbeh.de/wordpress/" title="Alle Artikel in WordPress ansehen">WordPress</a> &raquo; <a href="http://pehbehbeh.de/wordpress/tipps/" title="Alle Artikel in Tipps ansehen">Tipps</a> |
    <strong>Tags:</strong> 
</p>
<p>
    <a href="http://pehbehbeh.de/wordpress/tipps/auslagern-wp-config-php/">zum Artikel</a> |
    <a href="http://pehbehbeh.de/wordpress/tipps/auslagern-wp-config-php/#comments">3 Kommentare</a>
</p> <p><a href="http://pehbehbeh.de/?flattrss_redirect&amp;id=1620&amp;md5=9f239895de884b653b291cae1b86ef18" title="Flattr" target="_blank"><img src="http://pehbehbeh.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://pehbehbeh.de/wordpress/tipps/auslagern-wp-config-php/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<atom:link rel="payment" href="http://pehbehbeh.de/?flattrss_redirect&amp;id=1620&amp;md5=9f239895de884b653b291cae1b86ef18" type="text/html" />
	</item>
		<item>
		<title>Pimp My Snippet &#8211; Einfaches Syntax Highlighting in WordPress</title>
		<link>http://pehbehbeh.de/wordpress/plugins/pimp-my-snippet-syntax-highlighting/</link>
		<comments>http://pehbehbeh.de/wordpress/plugins/pimp-my-snippet-syntax-highlighting/#comments</comments>
		<pubDate>Thu, 12 May 2011 11:55:46 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Informationen]]></category>
		<category><![CDATA[Pimp my Snippet]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Problem]]></category>
		<category><![CDATA[Pugin Directory]]></category>
		<category><![CDATA[Recherche]]></category>
		<category><![CDATA[Syntax Highlighting]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://pehbehbeh.de/?p=1713</guid>
		<description><![CDATA[<img width="64" height="64" src="http://pehbehbeh.de/wp-content/uploads/2011/05/highlighter1.png" class="attachment-post-thumbnail wp-post-image" alt="Pimp my Snippet" title="Pimp my Snippet" style="float: left; padding: 6px; margin: 0 6px 6px 0; border: 6px solid #eee;" />Schon als ich diesen Blog im Januar 2010 gestartet habe, lag es auf der Hand, dass ich ein Syntax-Highlighting Plugin benötige. Damals setzte ich noch das recht populäre WP-Syntax Plugin ein, welches mir leider kurz danach Probleme bereitete. Außerdem muss &#8230; <a href="http://pehbehbeh.de/wordpress/plugins/pimp-my-snippet-syntax-highlighting/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<img width="64" height="64" src="http://pehbehbeh.de/wp-content/uploads/2011/05/highlighter1.png" class="attachment-post-thumbnail wp-post-image" alt="Pimp my Snippet" title="Pimp my Snippet" style="float: left; padding: 6px; margin: 0 6px 6px 0; border: 6px solid #eee;" /><p>Schon als ich diesen Blog im Januar 2010 gestartet habe, lag es auf der Hand, dass ich ein Syntax-Highlighting Plugin benötige. <a href="http://pehbehbeh.de/wordpress/plugins/wp-syntax-code-highlighting-in-wordpress/">Damals setzte ich noch das recht populäre WP-Syntax Plugin ein</a>, welches mir leider kurz danach <a href="http://pehbehbeh.de/allgemein/welcome-back/">Probleme bereitete</a>. Außerdem muss bei diesem Plugin noch mühsam das <a href="http://pehbehbeh.de/wordpress/tipps/wordpress-plugin-stylesheets-entfernen-um-server-anfragen-zu-minimieren/">automatisch eingebundene Stylesheet entfernt werden</a>, wenn dies nicht gewünscht ist. Das muss doch besser gehen&#8230;</p>
<p><hr style="clear: both;" />Nach ausführlicher Recherche stellte ich fest, dass es leider kein einziges Syntax-Highlighting Plugin für WordPress gibt, dass nichts weiter tut, als Code schön darzustellen. Ohne tausend Inline-Styles. Ohne Drucken-, Share- oder sonst eine Funktion. Ohne Schnick-Schnack halt.</p>
<p>Deshalb habe ich spontan mein eigenes Plugin geschrieben, das jetzt schon seit über einem Jahr hier im Einsatz ist und für nichts als farbige Code-Boxen sorgt.</p>
<p>In den letzten Tagen habe ich es endlich mal fit für das <a href="https://wordpress.org/extend/plugins/">WordPress Plugin Directory</a> gemacht, wo es jetzt auch <a href="https://wordpress.org/extend/plugins/pimp-my-snippet/">zu finden ist</a>.</p>
<p>Alle weiteren Informationen findet ihr <a href="http://pehbehbeh.de/projekte/wp/pimp-my-snippet/">auf der Projekt-Seite</a>.</p>
<hr />
<p>
    <strong>Kategorie:</strong> <a href="http://pehbehbeh.de/wordpress/" title="Alle Artikel in WordPress ansehen">WordPress</a> &raquo; <a href="http://pehbehbeh.de/wordpress/plugins/" title="Alle Artikel in Plugins ansehen">Plugins</a> |
    <strong>Tags:</strong> <a href="http://pehbehbeh.de/tag/code/" rel="tag">Code</a>, <a href="http://pehbehbeh.de/tag/informationen/" rel="tag">Informationen</a>, <a href="http://pehbehbeh.de/tag/pimp-my-snippet/" rel="tag">Pimp my Snippet</a>, <a href="http://pehbehbeh.de/tag/plugin/" rel="tag">Plugin</a>, <a href="http://pehbehbeh.de/tag/problem/" rel="tag">Problem</a>, <a href="http://pehbehbeh.de/tag/pugin-directory/" rel="tag">Pugin Directory</a>, <a href="http://pehbehbeh.de/tag/recherche/" rel="tag">Recherche</a>, <a href="http://pehbehbeh.de/tag/syntax-highlighting/" rel="tag">Syntax Highlighting</a>, <a href="http://pehbehbeh.de/tag/wordpress/" rel="tag">WordPress</a>
</p>
<p>
    <a href="http://pehbehbeh.de/wordpress/plugins/pimp-my-snippet-syntax-highlighting/">zum Artikel</a> |
    <a href="http://pehbehbeh.de/wordpress/plugins/pimp-my-snippet-syntax-highlighting/#comments">2 Kommentare</a>
</p> <p><a href="http://pehbehbeh.de/?flattrss_redirect&amp;id=1713&amp;md5=dcfd50c3b0a5ec6f7c2a74c2c2bbc85f" title="Flattr" target="_blank"><img src="http://pehbehbeh.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://pehbehbeh.de/wordpress/plugins/pimp-my-snippet-syntax-highlighting/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<atom:link rel="payment" href="http://pehbehbeh.de/?flattrss_redirect&amp;id=1713&amp;md5=dcfd50c3b0a5ec6f7c2a74c2c2bbc85f" type="text/html" />
	</item>
		<item>
		<title>Quick Tip: WordPress Theme-Vorschau im Vollbildmodus</title>
		<link>http://pehbehbeh.de/wordpress/tipps/theme-vorschau-vollbildmodus/</link>
		<comments>http://pehbehbeh.de/wordpress/tipps/theme-vorschau-vollbildmodus/#comments</comments>
		<pubDate>Sun, 12 Dec 2010 14:39:35 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Tipps]]></category>
		<category><![CDATA[Aufruf]]></category>
		<category><![CDATA[Backend]]></category>
		<category><![CDATA[GET-Parameter]]></category>
		<category><![CDATA[Inlineframe]]></category>
		<category><![CDATA[Stylesheet]]></category>
		<category><![CDATA[Template]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[Theme-Vorschau]]></category>
		<category><![CDATA[TwentyTen]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://pehbehbeh.de/?p=1267</guid>
		<description><![CDATA[<img width="64" height="64" src="http://pehbehbeh.de/wp-content/uploads/2010/12/quick-64x64.png" class="attachment-post-thumbnail wp-post-image" alt="Quick" title="Quick" style="float: left; padding: 6px; margin: 0 6px 6px 0; border: 6px solid #eee;" />Seit einiger Zeit gibt es die Theme-Vorschau in WordPress. Mit Hilfe dieser kann man im Backend ein neues Theme testen, ohne es zu aktivieren. Leider ist die Ansicht auf einen eingebetteten Frame innerhalb eines Popups beschränkt. Manchmal kann es jedoch &#8230; <a href="http://pehbehbeh.de/wordpress/tipps/theme-vorschau-vollbildmodus/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<img width="64" height="64" src="http://pehbehbeh.de/wp-content/uploads/2010/12/quick-64x64.png" class="attachment-post-thumbnail wp-post-image" alt="Quick" title="Quick" style="float: left; padding: 6px; margin: 0 6px 6px 0; border: 6px solid #eee;" /><p>Seit einiger Zeit gibt es die Theme-Vorschau in WordPress. Mit Hilfe dieser kann man im Backend ein neues Theme testen, ohne es zu aktivieren. Leider ist die Ansicht auf einen eingebetteten Frame innerhalb eines Popups beschränkt. Manchmal kann es jedoch von Nöten sein, dass man ein neues Theme so testen möchte, wie es auch später aussieht &#8211; im Vollbildmodus. Ich finde außerdem angenehmer.</p>
<p><hr style="clear: both;" /></p>
<p>Dazu muss man sich nur die <strong>GET-Parameter</strong> anschauen, die WordPress über dem Inlineframe an die Startseite eures Blogs übergibt. Bei einem Test mit dem TwentyTen-Theme lauten diese wie folgt:</p>
<ul>
<li><code>preview=1</code></li>
<li><code>template=twentyten</code></li>
<li><code>stylesheet=twentyten</code></li>
</ul>
<p>Der <strong>vollständige Aufruf </strong>sähe so aus:</p>
<blockquote><p><code>http://deinblog.de/?preview=1&amp;template=twentyten&amp;stylesheet=twentyten</code></p></blockquote>
<p>Der Aufruf funktioniert übrigens nur mit Administrationsrechten. Außerdem ist es interessant, dass man <strong>Template-Quelle</strong> und <strong>Stylesheet-Quelle</strong> getrennt angeben kann. So lassen sich ganz einfach Themes mit anderen Stylesheets testen.</p>
<hr />
<p>
    <strong>Kategorie:</strong> <a href="http://pehbehbeh.de/wordpress/" title="Alle Artikel in WordPress ansehen">WordPress</a> &raquo; <a href="http://pehbehbeh.de/wordpress/tipps/" title="Alle Artikel in Tipps ansehen">Tipps</a> |
    <strong>Tags:</strong> <a href="http://pehbehbeh.de/tag/aufruf/" rel="tag">Aufruf</a>, <a href="http://pehbehbeh.de/tag/backend/" rel="tag">Backend</a>, <a href="http://pehbehbeh.de/tag/get-parameter/" rel="tag">GET-Parameter</a>, <a href="http://pehbehbeh.de/tag/inlineframe/" rel="tag">Inlineframe</a>, <a href="http://pehbehbeh.de/tag/stylesheet/" rel="tag">Stylesheet</a>, <a href="http://pehbehbeh.de/tag/template/" rel="tag">Template</a>, <a href="http://pehbehbeh.de/tag/theme/" rel="tag">Theme</a>, <a href="http://pehbehbeh.de/tag/theme-vorschau/" rel="tag">Theme-Vorschau</a>, <a href="http://pehbehbeh.de/tag/twentyten/" rel="tag">TwentyTen</a>, <a href="http://pehbehbeh.de/tag/wordpress/" rel="tag">WordPress</a>
</p>
<p>
    <a href="http://pehbehbeh.de/wordpress/tipps/theme-vorschau-vollbildmodus/">zum Artikel</a> |
    <a href="http://pehbehbeh.de/wordpress/tipps/theme-vorschau-vollbildmodus/#comments">keine Kommentare</a>
</p> <p><a href="http://pehbehbeh.de/?flattrss_redirect&amp;id=1267&amp;md5=9c8a2ce2f6a2348012164d760a4c66f5" title="Flattr" target="_blank"><img src="http://pehbehbeh.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://pehbehbeh.de/wordpress/tipps/theme-vorschau-vollbildmodus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="http://pehbehbeh.de/?flattrss_redirect&amp;id=1267&amp;md5=9c8a2ce2f6a2348012164d760a4c66f5" type="text/html" />
	</item>
		<item>
		<title>Lesbare Zeitdifferenz à la Facebook &amp; Twitter mit PHP/WordPress darstellen</title>
		<link>http://pehbehbeh.de/webentwicklung/php/lesbare-zeitdifferenz/</link>
		<comments>http://pehbehbeh.de/webentwicklung/php/lesbare-zeitdifferenz/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 06:30:54 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tipps]]></category>

		<guid isPermaLink="false">http://pehbehbeh.de/?p=1170</guid>
		<description><![CDATA[<img width="64" height="64" src="http://pehbehbeh.de/wp-content/uploads/2010/10/clock-64x64.png" class="attachment-post-thumbnail wp-post-image" alt="Uhr" title="Uhr" style="float: left; padding: 6px; margin: 0 6px 6px 0; border: 6px solid #eee;" />In sozialen Netzwerken wie Facebook und Twitter ist es üblich nicht den Zeitstempel eines Postings anzuzeigen, sondern die verstrichene Zeitspanne seit der Erstellung. In WordPress ist dies mit der Funktion human_time_diff() möglich, die sich schon seit Version 1.5 im Core &#8230; <a href="http://pehbehbeh.de/webentwicklung/php/lesbare-zeitdifferenz/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<img width="64" height="64" src="http://pehbehbeh.de/wp-content/uploads/2010/10/clock-64x64.png" class="attachment-post-thumbnail wp-post-image" alt="Uhr" title="Uhr" style="float: left; padding: 6px; margin: 0 6px 6px 0; border: 6px solid #eee;" /><p>In sozialen Netzwerken wie Facebook und Twitter ist es üblich nicht den Zeitstempel eines Postings anzuzeigen, sondern die verstrichene Zeitspanne seit der Erstellung. In WordPress ist dies mit der Funktion <code>human_time_diff()</code> möglich, die sich schon seit Version 1.5 im Core befindet &#8211; doch was steckt eigentlich hinter dieser Funktion?</p>
<p><hr style="clear: both;" /></p>
<h2>Die Funktion in WordPress</h2>
<p>Der Funktion <a href="http://codex.wordpress.org/Function_Reference/human_time_diff"><code>human_time_diff()</code></a> besitzt einen Pflichtparameter <strong>(<code>$from</code>)</strong> und einen optionalen Parameter <strong>(<code>$to</code>)</strong>. Zwischen diesen beiden Zeitstempeln wird die Differenz berechnet und in einem lesbaren Format zurückgegeben. Sollte kein zweiter Wert angegeben werden wird immer der aktuelle Zeitstempel verwendet, was in den meisten Fällen ausreichen sollte.</p>
<h3>Beispiel 1: Artikel</h3>
<div class="pms">
<table class="none">
<tbody>
<tr class="li1">
<td class="ln">
<pre class="de1">1
</pre>
</td>
<td class="de1">
<pre class="de1">&lt;?php echo human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ago'; ?&gt;</pre>
</td>
</tr>
</tbody>
</table>
</div>
<h3>Beispiel 2: Kommentare</h3>
<p><?php echo human_time_diff(get_comment_time('U'), current_time('timestamp')) . ' ago'; ?>
<div class="pms">
<table class="none">
<tbody>
<tr class="li1">
<td class="ln">
<pre class="de1">1
</pre>
</td>
<td class="de1">
<pre class="de1">&lt;?php echo human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ago'; ?&gt;</pre>
</td>
</tr>
</tbody>
</table>
</div>
<h2>Die eigene Funktion</h2>
<p>Möchte man dieses Feature in die eigene (nicht-WordPress) Seite integrieren, muss man entweder selbst Hand anlegen oder in die <code>wp-includes/formatting.php</code> schauen. Dort findet man den Schnipsel der Funktion, der sich natürlich noch an die eigenen Bedürfnisse (z.B. die deutsche Sprache) anpassen lässt.
<div class="pms">
<table class="none">
<tbody>
<tr class="li1">
<td class="ln">
<pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre>
</td>
<td class="de1">
<pre class="de1">function human_time_diff( $from, $to = '' ) {
&nbsp; &nbsp; &nbsp; &nbsp; if ( empty($to) )
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $to = time();
&nbsp; &nbsp; &nbsp; &nbsp; $diff = (int) abs($to - $from);
&nbsp; &nbsp; &nbsp; &nbsp; if ($diff &lt;= 3600) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $mins = round($diff / 60);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($mins &lt;= 1) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $mins = 1;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* translators: min=minute */
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $since = sprintf(_n('%s min', '%s mins', $mins), $mins);
&nbsp; &nbsp; &nbsp; &nbsp; } else if (($diff &lt;= 86400) &amp;&amp; ($diff &gt; 3600)) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $hours = round($diff / 3600);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($hours &lt;= 1) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $hours = 1;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $since = sprintf(_n('%s hour', '%s hours', $hours), $hours);
&nbsp; &nbsp; &nbsp; &nbsp; } elseif ($diff &gt;= 86400) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $days = round($diff / 86400);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($days &lt;= 1) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $days = 1;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $since = sprintf(_n('%s day', '%s days', $days), $days);
&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; return $since;
}</pre>
</td>
</tr>
</tbody>
</table>
</div>
<hr />
<p>
    <strong>Kategorie:</strong> <a href="http://pehbehbeh.de/webentwicklung/" title="Alle Artikel in Webentwicklung ansehen">Webentwicklung</a> &raquo; <a href="http://pehbehbeh.de/webentwicklung/php/" title="Alle Artikel in PHP ansehen">PHP</a> |
    <strong>Tags:</strong> 
</p>
<p>
    <a href="http://pehbehbeh.de/webentwicklung/php/lesbare-zeitdifferenz/">zum Artikel</a> |
    <a href="http://pehbehbeh.de/webentwicklung/php/lesbare-zeitdifferenz/#comments">keine Kommentare</a>
</p> <p><a href="http://pehbehbeh.de/?flattrss_redirect&amp;id=1170&amp;md5=ab11fb706f262904f05fda22228a8c66" title="Flattr" target="_blank"><img src="http://pehbehbeh.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://pehbehbeh.de/webentwicklung/php/lesbare-zeitdifferenz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="http://pehbehbeh.de/?flattrss_redirect&amp;id=1170&amp;md5=ab11fb706f262904f05fda22228a8c66" type="text/html" />
	</item>
		<item>
		<title>WordPress: RSS-Feed mit CSS verschönern</title>
		<link>http://pehbehbeh.de/wordpress/tipps/rss-feed-css/</link>
		<comments>http://pehbehbeh.de/wordpress/tipps/rss-feed-css/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 20:44:54 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Tipps]]></category>
		<category><![CDATA[Align RSS Images]]></category>
		<category><![CDATA[Ausrichtung]]></category>
		<category><![CDATA[Bildbeschreibungen]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Feed]]></category>
		<category><![CDATA[Feed Styler]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[Funktion]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[RSS-Feed]]></category>
		<category><![CDATA[Text]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[the_post_thumbnail()]]></category>
		<category><![CDATA[Thumbnail]]></category>

		<guid isPermaLink="false">http://pehbehbeh.de/?p=1091</guid>
		<description><![CDATA[<img width="64" height="64" src="http://pehbehbeh.de/wp-content/uploads/2010/09/rss-settings.png" class="attachment-post-thumbnail wp-post-image" alt="RSS Settings" title="RSS Settings" style="float: left; padding: 6px; margin: 0 6px 6px 0; border: 6px solid #eee;" />Vor einiger Zeit schrieb ich über die Thumbnail-Integration in RSS-Feeds. Nebenher erwähnte ich, wie man zusätzlich CSS-Regeln in den RSS-Feed bekommt. Diese Methode erwies sich als nicht sehr vorteilhaft. Deswegen möchte ich mit diesem Artikel beschreiben, wie man seinen RSS-Feed &#8230; <a href="http://pehbehbeh.de/wordpress/tipps/rss-feed-css/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<img width="64" height="64" src="http://pehbehbeh.de/wp-content/uploads/2010/09/rss-settings.png" class="attachment-post-thumbnail wp-post-image" alt="RSS Settings" title="RSS Settings" style="float: left; padding: 6px; margin: 0 6px 6px 0; border: 6px solid #eee;" /><p>Vor einiger Zeit schrieb ich über die <a href="http://pehbehbeh.de/wordpress/tipps/thumbnails-im-rss-feed-anzeigen/">Thumbnail-Integration in RSS-Feeds</a>. Nebenher erwähnte ich, wie man zusätzlich CSS-Regeln in den RSS-Feed bekommt. Diese Methode erwies sich als nicht sehr vorteilhaft. Deswegen möchte ich mit diesem Artikel beschreiben, wie man seinen RSS-Feed in WordPress verschönern kann.</p>
<p><hr style="clear: both;" /></p>
<p>Grundsätzlich haben CSS-Regeln eigentlich nichts in Feeds zu suchen, aber ich bin der Meinung, dass wenigstens Bilder neben dem Text positioniert werden sollten, damit nicht der Textfluss unterbrochen wird. Darüber hinaus sollten die von WordPress verwendeten Bildbeschreibungen und die Thumbnails vernünftig formatiert werden.</p>
<h2>Thumbnails im RSS-Feed stylen</h2>
<p>Wenn man Thumbnails im RSS-Feed anzeigt, kann man die Funktion <a href="http://codex.wordpress.org/Function_Reference/the_post_thumbnail"><code>the_post_thumbnail()</code></a> auch um Style-Angaben erweitern. Dazu nutzt man den zweiten und dritten Parameter:
<div class="pms">
<table class="none">
<tbody>
<tr class="li1">
<td class="ln">
<pre class="de1">1
2
3
4
5
6
7
8
</pre>
</td>
<td class="de1">
<pre class="de1">function my_feed_thumbnail($content) {
&nbsp; &nbsp; if (is_feed() &amp;&amp; has_post_thumbnail()) {
&nbsp; &nbsp; &nbsp; &nbsp; $style = 'float: left; padding: 6px; margin: 0 6px 6px 0; border: 6px solid #eee;';
&nbsp; &nbsp; &nbsp; &nbsp; return the_post_thumbnail('post-thumbnail', array('style' =&gt; $style)) . $content;
&nbsp; &nbsp; }
&nbsp; &nbsp; return $content;
}
add_filter('the_content', 'my_feed_thumbnail');</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>Dieser Code-Schnipsel gehört natürlich wie immer in die functions.php des aktuellen Themes.</p>
<h2>Plugin: Align RSS Images</h2>
<p>Das Plugin <a href="http://wordpress.org/extend/plugins/align-rss-images/">Align RSS Images</a> übernimmt sowohl die Formatierung CSS-Klassen, die für die Ausrichtung der Bilder zuständig sind (<code>alignleft, alignright, aligncenter, centered</code>), als auch die Formatierung der Bildbeschreibungen (<code>wp-caption, wp-caption-text</code>).</p>
<h2>Plugin: Feed Styler</h2>
<p>Möchte man noch weitere individuelle CSS-Regeln in den RSS-Feed einfügen, so bietet das Plugin <a href="http://wordpress.org/extend/plugins/feed-styler/">Feed Styler</a> die nötigen Mittel. Im Backend können beliebige CSS-Regeln angegeben werden, die bei der Auslieferung des RSS-Feeds in Inline-Styles umgewandelt werden.</p>
<hr />
<p>
    <strong>Kategorie:</strong> <a href="http://pehbehbeh.de/wordpress/" title="Alle Artikel in WordPress ansehen">WordPress</a> &raquo; <a href="http://pehbehbeh.de/wordpress/tipps/" title="Alle Artikel in Tipps ansehen">Tipps</a> |
    <strong>Tags:</strong> <a href="http://pehbehbeh.de/tag/align-rss-images/" rel="tag">Align RSS Images</a>, <a href="http://pehbehbeh.de/tag/ausrichtung/" rel="tag">Ausrichtung</a>, <a href="http://pehbehbeh.de/tag/bildbeschreibungen/" rel="tag">Bildbeschreibungen</a>, <a href="http://pehbehbeh.de/tag/css/" rel="tag">CSS</a>, <a href="http://pehbehbeh.de/tag/feed/" rel="tag">Feed</a>, <a href="http://pehbehbeh.de/tag/feed-styler/" rel="tag">Feed Styler</a>, <a href="http://pehbehbeh.de/tag/functions-php/" rel="tag">functions.php</a>, <a href="http://pehbehbeh.de/tag/funktion/" rel="tag">Funktion</a>, <a href="http://pehbehbeh.de/tag/plugin/" rel="tag">Plugin</a>, <a href="http://pehbehbeh.de/tag/rss-feed/" rel="tag">RSS-Feed</a>, <a href="http://pehbehbeh.de/tag/text/" rel="tag">Text</a>, <a href="http://pehbehbeh.de/tag/theme/" rel="tag">Theme</a>, <a href="http://pehbehbeh.de/tag/the_post_thumbnail/" rel="tag">the_post_thumbnail()</a>, <a href="http://pehbehbeh.de/tag/thumbnail/" rel="tag">Thumbnail</a>
</p>
<p>
    <a href="http://pehbehbeh.de/wordpress/tipps/rss-feed-css/">zum Artikel</a> |
    <a href="http://pehbehbeh.de/wordpress/tipps/rss-feed-css/#comments">2 Kommentare</a>
</p> <p><a href="http://pehbehbeh.de/?flattrss_redirect&amp;id=1091&amp;md5=fe7c1c428a95d24653b9ff2c5324af8d" title="Flattr" target="_blank"><img src="http://pehbehbeh.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://pehbehbeh.de/wordpress/tipps/rss-feed-css/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<atom:link rel="payment" href="http://pehbehbeh.de/?flattrss_redirect&amp;id=1091&amp;md5=fe7c1c428a95d24653b9ff2c5324af8d" type="text/html" />
	</item>
		<item>
		<title>WordPress: Eingehende Links von IceRocket ohne Plugin auf dem Dashboard anzeigen</title>
		<link>http://pehbehbeh.de/wordpress/tipps/links-icerocket-plugin-dashboard/</link>
		<comments>http://pehbehbeh.de/wordpress/tipps/links-icerocket-plugin-dashboard/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 06:10:18 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Tipps]]></category>
		<category><![CDATA[Dashboard]]></category>
		<category><![CDATA[eingehende Links]]></category>
		<category><![CDATA[Google Blogsuche]]></category>
		<category><![CDATA[IceRocket]]></category>
		<category><![CDATA[Konfiguration]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[RSS-Feed]]></category>
		<category><![CDATA[Widget]]></category>
		<category><![CDATA[Zwischenablage]]></category>

		<guid isPermaLink="false">http://pehbehbeh.de/?p=1038</guid>
		<description><![CDATA[<img width="64" height="64" src="http://pehbehbeh.de/wp-content/uploads/2010/08/rocket-64x64.png" class="attachment-post-thumbnail wp-post-image" alt="Rocket" title="Rocket" style="float: left; padding: 6px; margin: 0 6px 6px 0; border: 6px solid #eee;" />Da die Google Blogsuche bei mir leider nicht alle eingehenden Links erfasst, habe ich mich dazu entschieden die eingehenden Links von IceRocket anzuzeigen. Dafür sind nur zwei kleine Schritte nötig, die in ein bis zwei Minuten bewältigt sind. Schritt 1: &#8230; <a href="http://pehbehbeh.de/wordpress/tipps/links-icerocket-plugin-dashboard/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<img width="64" height="64" src="http://pehbehbeh.de/wp-content/uploads/2010/08/rocket-64x64.png" class="attachment-post-thumbnail wp-post-image" alt="Rocket" title="Rocket" style="float: left; padding: 6px; margin: 0 6px 6px 0; border: 6px solid #eee;" /><p>Da die Google Blogsuche bei mir leider nicht alle eingehenden Links erfasst, habe ich mich dazu entschieden die eingehenden Links von IceRocket anzuzeigen. Dafür sind nur zwei kleine Schritte nötig, die in ein bis zwei Minuten bewältigt sind.</p>
<p><hr style="clear: both;" /></p>
<h2>Schritt 1: Eingehende Links bei IceRocket suchen</h2>
<p>Geht auf die <a href="http://icerocket.com/">IceRocket Website</a> und sucht nach &#8220;link:example.com&#8221; (ohne Anführungszeichen). Natürlich müsst ihr example.com mit der Domain eures Blogs ersetzen.</p>
<blockquote><p><a href="http://www.icerocket.com/search?q=link:example.com">http://www.icerocket.com/search?q=link:<strong>example.com</strong></a></p></blockquote>
<p>Unten Links auf der Ergebnisseite befindet sich der Link zum RSS-Feed der Ergebnisse.</p>
<div id="attachment_1041" class="wp-caption alignnone" style="width: 490px;  border: 1px solid #dddddd; background-color: #f3f3f3; padding-top: 4px; margin: 10px; text-align:center;"><img class="size-large wp-image-1041" title="IceRocket Subscribe" src="http://pehbehbeh.de/wp-content/uploads/2010/08/icerocket_subscribe-480x309.png" alt="" width="480" height="309" /><p style=' padding: 0 4px 5px; margin: 0;'  class="wp-caption-text">IceRocket Ergebnisse abonnieren</p></div>
<p>Diesen Link kopiert ihr euch in die Zwischenablage.</p>
<blockquote><p><a href="http://www.icerocket.com/search?q=link:example.com&amp;rss=1">http://www.icerocket.com/search?q=link:<strong>example.com</strong>&amp;rss=1</a></p></blockquote>
<h2>Schritt 2: WordPress Dashboard-Widget konfigurieren</h2>
<p>Jetzt müsst ihr euch ins Backend von WordPress einloggen und das Widget &#8220;Eingehende Links&#8221; auf eurem Dashboard bearbeiten, indem ihr im Widget auf &#8220;konfigurieren&#8221; klickt.</p>
<div id="attachment_1042" class="wp-caption alignnone" style="width: 361px;  border: 1px solid #dddddd; background-color: #f3f3f3; padding-top: 4px; margin: 10px; text-align:center;"><img class="size-full wp-image-1042" title="Eingehende Links Konfigurieren #1" src="http://pehbehbeh.de/wp-content/uploads/2010/08/eingehende_links_konfigurieren.png" alt="" width="351" height="336" /><p style=' padding: 0 4px 5px; margin: 0;'  class="wp-caption-text">Eingehende Links Konfigurieren #1</p></div>
<div id="attachment_1043" class="wp-caption alignnone" style="width: 363px;  border: 1px solid #dddddd; background-color: #f3f3f3; padding-top: 4px; margin: 10px; text-align:center;"><img class="size-full wp-image-1043" title="Eingehende Links Konfigurieren #2" src="http://pehbehbeh.de/wp-content/uploads/2010/08/eingehende_links_konfigurieren2.png" alt="" width="353" height="201" /><p style=' padding: 0 4px 5px; margin: 0;'  class="wp-caption-text">Eingehende Links Konfigurieren #2</p></div>
<p>Die Einstellungen müsst ihr nur noch speichern und schon werden euch die eingehenden Links &#8211; basierend auf den Daten von IceRocket &#8211; angezeigt.</p>
<hr />
<p>
    <strong>Kategorie:</strong> <a href="http://pehbehbeh.de/wordpress/" title="Alle Artikel in WordPress ansehen">WordPress</a> &raquo; <a href="http://pehbehbeh.de/wordpress/tipps/" title="Alle Artikel in Tipps ansehen">Tipps</a> |
    <strong>Tags:</strong> <a href="http://pehbehbeh.de/tag/dashboard/" rel="tag">Dashboard</a>, <a href="http://pehbehbeh.de/tag/eingehende-links/" rel="tag">eingehende Links</a>, <a href="http://pehbehbeh.de/tag/google-blogsuche/" rel="tag">Google Blogsuche</a>, <a href="http://pehbehbeh.de/tag/icerocket/" rel="tag">IceRocket</a>, <a href="http://pehbehbeh.de/tag/konfiguration/" rel="tag">Konfiguration</a>, <a href="http://pehbehbeh.de/tag/links/" rel="tag">Links</a>, <a href="http://pehbehbeh.de/tag/rss-feed/" rel="tag">RSS-Feed</a>, <a href="http://pehbehbeh.de/tag/widget/" rel="tag">Widget</a>, <a href="http://pehbehbeh.de/tag/zwischenablage/" rel="tag">Zwischenablage</a>
</p>
<p>
    <a href="http://pehbehbeh.de/wordpress/tipps/links-icerocket-plugin-dashboard/">zum Artikel</a> |
    <a href="http://pehbehbeh.de/wordpress/tipps/links-icerocket-plugin-dashboard/#comments">4 Kommentare</a>
</p> <p><a href="http://pehbehbeh.de/?flattrss_redirect&amp;id=1038&amp;md5=3f13df08a0253df88af30ccbf84e064c" title="Flattr" target="_blank"><img src="http://pehbehbeh.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://pehbehbeh.de/wordpress/tipps/links-icerocket-plugin-dashboard/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<atom:link rel="payment" href="http://pehbehbeh.de/?flattrss_redirect&amp;id=1038&amp;md5=3f13df08a0253df88af30ccbf84e064c" type="text/html" />
	</item>
		<item>
		<title>WordPress: FTP-Daten in der wp-config.php speichern</title>
		<link>http://pehbehbeh.de/wordpress/tipps/ftp-daten-wp-config-php-speichern/</link>
		<comments>http://pehbehbeh.de/wordpress/tipps/ftp-daten-wp-config-php-speichern/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 06:48:06 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Tipps]]></category>
		<category><![CDATA[Alternative]]></category>
		<category><![CDATA[Backend]]></category>
		<category><![CDATA[Content]]></category>
		<category><![CDATA[Dateirechte]]></category>
		<category><![CDATA[Dateisystem]]></category>
		<category><![CDATA[Datenbank]]></category>
		<category><![CDATA[Definition]]></category>
		<category><![CDATA[direct]]></category>
		<category><![CDATA[Erweiterung]]></category>
		<category><![CDATA[Fehler]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[ftp_credentials]]></category>
		<category><![CDATA[Key]]></category>
		<category><![CDATA[Konstante]]></category>
		<category><![CDATA[Methode]]></category>
		<category><![CDATA[options]]></category>
		<category><![CDATA[Ordner]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Risiko]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Sicherheit]]></category>
		<category><![CDATA[Socket]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[Update]]></category>
		<category><![CDATA[Verzeichnis]]></category>
		<category><![CDATA[WordPress Core]]></category>
		<category><![CDATA[WordPress-Codex]]></category>
		<category><![CDATA[wp-config.php]]></category>
		<category><![CDATA[Zugangsdaten]]></category>

		<guid isPermaLink="false">http://pehbehbeh.de/?p=911</guid>
		<description><![CDATA[<img width="64" height="64" src="http://pehbehbeh.de/wp-content/uploads/2010/06/wordpress-logo-64x64.png" class="attachment-post-thumbnail wp-post-image" alt="WordPress Logo" title="WordPress Logo" style="float: left; padding: 6px; margin: 0 6px 6px 0; border: 6px solid #eee;" />Seitdem das automatische Update im WordPress Core vorhanden ist, besteht die Möglichkeit FTP-Daten im Backend anzugeben. Danach kann man sowohl Plugins als auch den Core per Klick auf den neusten Stand bringen. Hinterlegt man jedoch die Daten im Backend, so &#8230; <a href="http://pehbehbeh.de/wordpress/tipps/ftp-daten-wp-config-php-speichern/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<img width="64" height="64" src="http://pehbehbeh.de/wp-content/uploads/2010/06/wordpress-logo-64x64.png" class="attachment-post-thumbnail wp-post-image" alt="WordPress Logo" title="WordPress Logo" style="float: left; padding: 6px; margin: 0 6px 6px 0; border: 6px solid #eee;" /><p>Seitdem das automatische Update im WordPress Core vorhanden ist, besteht die Möglichkeit FTP-Daten im Backend anzugeben. Danach kann man sowohl Plugins als auch den Core per Klick auf den neusten Stand bringen. Hinterlegt man jedoch die Daten im Backend, so speichert WordPress die Zugangsdaten in der Datenbank. Zu dieser risikoreichen Methode gibt es eine Alternative.</p>
<p><hr style="clear: both;" /></p>
<h2>Bearbeiten der <code>wp-config.php</code></h2>
<h3>Zugangsdaten</h3>
<p>In der <code>wp-config.php</code> lassen sich bestimmte Konstanten definieren, sodass die Abfrage der Zugangsdaten und somit auch die Speicherung nicht mehr nötig ist. Sie lauten wie folgt:
<div class="pms">
<table class="none">
<tbody>
<tr class="li1">
<td class="ln">
<pre class="de1">1
2
3
</pre>
</td>
<td class="de1">
<pre class="de1">define('FTP_HOST', 'ftp.example.org');
define('FTP_USER', 'username');
define('FTP_PASS', 'password');</pre>
</td>
</tr>
</tbody>
</table>
</div>
<h3>Sichere Verbindung</h3>
<p>Für eine sichere Verbindung sorgt folgende Zeile (Standard: <code>false</code>):
<div class="pms">
<table class="none">
<tbody>
<tr class="li1">
<td class="ln">
<pre class="de1">1
</pre>
</td>
<td class="de1">
<pre class="de1">define('FTP_SSL', true);</pre>
</td>
</tr>
</tbody>
</table>
</div>
<h3>Verzeichnisse</h3>
<p>Wenn die WordPress-Installation nicht im Stammverzeichnis des FTP-Servers liegt, lässt sich der Ort wie folgt definieren:
<div class="pms">
<table class="none">
<tbody>
<tr class="li1">
<td class="ln">
<pre class="de1">1
</pre>
</td>
<td class="de1">
<pre class="de1">define('FTP_BASE', '...');</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>Habt ihr das Plugin-Verzeichnis oder den gesamten Content-Ordner verschoben, könnt ihr die kompletten Pfade mit diesen beiden Konstanten angeben:
<div class="pms">
<table class="none">
<tbody>
<tr class="li1">
<td class="ln">
<pre class="de1">1
2
</pre>
</td>
<td class="de1">
<pre class="de1">define('FTP_CONTENT_DIR', '...');
define('FTP_PLUGIN_DIR', '...');</pre>
</td>
</tr>
</tbody>
</table>
</div>
<h3>Methode</h3>
<p>Zu guter Letzt lässt sich noch die Methode einstellen, die von WordPress für das Dateisystem verwenden soll. Hier steckt auch häufig der Fehler, falls etwas nicht mit den Dateirechten klappt. Bei Fehlern sollte man also erst einmal hier die Methode ändern.
<div class="pms">
<table class="none">
<tbody>
<tr class="li1">
<td class="ln">
<pre class="de1">1
</pre>
</td>
<td class="de1">
<pre class="de1">define('FS_METHOD', 'direct');</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>Folgende Methoden sind möglich:</p>
<ul>
<li><strong>direct</strong> <em>(default)</em> &#8211; <a href="http://www.php.net/manual/de/intro.dio.php"><a href="http://de2.php.net/manual/de/book.filesystem.php">PHP Dateisystem Funktionen</a></a></li>
<li><strong>ssh</strong> &#8211; <a href="http://de2.php.net/manual/de/book.ssh2.php">SSH PHP Erweiterung</a></li>
<li><strong>ftpext</strong> &#8211; <a href="http://de2.php.net/manual/de/book.ftp.php">FTP PHP Erweiterung</a></li>
<li><strong>ftpsockets</strong> &#8211; <a href="http://de2.php.net/manual/de/book.sockets.php">PHP Socket Erweiterung</a></li>
</ul>
<p>Über die Konstanten <code>FTP_PUBKEY</code>, <code>FTP_PRIKEY</code> lassen sich die Pfade zum <em>SSH public key</em> und <em>SSH private key</em> angeben.</p>
<h2>Vorhandene Daten löschen</h2>
<p>Wenn ihr euch nicht sicher seid, ob bereits Zugangsdaten von WordPress gespeichert wurden, könnt ihr im Admin-Bereich folgende Adresse eingeben: </p>
<blockquote><p><code>http://example.org/<strong>wp-admin/options.php</strong></code></p></blockquote>
<p>Dort sucht ihr dann nach dem Eintrag: <code>ftp_credentials</code></p>
<p>Wenn dieser vorhanden ist, sind bereits Daten gespeichert worden.</p>
<p>Falls ihr also FTP-Daten in der Datenbank gespeichert habt, könnt ihr diese wieder löschen, in dem ihr über phpMyAdmin eure Datenbank aufruft und in der Tabelle <code>*_options</code> das Feld <code>ftp_credentials</code> löscht.</p>
<h4>Weitere Informationen</h4>
<p>Weitere Informationen findet ihr im WordPress Codex: </p>
<blockquote><p><a href="http://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants">Editing wp-config.php (WordPress Upgrade Constants)</a></p></blockquote>
<hr />
<p>
    <strong>Kategorie:</strong> <a href="http://pehbehbeh.de/wordpress/" title="Alle Artikel in WordPress ansehen">WordPress</a> &raquo; <a href="http://pehbehbeh.de/wordpress/tipps/" title="Alle Artikel in Tipps ansehen">Tipps</a> |
    <strong>Tags:</strong> <a href="http://pehbehbeh.de/tag/alternative/" rel="tag">Alternative</a>, <a href="http://pehbehbeh.de/tag/backend/" rel="tag">Backend</a>, <a href="http://pehbehbeh.de/tag/content/" rel="tag">Content</a>, <a href="http://pehbehbeh.de/tag/dateirechte/" rel="tag">Dateirechte</a>, <a href="http://pehbehbeh.de/tag/dateisystem/" rel="tag">Dateisystem</a>, <a href="http://pehbehbeh.de/tag/datenbank/" rel="tag">Datenbank</a>, <a href="http://pehbehbeh.de/tag/definition/" rel="tag">Definition</a>, <a href="http://pehbehbeh.de/tag/direct/" rel="tag">direct</a>, <a href="http://pehbehbeh.de/tag/erweiterung/" rel="tag">Erweiterung</a>, <a href="http://pehbehbeh.de/tag/fehler/" rel="tag">Fehler</a>, <a href="http://pehbehbeh.de/tag/ftp/" rel="tag">FTP</a>, <a href="http://pehbehbeh.de/tag/ftp_credentials/" rel="tag">ftp_credentials</a>, <a href="http://pehbehbeh.de/tag/key/" rel="tag">Key</a>, <a href="http://pehbehbeh.de/tag/konstante/" rel="tag">Konstante</a>, <a href="http://pehbehbeh.de/tag/methode/" rel="tag">Methode</a>, <a href="http://pehbehbeh.de/tag/options/" rel="tag">options</a>, <a href="http://pehbehbeh.de/tag/ordner/" rel="tag">Ordner</a>, <a href="http://pehbehbeh.de/tag/plugins/" rel="tag">Plugins</a>, <a href="http://pehbehbeh.de/tag/risiko/" rel="tag">Risiko</a>, <a href="http://pehbehbeh.de/tag/server/" rel="tag">Server</a>, <a href="http://pehbehbeh.de/tag/sicherheit/" rel="tag">Sicherheit</a>, <a href="http://pehbehbeh.de/tag/socket/" rel="tag">Socket</a>, <a href="http://pehbehbeh.de/tag/ssl/" rel="tag">SSL</a>, <a href="http://pehbehbeh.de/tag/update/" rel="tag">Update</a>, <a href="http://pehbehbeh.de/tag/verzeichnis/" rel="tag">Verzeichnis</a>, <a href="http://pehbehbeh.de/tag/wordpress-core/" rel="tag">WordPress Core</a>, <a href="http://pehbehbeh.de/tag/wordpress-codex/" rel="tag">WordPress-Codex</a>, <a href="http://pehbehbeh.de/tag/wp-config-php/" rel="tag">wp-config.php</a>, <a href="http://pehbehbeh.de/tag/zugangsdaten/" rel="tag">Zugangsdaten</a>
</p>
<p>
    <a href="http://pehbehbeh.de/wordpress/tipps/ftp-daten-wp-config-php-speichern/">zum Artikel</a> |
    <a href="http://pehbehbeh.de/wordpress/tipps/ftp-daten-wp-config-php-speichern/#comments">20 Kommentare</a>
</p> <p><a href="http://pehbehbeh.de/?flattrss_redirect&amp;id=911&amp;md5=f652e9f31f1ecce8a4409320629b39fb" title="Flattr" target="_blank"><img src="http://pehbehbeh.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://pehbehbeh.de/wordpress/tipps/ftp-daten-wp-config-php-speichern/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		<atom:link rel="payment" href="http://pehbehbeh.de/?flattrss_redirect&amp;id=911&amp;md5=f652e9f31f1ecce8a4409320629b39fb" type="text/html" />
	</item>
		<item>
		<title>WordPress: Thumbnails im RSS-Feed anzeigen</title>
		<link>http://pehbehbeh.de/wordpress/tipps/thumbnails-im-rss-feed-anzeigen/</link>
		<comments>http://pehbehbeh.de/wordpress/tipps/thumbnails-im-rss-feed-anzeigen/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 09:49:30 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Tipps]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Filter]]></category>
		<category><![CDATA[Funktion]]></category>
		<category><![CDATA[RSS-Feed]]></category>
		<category><![CDATA[Thumbnails]]></category>

		<guid isPermaLink="false">http://pehbehbeh.de/?p=896</guid>
		<description><![CDATA[<img width="64" height="64" src="http://pehbehbeh.de/wp-content/uploads/2010/06/wordpress-logo-64x64.png" class="attachment-post-thumbnail wp-post-image" alt="WordPress Logo" title="WordPress Logo" style="float: left; padding: 6px; margin: 0 6px 6px 0; border: 6px solid #eee;" />Ich schrieb bereits einen ausführlichen Artikel über Thumbnails in WordPress 2.9. Seit ein paar Tagen benutze ich diese auch hier im Blog. Heute habe ich mir zur Aufgabe gemacht, dass die Thumbnails auch in meinem Feed angezeigt werden. Dazu ist &#8230; <a href="http://pehbehbeh.de/wordpress/tipps/thumbnails-im-rss-feed-anzeigen/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<img width="64" height="64" src="http://pehbehbeh.de/wp-content/uploads/2010/06/wordpress-logo-64x64.png" class="attachment-post-thumbnail wp-post-image" alt="WordPress Logo" title="WordPress Logo" style="float: left; padding: 6px; margin: 0 6px 6px 0; border: 6px solid #eee;" /><p>Ich schrieb bereits einen ausführlichen Artikel über <a href="http://pehbehbeh.de/wordpress/tipps/post-thumbnails-verwenden/">Thumbnails in WordPress 2.9</a>. Seit ein paar Tagen benutze ich diese auch hier im Blog. Heute habe ich mir zur Aufgabe gemacht, dass die Thumbnails auch in meinem Feed angezeigt werden. Dazu ist mal wieder ein simpler Content-Filter notwendig.</p>
<p><hr style="clear: both;" /></p>
<h2>Der Filter</h2>
<p>Zunächst der Filter:
<div class="pms">
<table class="none">
<tbody>
<tr class="li1">
<td class="ln">
<pre class="de1">1
2
3
4
5
6
7
</pre>
</td>
<td class="de1">
<pre class="de1">function my_feed_thumbnail($content) {
&nbsp; &nbsp; if (is_feed() &amp;&amp; has_post_thumbnail()) {
&nbsp; &nbsp; &nbsp; &nbsp; return the_post_thumbnail() . $content;
&nbsp; &nbsp; }
&nbsp; &nbsp; return $content;
}
add_filter('the_content', 'my_feed_thumbnail');</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>Hier wird überprüft, ob wir uns im RSS-Feed befinden. Falls dies der Fall ist und zusätzlich noch ein Thumbnail gesetzt wurde, wird der Thumbnail an den Anfang des Contents gehängt. Fertig.</p>
<h2>Design anpassen</h2>
<p>Letztens kam eine <a href="http://pehbehbeh.de/wordpress/tipps/post-thumbnails-verwenden/#comment-633">Frage in den Kommentaren</a> auf, wie man denn den Thumbnail links neben dem Text positionieren kann. Ganz einfach: mit CSS. Jeder Thumbnail hat die CSS-Klasse <code>attachment-post-thumbnail</code>. Im Blog lässt sich das also ganz einfach über die <code>style.css</code>-Datei eures Themes anpassen.</p>
<div class="notice"><strong>Der folgende Teil des Artikels ist veraltet.</strong><br />
Mittlerweile habe ich eine bessere Anleitung veröffentlicht, in der beschreiben wird, wie man den <a href="http://pehbehbeh.de/wordpress/tipps/rss-feed-css/"><strong>WordPress RSS-Feed mit CSS verschönern &raquo;</strong></a> kann.</div>
<p><del datetime="2010-09-15T20:46:30+00:00">Im Feed müssen CSS-Regeln jedoch in jeden Artikel eingepflegt werden. Man könnte diese jetzt noch zum letzten Filter hinzufügen. Ich habe mir jedoch einen eigenen Filter für CSS-Regeln im Feed erstellt. So habe ich die Möglichkeit, in Zukunft alles an einem Platz einzufügen, wenn ich noch weitere Dinge im Feed anpassen möchte.</p>
<p>Hier nochmal mein derzeitiger CSS-Filter für den Feed:</del>
<div class="pms">
<table class="none">
<tbody>
<tr class="li1">
<td class="ln">
<pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
</pre>
</td>
<td class="de1">
<pre class="de1">function my_feed_css($content) {
&nbsp; &nbsp; if (is_feed()) {
&nbsp; &nbsp; &nbsp; &nbsp; $css &nbsp;= '&lt;style&gt;';
&nbsp; &nbsp; &nbsp; &nbsp; $css .= '.attachment-post-thumbnail { float: left; padding: 6px; margin: 0 6px 6px 0; border: 6px solid #eee; }';
&nbsp; &nbsp; &nbsp; &nbsp; $css .= '.more { clear: both; }';
&nbsp; &nbsp; &nbsp; &nbsp; $css .= '&lt;/style&gt;';
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; return $css . $content;
&nbsp; &nbsp; }
&nbsp; &nbsp; return $content;
}
add_filter('the_content', 'my_feed_css');</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p><del datetime="2010-09-15T20:51:50+00:00">Wie man sieht, habe ich noch eine zweite Regel für meinen <a href="http://pehbehbeh.de/wordpress/tipps/more-tag-ersetzen/">ersetzten more-Tag</a> (horizontale Linie), den ich so anpassen musste, dass die Linie nicht neben meinem Thumbnail beginnt, sondern erst darunter.</del></p>
<p>Das Ergebnis könnt ihr euch anschauen, wenn ihr meinen Feed abonniert. <img src='http://pehbehbeh.de/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<hr />
<p>
    <strong>Kategorie:</strong> <a href="http://pehbehbeh.de/wordpress/" title="Alle Artikel in WordPress ansehen">WordPress</a> &raquo; <a href="http://pehbehbeh.de/wordpress/tipps/" title="Alle Artikel in Tipps ansehen">Tipps</a> |
    <strong>Tags:</strong> <a href="http://pehbehbeh.de/tag/css/" rel="tag">CSS</a>, <a href="http://pehbehbeh.de/tag/design/" rel="tag">Design</a>, <a href="http://pehbehbeh.de/tag/filter/" rel="tag">Filter</a>, <a href="http://pehbehbeh.de/tag/funktion/" rel="tag">Funktion</a>, <a href="http://pehbehbeh.de/tag/rss-feed/" rel="tag">RSS-Feed</a>, <a href="http://pehbehbeh.de/tag/thumbnails/" rel="tag">Thumbnails</a>
</p>
<p>
    <a href="http://pehbehbeh.de/wordpress/tipps/thumbnails-im-rss-feed-anzeigen/">zum Artikel</a> |
    <a href="http://pehbehbeh.de/wordpress/tipps/thumbnails-im-rss-feed-anzeigen/#comments">6 Kommentare</a>
</p> <p><a href="http://pehbehbeh.de/?flattrss_redirect&amp;id=896&amp;md5=ba2ced1d86123409907d749a91325d6c" title="Flattr" target="_blank"><img src="http://pehbehbeh.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://pehbehbeh.de/wordpress/tipps/thumbnails-im-rss-feed-anzeigen/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<atom:link rel="payment" href="http://pehbehbeh.de/?flattrss_redirect&amp;id=896&amp;md5=ba2ced1d86123409907d749a91325d6c" type="text/html" />
	</item>
		<item>
		<title>WordPress More-Tag sinnvoll ersetzen &amp; Funktionalität beibehalten</title>
		<link>http://pehbehbeh.de/wordpress/tipps/more-tag-ersetzen/</link>
		<comments>http://pehbehbeh.de/wordpress/tipps/more-tag-ersetzen/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 10:28:47 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Tipps]]></category>
		<category><![CDATA[Anker]]></category>
		<category><![CDATA[Artikel]]></category>
		<category><![CDATA[CSS-Klasse]]></category>
		<category><![CDATA[Element]]></category>
		<category><![CDATA[ersetzen]]></category>
		<category><![CDATA[Filter]]></category>
		<category><![CDATA[Funktion]]></category>
		<category><![CDATA[hr]]></category>
		<category><![CDATA[ID]]></category>
		<category><![CDATA[more-Tag]]></category>
		<category><![CDATA[span]]></category>
		<category><![CDATA[Trennlinie]]></category>
		<category><![CDATA[Werbung]]></category>

		<guid isPermaLink="false">http://pehbehbeh.de/?p=892</guid>
		<description><![CDATA[<img width="64" height="64" src="http://pehbehbeh.de/wp-content/uploads/2010/06/wordpress-logo-64x64.png" class="attachment-post-thumbnail wp-post-image" alt="WordPress Logo" title="WordPress Logo" style="float: left; padding: 6px; margin: 0 6px 6px 0; border: 6px solid #eee;" />Wenn man den sogenannten More-Tag verwendet um Blog-Artikel zu kürzen, fügt WordPress auf der eigentlichen Artikel-Seite einen HTML-Anker ein, auf den &#8220;beim weiterlesen&#8221; verlinkt wird. Oft besteht das Bedürfnis genau an dieser Stelle etwas einzufügen &#8211; sei es Werbung oder &#8230; <a href="http://pehbehbeh.de/wordpress/tipps/more-tag-ersetzen/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<img width="64" height="64" src="http://pehbehbeh.de/wp-content/uploads/2010/06/wordpress-logo-64x64.png" class="attachment-post-thumbnail wp-post-image" alt="WordPress Logo" title="WordPress Logo" style="float: left; padding: 6px; margin: 0 6px 6px 0; border: 6px solid #eee;" /><p>Wenn man den sogenannten More-Tag verwendet um Blog-Artikel zu kürzen, fügt WordPress auf der eigentlichen Artikel-Seite einen <a href="http://de.wikipedia.org/wiki/Anker_%28HTML%29">HTML-Anker</a> ein, auf den &#8220;beim weiterlesen&#8221; verlinkt wird. Oft besteht das Bedürfnis genau an dieser Stelle etwas einzufügen &#8211; sei es Werbung oder einfach nur eine dezente Trennlinie.</p>
<p><hr style="clear: both;" /></p>
<h2>Status Quo</h2>
<p>Von Haus aus fügt WordPress ein span-Element mit dem schon erwähnten Anker ein. Dieses lässt sich jedoch kaum an die eigenen Bedürfnisse anpassen, da es nur eine eindeutige ID besitzt und nicht etwa eine CSS-Klasse, die für alle &#8220;more-spans&#8221; gilt.
<div class="pms">
<table class="html4strict">
<tbody>
<tr class="li1">
<td class="ln">
<pre class="de1">1
</pre>
</td>
<td class="de1">
<pre class="de1"><span class="sc2">&lt;<span class="kw2">span</span> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;more-1234&quot;</span>&gt;&lt;<span class="sy0">/</span><span class="kw2">span</span>&gt;</span></pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>Beim ersetzen des More-Tags wird oft ein häufiger Fehler gemacht: Er wird so ersetzt, das die Anker-Funktionalität verloren geht, indem man ihn einfach mit Werbung oder was auch immer ersetzt.</p>
<p>Dabei müsste man an der Stelle des span-Elements ein anderes Element beibehalten, dass die Anker-Funktion erfüllt, indem es die more-ID übernimmt.</p>
<p>Natürlich könnte man auch einfach den gewünschten Inhalt hinter das span-Element einfügen Dann hat man jedoch immer noch ein überflüssiges Element, dass man sich genauso gut sparen könnte.</p>
<h2>Die Lösung</h2>
<p>Meine Lösung sieht daher so aus, dass ich das span-Element entferne und danach eine horizontale Linie, also ein hr-Element, einfüge. Diese Linie übernimmt die Anker-Funktion. Dazu ist folgender Filter nötig, der in die <code>functions.php</code> eures Themes übernommen werden kann:
<div class="pms">
<table class="php">
<tbody>
<tr class="li1">
<td class="ln">
<pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre>
</td>
<td class="de1">
<pre class="de1"><span class="kw2">function</span> my_more_tag<span class="br0">&#40;</span><span class="re0">$content</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
&nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="sy0">!</span>is_single<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="re0">$content</span><span class="sy0">;</span>
&nbsp; &nbsp;
&nbsp; &nbsp; <span class="re0">$replacement</span> <span class="sy0">=</span> <span class="st_h">'&lt;hr id=&quot;$1&quot; class=&quot;more&quot; /&gt;'</span><span class="sy0">;</span>
&nbsp; &nbsp;
&nbsp; &nbsp; <span class="kw1">return</span> <span class="kw3">preg_replace</span><span class="br0">&#40;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="st_h">'/&lt;span id\=\&quot;(more\-\d+)&quot;&gt;&lt;\/span&gt;/'</span><span class="sy0">,</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$replacement</span><span class="sy0">,</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$content</span>
&nbsp; &nbsp; <span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span>
&nbsp;
add_filter<span class="br0">&#40;</span><span class="st_h">'the_content'</span><span class="sy0">,</span> <span class="st_h">'my_more_tag'</span><span class="br0">&#41;</span><span class="sy0">;</span></pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>Natürlich könnt ihr die fünfte Zeile auf eure Bedürfnisse anpassen und beispielweise noch einen Werbebanner einfügen. Durch das hinzufügen der Klasse &#8220;more&#8221; lässt sich das hr-Element mit CSS anpassen.</p>
<hr />
<p>
    <strong>Kategorie:</strong> <a href="http://pehbehbeh.de/wordpress/" title="Alle Artikel in WordPress ansehen">WordPress</a> &raquo; <a href="http://pehbehbeh.de/wordpress/tipps/" title="Alle Artikel in Tipps ansehen">Tipps</a> |
    <strong>Tags:</strong> <a href="http://pehbehbeh.de/tag/anker/" rel="tag">Anker</a>, <a href="http://pehbehbeh.de/tag/artikel/" rel="tag">Artikel</a>, <a href="http://pehbehbeh.de/tag/css-klasse/" rel="tag">CSS-Klasse</a>, <a href="http://pehbehbeh.de/tag/element/" rel="tag">Element</a>, <a href="http://pehbehbeh.de/tag/ersetzen/" rel="tag">ersetzen</a>, <a href="http://pehbehbeh.de/tag/filter/" rel="tag">Filter</a>, <a href="http://pehbehbeh.de/tag/funktion/" rel="tag">Funktion</a>, <a href="http://pehbehbeh.de/tag/hr/" rel="tag">hr</a>, <a href="http://pehbehbeh.de/tag/id/" rel="tag">ID</a>, <a href="http://pehbehbeh.de/tag/more-tag/" rel="tag">more-Tag</a>, <a href="http://pehbehbeh.de/tag/span/" rel="tag">span</a>, <a href="http://pehbehbeh.de/tag/trennlinie/" rel="tag">Trennlinie</a>, <a href="http://pehbehbeh.de/tag/werbung/" rel="tag">Werbung</a>
</p>
<p>
    <a href="http://pehbehbeh.de/wordpress/tipps/more-tag-ersetzen/">zum Artikel</a> |
    <a href="http://pehbehbeh.de/wordpress/tipps/more-tag-ersetzen/#comments">4 Kommentare</a>
</p> <p><a href="http://pehbehbeh.de/?flattrss_redirect&amp;id=892&amp;md5=44eba1d8fad467bfae2c75287088ac7e" title="Flattr" target="_blank"><img src="http://pehbehbeh.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://pehbehbeh.de/wordpress/tipps/more-tag-ersetzen/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<atom:link rel="payment" href="http://pehbehbeh.de/?flattrss_redirect&amp;id=892&amp;md5=44eba1d8fad467bfae2c75287088ac7e" type="text/html" />
	</item>
	</channel>
</rss>

