<?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>im-Tal.net &#187; Wordpress</title>
	<atom:link href="http://www.im-tal.net/cat/tipps/wordpress-tipps/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.im-tal.net</link>
	<description>im-Tal.net mit Tipps zu Windows XP, Windows Vista, Windows7, Wordpress, Office, Firefox, Thunderbird etc.</description>
	<lastBuildDate>Mon, 23 Aug 2010 07:57:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Etwas Sicherheit durch die .htaccess</title>
		<link>http://www.im-tal.net/820/etwas-sicherheit-durch-die-htaccess/</link>
		<comments>http://www.im-tal.net/820/etwas-sicherheit-durch-die-htaccess/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 20:08:45 +0000</pubDate>
		<dc:creator>maxe</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Filezilla]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://www.im-tal.net/?p=820</guid>
		<description><![CDATA[Und weiter geht es in unserer Reihe &#8220;was kann alles in die .htaccess und was bewirkt es&#8221; 
Mit der , dem  und dem  sind wir durch, jetzt folgt etwas Sicherheit. Als erstes müssen wir ganz oben in die .htaccess die RewriteEngine einschalten, falls dies nicht schon geschehen ist:

<pre &#160;...&#160;<a class="readmore" href="http://www.im-tal.net/820/etwas-sicherheit-durch-die-htaccess/"><img src="http://static.im-tal.net/images/weiterlesen.gif" width="100" height="21" alt="Weiterlesen &#187;" title="Weiterlesen &#187;" /></a>]]></description>
			<content:encoded><![CDATA[<p>Und weiter geht es in unserer Reihe &#8220;was kann alles in die .<a href="http://www.im-tal.net/tag/htaccess/" class="st_tag internal_tag" rel="tag" title="Posts tagged with htaccess">htaccess</a> und was bewirkt es&#8221; <img src='http://www.im-tal.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
Mit der <a href="http://www.im-tal.net/723/gzip-komprimierung-aktivieren/" title="gzip-Komprimierung aktivieren">Komprimierung</a>, dem <a href="http://www.im-tal.net/745/caching-mit-expires/" title="Caching mit Expires">Caching</a> und dem <a href="http://www.im-tal.net/810/wordpress-cdn-cookieless-domain/" title="WordPress: CDN &#038; cookieless domain">CDN &#038; cookieless domain</a> sind wir durch, jetzt folgt etwas Sicherheit. Als erstes müssen wir ganz oben in die .<a href="http://www.im-tal.net/tag/htaccess/" class="st_tag internal_tag" rel="tag" title="Posts tagged with htaccess">htaccess</a> die RewriteEngine einschalten, falls dies nicht schon geschehen ist:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">RewriteEngine</span> <span style="color: #0000ff;">on</span></pre></div></div>

<p>Jetzt kann die Datei vor externen Zugriffen geschützt werden, um die es sich die ganze Zeit dreht &#8230; die .<a href="http://www.im-tal.net/tag/htaccess/" class="st_tag internal_tag" rel="tag" title="Posts tagged with htaccess">htaccess</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;"># htaccess Schutz</span>
&lt;<span style="color: #000000; font-weight:bold;">Files</span> ~ <span style="color: #7f007f;">&quot;^.*<span style="color: #000099; font-weight: bold;">\.</span>([Hh][Tt][Aa])&quot;</span>&gt;
<span style="color: #00007f;">Order</span> <span style="color: #00007f;">deny</span>,<span style="color: #00007f;">allow</span>
<span style="color: #00007f;">Deny</span> <span style="color: #00007f;">from</span> <span style="color: #00007f;">all</span>
&lt;/<span style="color: #000000; font-weight:bold;">Files</span>&gt;</pre></div></div>

<p>ORDER bestimmt in welcher Reihenfolge Allow und Deny ausgewertet werden.<br />
Die Direktive DENY (=verweigern) bestimmt, wer vom Zugriff auf eine Ressource ausgeschlossen wird<br />
Die gegensätzliche Direktive ALLOW (=erlauben) würde es ermöglichen, bestimmten Hosts den Zugriff ausdrücklich zu gestatten.</p>
<p>Das ganze ließe sich so erweitern, dass alle Dateien die mit einem Punkt anfangen, wie z.B. auch eine .htusers oder .htpasswd, gesperrt werden:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;"># Dateien mit . am Anfang sperren</span>
&lt;<span style="color: #000000; font-weight:bold;">FilesMatch</span> <span style="color: #7f007f;">&quot;^<span style="color: #000099; font-weight: bold;">\.</span>&quot;</span> &gt;
<span style="color: #00007f;">Order</span> <span style="color: #00007f;">deny</span>,<span style="color: #00007f;">allow</span>
<span style="color: #00007f;">Deny</span> <span style="color: #00007f;">from</span> <span style="color: #00007f;">all</span>
&lt;/<span style="color: #000000; font-weight:bold;">FilesMatch</span>&gt;</pre></div></div>

<p>So, die Dateien sind schon mal vor einem Fremdzugriff gesperrt. Jetzt kommt es ja immer mal wieder vor, dass man die eigenen Bilder auf anderen Seiten verlinkt sieht. Das ist doppelt ärgerlich:</p>
<ol>
<li>wird der eigene Inhalt wo anders abgebildet </li>
<li>wird der eigene Traffic geklaut, denn die Bilder werden ja nur verlinkt &#8230; also vom eigenen Server auf fremder Seite ausgeliefert.</li>
</ol>
<p>Auch dafür gibt es einen Trick:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;"># Bilder-Klau</span>
&lt;<span style="color: #000000; font-weight:bold;">ifmodule</span> mod_rewrite.c&gt;
<span style="color: #00007f;">RewriteCond</span> %{HTTP_REFERER} !^$
<span style="color: #00007f;">RewriteCond</span> %{HTTP_REFERER} !^http://(www\.)?im-tal\.net(/.*)?$ [NC]
<span style="color: #00007f;">RewriteCond</span> %{HTTP_REFERER} !^http://(www\.)?images\.google\.de(/.*)?$ [NC]
<span style="color: #00007f;">RewriteRule</span> \.(gif|jpg|png|pdf|zip|GIF|JPG|PNG|PDF|ZIP)$ - [F]
&lt;/<span style="color: #000000; font-weight:bold;">ifmodule</span>&gt;</pre></div></div>

<p>In Zeile 2 wurde die eigene Domain eingetagen.<br />
In Zeile 3 wurde eine weitere &#8220;erlaubte&#8221; Domain eingetragen.<br />
Diese Zeile kann kopiert werden und für jede weitere erlaubte Domain verwendet werden, Prinzip sollte hier klar sein.<br />
Als letzte Zeile wird bestimmt, dass alle nicht aufgeführten und somit auch nicht erlaubten Domains eine Error 403 (Forbidden) Fehlermeldung bekommen, sobald sie eine Bild der genannten Dateitypen verlinken wollen.<br />
Falls die o.g. Variante nicht funktioniert kann folgender Code probiert werden:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">&lt;<span style="color: #000000; font-weight:bold;">Files</span> ~ <span style="color: #7f007f;">&quot;<span style="color: #000099; font-weight: bold;">\.</span>(gif|jpe?g|png)$&quot;</span>&gt;
<span style="color: #00007f;">SetEnvIfNoCase</span> Referer ^http\:\/\/.* Verboten
<span style="color: #00007f;">SetEnvIfNoCase</span> Referer ^http\:\/\/(www\.){<span style="color: #ff0000;">0</span>,<span style="color: #ff0000;">1</span>}im-tal\.net.* !Verboten
<span style="color: #00007f;">SetEnvIfNoCase</span> Referer ^http\:\/\/(images\.){<span style="color: #ff0000;">0</span>,<span style="color: #ff0000;">1</span>}google\.de.* !Verboten
<span style="color: #00007f;">Order</span> <span style="color: #00007f;">Allow</span>,<span style="color: #00007f;">Deny</span>
<span style="color: #00007f;">Deny</span> <span style="color: #00007f;">from</span> env=Verboten
<span style="color: #00007f;">Allow</span> <span style="color: #00007f;">from</span> <span style="color: #00007f;">all</span>
&lt;/<span style="color: #000000; font-weight:bold;">Files</span>&gt;</pre></div></div>

<p>In Zeile 2 werden erst mal alle Zugriffe verboten und durch die Zeile mit <strong>!Verboten</strong> werden dann die Ausnahmen definiert.</p>
<p>Ist die IP oder der USER_AGENT eines Angreifers bekannt oder ein Query_String der öfter von Angreifern an die URL gehangen wird, so kann auch dieser direkt ausgesperrt werden. Außerdem können auch Referer ausgesperrt werden:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">&lt;<span style="color: #000000; font-weight:bold;">ifmodule</span> mod_rewrite.c&gt;
<span style="color: #adadad; font-style: italic;"># alle Einträge mit [OR] abschließen außer der letzte</span>
<span style="color: #00007f;">RewriteCond</span> %{REMOTE_ADDR} ^<span style="color: #ff0000;">123</span>\.234\.3\.4 [OR]
<span style="color: #00007f;">RewriteCond</span> %{HTTP_USER_AGENT} <span style="color: #00007f;">example</span>.* [NC,OR]
<span style="color: #00007f;">RewriteCond</span> %{QUERY_STRING} http\: [NC,OR]
<span style="color: #00007f;">RewriteCond</span> %{HTTP_REFERER} spamwort [NC]
<span style="color: #00007f;">RewriteRule</span> .* - [F,L]
&lt;/<span style="color: #000000; font-weight:bold;">ifmodule</span>&gt;</pre></div></div>

<p>NC gibt an, dass kein Unterschied zwischen Gross- und Kleinschreibung gemacht werden soll<br />
OR gibt an, dass ODER statt UND verwendet werden soll</p>
<p>So, zum Schluss noch 2 weitere Tipps, besonders für <a href="http://www.im-tal.net/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Wordpress">WordPress</a> Benutzer. Bei <a href="http://www.im-tal.net/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Wordpress">WordPress</a> ist es wichtig die Settings-Datei &#8220;wp-config.php&#8221; zu schützen. In anderen Systemen sind es vielleicht andere Dateien. Jedenfalls funktioniert dies genau so wie oben beim .<a href="http://www.im-tal.net/tag/htaccess/" class="st_tag internal_tag" rel="tag" title="Posts tagged with htaccess">htaccess</a> Schutz:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;"># protect wp-config.php</span>
&lt;<span style="color: #000000; font-weight:bold;">files</span> wp-config.php&gt;
<span style="color: #00007f;">Order</span> <span style="color: #00007f;">deny</span>,<span style="color: #00007f;">allow</span>
<span style="color: #00007f;">Deny</span> <span style="color: #00007f;">from</span> <span style="color: #00007f;">all</span>
&lt;/<span style="color: #000000; font-weight:bold;">files</span>&gt;</pre></div></div>

<p>Um jetzt noch externe Zugriffe auf <a href="http://www.im-tal.net/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Wordpress">WordPress</a> PHP-Dateien zu blockieren, kann folgendes in die .<a href="http://www.im-tal.net/tag/htaccess/" class="st_tag internal_tag" rel="tag" title="Posts tagged with htaccess">htaccess</a> geschrieben werden:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;"># Externer Zugriffe auf PHP-Dateien blockieren</span>
<span style="color: #00007f;">RewriteCond</span> %{QUERY_STRING} !error
<span style="color: #00007f;">RewriteCond</span> %{THE_REQUEST} ^[A-Z]{<span style="color: #ff0000;">3</span>,<span style="color: #ff0000;">9</span>}\ /(wp-<span style="color: #0000ff;">includes</span>|wp-content)/(.+)\.php\ HTTP/
<span style="color: #00007f;">RewriteRule</span> .* - [F]</pre></div></div>

<br /><br /><small><h2>Verwandte Artikel:</h2><ul><li><a href="http://www.im-tal.net/745/caching-mit-expires/" rel="bookmark" title="Permanent Link: Caching mit Expires">Caching mit Expires</a></li><li><a href="http://www.im-tal.net/723/gzip-komprimierung-aktivieren/" rel="bookmark" title="Permanent Link: gzip-Komprimierung aktivieren">gzip-Komprimierung aktivieren</a></li><li><a href="http://www.im-tal.net/199/defragmentierung-einzelner-laufwerke/" rel="bookmark" title="Permanent Link: Defragmentierung einzelner Laufwerke">Defragmentierung einzelner Laufwerke</a></li><li><a href="http://www.im-tal.net/227/globale-einstellungen-in-joomla-15-aendern/" rel="bookmark" title="Permanent Link: Globale Einstellungen in Joomla 1.5 ändern">Globale Einstellungen in Joomla 1.5 ändern</a></li><li><a href="http://www.im-tal.net/618/arbeitsspeicher-auf-fehler-testen/" rel="bookmark" title="Permanent Link: Arbeitsspeicher auf Fehler testen">Arbeitsspeicher auf Fehler testen</a></li></ul></small><br /><small>Copyright &copy; 2008-2010 <a href="http://www.im-tal.net">im-Tal.net</a> ( imtalnet (38.107.191.118) )</small><hr />]]></content:encoded>
			<wfw:commentRss>http://www.im-tal.net/820/etwas-sicherheit-durch-die-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: CDN &amp; cookieless domain</title>
		<link>http://www.im-tal.net/810/wordpress-cdn-cookieless-domain/</link>
		<comments>http://www.im-tal.net/810/wordpress-cdn-cookieless-domain/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 10:28:33 +0000</pubDate>
		<dc:creator>maxe</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Filezilla]]></category>
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://www.im-tal.net/?p=810</guid>
		<description><![CDATA[Nachdem wir uns mit der  und dem  befasst haben, wollen wir ein weiteres Peformance-Thema ansprechen. In den bekannten Performance-Analyse-Werkzeugen heißt es:
Googles PageSpeed: Serve static content from a cookieless domain
Yahoos YSlow: Use a Content Delivery Network (CDN)
Hintergrund ist: liegen dynamische Daten und statische Daten (z. B. Bilder) auf der &#160;...&#160;<a class="readmore" href="http://www.im-tal.net/810/wordpress-cdn-cookieless-domain/"><img src="http://static.im-tal.net/images/weiterlesen.gif" width="100" height="21" alt="Weiterlesen &#187;" title="Weiterlesen &#187;" /></a>]]></description>
			<content:encoded><![CDATA[<p>Nachdem wir uns mit der <a href="http://www.im-tal.net/723/gzip-komprimierung-aktivieren/" title="gzip-Komprimierung aktivieren">Komprimierung</a> und dem <a href="http://www.im-tal.net/745/caching-mit-expires/" title="Caching mit Expires">Cachen von Webseiten</a> befasst haben, wollen wir ein weiteres Peformance-Thema ansprechen. In den bekannten Performance-Analyse-Werkzeugen heißt es:<br />
Googles PageSpeed: Serve static content from a cookieless domain<br />
Yahoos YSlow: Use a Content Delivery Network (CDN)<br />
Hintergrund ist: liegen dynamische Daten und statische Daten (z. B. Bilder) auf der gleichen Domain sendet der Browser bei jeder Anfrage die Cookies der Domain mit. Statischer Content braucht aber keine Cookies, also heißt es auslagern auf eine cookieless domain.</p>
<p>Wir haben den Artikel von Frank Bültge über <a href="http://bueltge.de/eigenes-cdn-in-wordpress-nutzen/1205/">Eigenes CDN in WordPress nutzen</a> gelesen. Sehr schöner Artikel Frank. Bisher haben wir es mit dem selben Gedanken über Subdomains aber etwas undynamischer gelöst. Mal schauen wie wir es die nächsten Wochen weiter optimieren können. Aber erstmal stellen wir jetzt unsere bisherige Lösung vor:<br />
Wie erwähnt haben wir auch den Uploads Ordner, der zur Mediathek von <a href="http://www.im-tal.net/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Wordpress">WordPress</a> gehört, auf einer Subdomain ausgelagern. Dafür haben wir eine Subdomain angelegt (subdomain.example.org) und dort einen Ordner &#8220;uploads&#8221; mit den üblichen CHMOD-Rechten 777 anlegen. Dorthin wurde dann der ganze Inhalt des urspünglichen Upload Ordner verschoben.<br />
In den Mediathek-Einstellungen haben wir dann den &#8220;Ordner-Pfad&#8221; auf den statischen Serverpfad geändert und den &#8220;Kompletter Pfad zu den Dateien&#8221; auf die URL geändert, z.B.<br />
Uploads in folgendem Ordner speichern: /srv/www/htdocs/html/uploads<br />
Kompletter Pfad zu den Dateien: http://subdomain.example.org/uploads</p>
<p>Dann müssen wir allerdings in der Datenbank die Einträge in der Tabelle &#8220;wp_posts&#8221; ändern, genauer dort die Felder &#8220;post_content&#8221; und &#8220;guid&#8221;. Das kann mit folgenden zwei &#8220;Replace&#8221; (ersetzen) SQL-Befehlen erledigt werden:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">UPDATE</span> wp_posts <span style="color: #993333; font-weight: bold;">SET</span> post_content <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>post_content<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://www.example.org/wp-content/uploads/'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://subdomain.example.org/uploads/'</span><span style="color: #66cc66;">&#41;</span>; 
<span style="color: #993333; font-weight: bold;">UPDATE</span> wp_posts <span style="color: #993333; font-weight: bold;">SET</span> guid <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>guid<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://www.example.org/wp-content/uploads/'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'http://subdomain.example.org/uploads/'</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>Somit hätten wir dann alle Mediatheken Bilder auf der Subdomain liegen und sie werden von dort abgerufen.</p>
<p>Als zweiten Schritt sind wir her gegangen und haben alle Bilder aus dem Theme (Images Ordner im Theme Ordner) auch auf die Subdomain in einen Images Ordner verschoben. Danach nur noch alle Templates des verwendeten Themes (style.css, header.php, footer.php, functions.php etc.) auf den korrekten Pfad ändern. Statt bloginfo() müssen dann die statischen Pfade angegeben werden.<br />
Aus z. B.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/images/</pre></div></div>

<p>wird dann</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">src=&quot;http://subdomain.example.org/images/</pre></div></div>

<p>Wie Frank auch in seinem Artikel schreibt, hat Google (PageSpeed) damit keine Probleme und hakt es im besten Fall mit der Note &#8220;A&#8221; ab. Leider verlangt Yahoo (YSlow) wohl nach einem &#8220;echten&#8221; CDN.</p>
<br /><br /><small><h2>Verwandte Artikel:</h2><ul><li><a href="http://www.im-tal.net/820/etwas-sicherheit-durch-die-htaccess/" rel="bookmark" title="Permanent Link: Etwas Sicherheit durch die .htaccess">Etwas Sicherheit durch die .htaccess</a></li><li><a href="http://www.im-tal.net/247/wordpress-das-praxisbuch/" rel="bookmark" title="Permanent Link: WordPress-Das Praxisbuch">WordPress-Das Praxisbuch</a></li><li><a href="http://www.im-tal.net/455/wer-darf-was-in-wordpress/" rel="bookmark" title="Permanent Link: Wer darf was in WordPress?">Wer darf was in WordPress?</a></li><li><a href="http://www.im-tal.net/597/wordpress-permalinks/" rel="bookmark" title="Permanent Link: WordPress Permalinks">WordPress Permalinks</a></li><li><a href="http://www.im-tal.net/266/wordpress-27-ist-verfuegbar-trotz-upgrade/" rel="bookmark" title="Permanent Link: &#8220;WordPress 2.7 ist verfügbar&#8221; trotz Upgrade">&#8220;WordPress 2.7 ist verfügbar&#8221; trotz Upgrade</a></li></ul></small><br /><small>Copyright &copy; 2008-2010 <a href="http://www.im-tal.net">im-Tal.net</a> ( imtalnet (38.107.191.118) )</small><hr />]]></content:encoded>
			<wfw:commentRss>http://www.im-tal.net/810/wordpress-cdn-cookieless-domain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Caching mit Expires</title>
		<link>http://www.im-tal.net/745/caching-mit-expires/</link>
		<comments>http://www.im-tal.net/745/caching-mit-expires/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 16:32:01 +0000</pubDate>
		<dc:creator>maxe</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Filezilla]]></category>
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://www.im-tal.net/?p=745</guid>
		<description><![CDATA[Nachdem wir uns mit &#8220;&#8221; beschäftigt haben, folgt nun das Caching (Gültigkeit).
Mit dem Apache Modul Expires ist es möglich gewissen Ressourcen einen Cache-HTTP-Header, sozusagen ein &#8220;Verfallsdatum&#8221; (gültig bis) zu geben. Somit weist das Modul den Browser an die zuvor heruntergeladenen Ressourcen von der lokalen Festplatte zu laden, anstatt erneut über &#160;...&#160;<a class="readmore" href="http://www.im-tal.net/745/caching-mit-expires/"><img src="http://static.im-tal.net/images/weiterlesen.gif" width="100" height="21" alt="Weiterlesen &#187;" title="Weiterlesen &#187;" /></a>]]></description>
			<content:encoded><![CDATA[<p>Nachdem wir uns mit &#8220;<a href="http://www.im-tal.net/723/gzip-komprimierung-aktivieren/" title="gzip-Komprimierung aktivieren">Webseiten-Komprimierung</a>&#8221; beschäftigt haben, folgt nun das Caching (Gültigkeit).<br />
Mit dem Apache Modul Expires ist es möglich gewissen Ressourcen einen Cache-HTTP-Header, sozusagen ein &#8220;Verfallsdatum&#8221; (gültig bis) zu geben. Somit weist das Modul den Browser an die zuvor heruntergeladenen Ressourcen von der lokalen Festplatte zu laden, anstatt erneut über das <a href="http://www.im-tal.net/tag/internet/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Internet">Internet</a>.</p>
<p>Expires geben also die &#8220;Lebensdauer&#8221; einer Ressource (i.d.R. Datei) über den Cache-HTTP-Header an. Lebensdauer bedeutet, ein Zeitraum, in dem der Browser die gecachte Ressource ohne zu überprüfen, ob eine neue Version auf dem Web-Server verfügbar ist, anzeigt bzw. von der lokalen Festplatte lädt. Diese Expires sind &#8220;starke&#8221; Cache-Header und gelten unbedingt, das heißt, sobald sie gesetzt sind und die Ressource einmal heruntergeladen wurde, stellt der Browser keine GET-Anfragen für die Ressource bis das Verfallsdatum erreicht ist. Das kann Ladezeit und Traffic sparen.</p>
<p>Hier mal ein Beispiel für den Code, der so dann z. B. in die .<a href="http://www.im-tal.net/tag/htaccess/" class="st_tag internal_tag" rel="tag" title="Posts tagged with htaccess">htaccess</a> geschrieben werden kann:</p>

<div class="wp_syntax"><div class="code"><pre class="code" style="font-family:monospace;">&lt;IfModule mod_expires.c&gt;
# BEGIN Expire headers
# Modul aktivieren
  ExpiresActive on
# Fav/Icons sind 1 Monat gültig
  ExpiresByType image/ico A2419200
  ExpiresByType image/x-icon A2419200
# übliche Dateien sind 2 Wochen gültig
  ExpiresByType application/pdf A1209600
  ExpiresByType application/zip A1209600
  ExpiresByType application/javascript A1209600
  ExpiresByType application/x-javascript A1209600
  ExpiresByType application/x-shockwave-flash A1209600
# CSS sind 3 Tage gültig
  ExpiresByType text/css A2592000
# übliche Grafiken sind 3 Tage gültig
  ExpiresByType image/jpg A2592000
  ExpiresByType image/gif A2592000
  ExpiresByType image/jpeg A2592000
  ExpiresByType image/png A2592000
# alle anderen Dateien sind 4 Stunden gültig
  ExpiresDefault A14400
&lt;/IfModule&gt;</pre></div></div>

<p>Über ExpiresByType bestimmt man den Dateityp. Die Lebensdauer wird in Sekunden angegeben, da gibt es 2 Schreibweisen:</p>
<ul>
<li>z. B. <em>&#8220;access plus 2592000 seconds&#8221;</em></li>
<li>z. B. <em>A2592000</em> (wie oben gezeigt)</li>
</ul>
<p>Wer nicht selber rechnen mag <img src='http://www.im-tal.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  , eine Übersicht der Zeitangaben wird im <a href="http://www.askapache.com/htaccess/speed-up-sites-with-htaccess-caching.html#menu0-el4">Time Cheatsheet</a> gezeigt. (z.B. 2592000 = 3 Tage * 24 Stunden * 60 Minuten * 60 Sekunden)</p>
<p>Neben den &#8220;Expires&#8221; gibt es noch &#8220;Header set Cache-Control max-age&#8221;. Hier wird auf ähnliche Weise, aber über das Apache-Modul Headers, das maximale Alter einer Datei bestimmt. Grundsätzlich gilt: Entweder Expires oder Cache-Control, <strong>nicht beides</strong>.</p>
<p>Im Zusammenhang damit sei noch kurz Last-Modified und ETag genannt. Beide geben charakteristische Spezifikationen über eine Ressource aus, sodass der Browser feststellen kann, ob Ressourcen gleich sind. Beim Last-Modified-Header ist dies immer ein Datum. Beim ETag wird die Ressource eindeutig über einen Wert (Datei-Versionen oder Content-Hashes sind typisch) identifiziert.<br />
Last-Modified ist ein &#8220;schwacher&#8221; Cache-Header, er erlaubt dem Browser heuristisch zu bestimmen, ob das Element aus dem Cache zu holen ist oder nicht. Allerdings hat es den Vorteil, dass der Browser bei einem explizitem Neuladen der Seite, auch die Ressource neu ausgibt. Auch hier ist es wieder überflüssig, sowohl ETag und Last-Modified-Header anzugeben, entweder oder.</p>
<p>Wer also Last-Modified verwendet sollte ETag wie folgt über die .<a href="http://www.im-tal.net/tag/htaccess/" class="st_tag internal_tag" rel="tag" title="Posts tagged with htaccess">htaccess</a> deaktivieren:</p>

<div class="wp_syntax"><div class="code"><pre class="code" style="font-family:monospace;"># Turn ETags Off
FileETag None</pre></div></div>

<p>Alles zusammen könnte dann so in der .<a href="http://www.im-tal.net/tag/htaccess/" class="st_tag internal_tag" rel="tag" title="Posts tagged with htaccess">htaccess</a> aussehen:<br />
<a href="http://static.im-tal.net/uploads/htaccess.png"><img src="http://static.im-tal.net/uploads/htaccess-289x300.png" alt="htaccess" title="htaccess" width="289" height="300" class="alignnone size-medium wp-image-756" /></a></p>
<br /><br /><small><h2>Verwandte Artikel:</h2><ul><li><a href="http://www.im-tal.net/820/etwas-sicherheit-durch-die-htaccess/" rel="bookmark" title="Permanent Link: Etwas Sicherheit durch die .htaccess">Etwas Sicherheit durch die .htaccess</a></li></ul></small><br /><small>Copyright &copy; 2008-2010 <a href="http://www.im-tal.net">im-Tal.net</a> ( imtalnet (38.107.191.118) )</small><hr />]]></content:encoded>
			<wfw:commentRss>http://www.im-tal.net/745/caching-mit-expires/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gzip-Komprimierung aktivieren</title>
		<link>http://www.im-tal.net/723/gzip-komprimierung-aktivieren/</link>
		<comments>http://www.im-tal.net/723/gzip-komprimierung-aktivieren/#comments</comments>
		<pubDate>Sun, 08 Aug 2010 14:44:45 +0000</pubDate>
		<dc:creator>maxe</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Filezilla]]></category>
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://www.im-tal.net/?p=723</guid>
		<description><![CDATA[Heute haben wir uns mit dem Thema gzip-Compression / gzip-Kompression beschäftigt. Das Firebug Addon &#8220;YSlow&#8221; von Yahoo und auch das &#8220;Page Speed&#8221; Addon von Google bzw. die Webmaster-Tools von Google raten dazu, die gzip Komprimierung für gewisse Dateien zu aktivieren um so mehr Geschwindigkeit für die Website zu gewinnen. Durch &#160;...&#160;<a class="readmore" href="http://www.im-tal.net/723/gzip-komprimierung-aktivieren/"><img src="http://static.im-tal.net/images/weiterlesen.gif" width="100" height="21" alt="Weiterlesen &#187;" title="Weiterlesen &#187;" /></a>]]></description>
			<content:encoded><![CDATA[<p>Heute haben wir uns mit dem Thema gzip-Compression / gzip-Kompression beschäftigt. Das Firebug Addon &#8220;YSlow&#8221; von Yahoo und auch das &#8220;Page Speed&#8221; Addon von Google bzw. die Webmaster-Tools von Google raten dazu, die gzip Komprimierung für gewisse Dateien zu aktivieren um so mehr Geschwindigkeit für die Website zu gewinnen. Durch die Kompression ist es möglich die Website um einige hundert Kilobyte zu entschlacken. Wer kein YSlow und/oder Page Speed hat, kann die Geschwindigkeit auch online testen: <a href="http://gtmetrix.com/">GTmetrix online tool to check website speed</a><br />
Nun gibt es mehrerer Möglichkeiten die Komprimierung zu aktivieren. Genannt seinen da 3 Möglichkeiten, je nach dem wie der Server konfiguriert ist.</p>
<ol>
<li>Für <strong>mod_deflate</strong> muss folgender Code in die .<a href="http://www.im-tal.net/tag/htaccess/" class="st_tag internal_tag" rel="tag" title="Posts tagged with htaccess">htaccess</a>

<div class="wp_syntax"><div class="code"><pre class="code" style="font-family:monospace;">&lt;IfModule mod_deflate.c&gt;
&lt;FilesMatch &quot;\\.(js|css|x?html?|html|htm|php|xml)$&quot;&gt;
SetOutputFilter DEFLATE
&lt;/FilesMatch&gt;
&lt;/ifModule&gt;</pre></div></div>

<p>Die Datei-Endungen (js|css|x?html?|html|htm|php|xml) lassen sich beliebig ändern.</p>
</li>
<li>Für <strong>mod_gzip</strong> muss folgender Code in die .<a href="http://www.im-tal.net/tag/htaccess/" class="st_tag internal_tag" rel="tag" title="Posts tagged with htaccess">htaccess</a>

<div class="wp_syntax"><div class="code"><pre class="code" style="font-family:monospace;">&lt;ifModule mod_gzip.c&gt;
  mod_gzip_on Yes
  mod_gzip_dechunk Yes
  mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
  mod_gzip_item_include handler ^cgi-script$
  mod_gzip_item_include mime ^text/.*
  mod_gzip_item_include mime ^application/x-javascript.*
  mod_gzip_item_exclude mime ^image/.*
  mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
&lt;/ifModule&gt;</pre></div></div>

<p>Auch hier lassen sich die Datei-Endungen (js|css|html|htm|php|xml) wieder beliebig ändern.</p>
</li>
<li>Für <strong>ob_gzhandler</strong> (zlib extension) muss folgender Code am Anfang einer Website stehen

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #990000;">ob_start</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ob_gzhandler&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Tipp1: Für <a href="http://www.im-tal.net/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Wordpress">WordPress</a> ist es sinnvoll den Code als allererstes in die functions.php des Themes zu schreiben.<br />
Tipp2: ob_gzhandler komprimiert nur php-Dateien. Falls also ob_gzhandler genutzt wird, können trotzdem auch die css Dateien komprimiert werden. Dazu kopiert man einfach die css-Datei (z.B. style.css) in eine neue php-Datei (z.B. style.php). In diese neue Datei fügt man ganz oben noch folgendes ein:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_ACCEPT_ENCODING'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'gzip'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-type: text/css'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">ob_start</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ob_gzhandler&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>und ganz unten noch diesen Code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #990000;">ob_end_flush</span><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></pre></div></div>

<p>Nach dem Upload der style.php in das selbe Verzeichnis wo auch die Ursprungs-CSS liegt, muss noch der Aufruf der css in php geändert werden. Dieses geschieht im head-Teil (z.B. header.php) der Website.</p>
</li>
</ol>
<p>Ob mod_deflate, mod_gzip oder die zlib-extension auf dem Server konfiguriert ist, kann man feststellen, in dem man eine neue Datei phpinfo.php mit dem Inhalt</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #990000;">phpinfo</span><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></pre></div></div>

<p>auf den Server hoch lädt und anschließend über den Browser aufruft.</p>
<br /><br /><small><h2>Verwandte Artikel:</h2><ul><li><a href="http://www.im-tal.net/200/aministrator-konto-aktivieren/" rel="bookmark" title="Permanent Link: Aministrator-Konto aktivieren">Aministrator-Konto aktivieren</a></li><li><a href="http://www.im-tal.net/136/nummernblock-schon-beim-start-aktivieren/" rel="bookmark" title="Permanent Link: Nummernblock schon beim Start aktivieren">Nummernblock schon beim Start aktivieren</a></li><li><a href="http://www.im-tal.net/226/kompatibilitaetsmodus-in-joomla-15-fuer-alte-komponenten-oder-module/" rel="bookmark" title="Permanent Link: Kompatibilitätsmodus in Joomla 1.5">Kompatibilitätsmodus in Joomla 1.5</a></li><li><a href="http://www.im-tal.net/190/schwache-grafikkarte-transparenz-abschalten-und-flip3d-etc-weiternutzen/" rel="bookmark" title="Permanent Link: Schwache Grafikkarte unter Vista?">Schwache Grafikkarte unter Vista?</a></li><li><a href="http://www.im-tal.net/529/neues-firefox-fenster-im-vordergrund-oeffnen/" rel="bookmark" title="Permanent Link: Neues Firefox-Fenster im Vordergrund öffnen">Neues Firefox-Fenster im Vordergrund öffnen</a></li></ul></small><br /><small>Copyright &copy; 2008-2010 <a href="http://www.im-tal.net">im-Tal.net</a> ( imtalnet (38.107.191.118) )</small><hr />]]></content:encoded>
			<wfw:commentRss>http://www.im-tal.net/723/gzip-komprimierung-aktivieren/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Post-Thumbnails</title>
		<link>http://www.im-tal.net/598/post-thumbnails/</link>
		<comments>http://www.im-tal.net/598/post-thumbnails/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 07:55:50 +0000</pubDate>
		<dc:creator>maxe</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.im-tal.net/?p=598</guid>
		<description><![CDATA[Ab WordPress Version 2.9 wird es ein Template-Tag geben, mit dem dann die viel gewünschten Post-Thumbnails in WP Einzug halten. Das Template Tag &#8220;the_post_thumbnail()&#8221; <em>(ehem. &#8220;the_post_image()&#8221;)</em> macht es möglich. Über verschiedene Parameter lassen sich Bildformate, Ausrichtungen, Skalierungen, Größen etc. setzen. Micha hat in seinem Blog eine ausführliche Beschreibung gegeben: http://dynamicinternet.eu/blog/2009-12-17/the-ultimative-guide-for-the_post_thumbnail-in-wordpress-2-9/
Bei &#160;...&#160;<a class="readmore" href="http://www.im-tal.net/598/post-thumbnails/"><img src="http://static.im-tal.net/images/weiterlesen.gif" width="100" height="21" alt="Weiterlesen &#187;" title="Weiterlesen &#187;" /></a>]]></description>
			<content:encoded><![CDATA[<p>Ab <a href="http://www.im-tal.net/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Wordpress">WordPress</a> Version 2.9 wird es ein Template-Tag geben, mit dem dann die viel gewünschten Post-Thumbnails in WP Einzug halten. Das Template Tag &#8220;the_post_thumbnail()&#8221; <em>(ehem. &#8220;the_post_image()&#8221;)</em> macht es möglich. Über verschiedene Parameter lassen sich Bildformate, Ausrichtungen, Skalierungen, Größen etc. setzen. Micha hat in seinem Blog eine ausführliche Beschreibung gegeben: <a href="http://dynamicinternet.eu/blog/2009-12-17/the-ultimative-guide-for-the_post_thumbnail-in-wordpress-2-9/">http://dynamicinternet.eu/blog/2009-12-17/the-ultimative-guide-for-the_post_thumbnail-in-wordpress-2-9/</a></p>
<p>Bei älteren Themes muss also die ganze Funktion auch erst mal über die functions.php aktiviert werden. Frank schreibt in seinem Blog wie man ältere Themes dahingehend aktualisiert: <a href="http://bueltge.de/wordpress-post-thumbnail-abwaertskompatibel/1079/">http://bueltge.de/wordpress-post-thumbnail-abwaertskompatibel/1079/</a></p>
<p>Wozu das Ganze?<br />
Wenn also ab <a href="http://www.im-tal.net/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Wordpress">WordPress</a> 2.9 nun das Theme soweit angepasst und aktualisiert ist, dass es Post-Thumbnail unterstützt, dann kann über das Backend von WP  im &#8220;Artikel schreiben&#8221;-Dialog das Thumbnail ganz einfach gesetzt werden. Die Vorgehensweise ist dem &#8220;Bild einfügen&#8221; gleich. Man kann also ein Bild vom Computer, von einer URL oder oder aus der Mediathek auswählen und klickt anschließend auf &#8220;Use as thumbnail&#8221;.</p>
<br /><br /><small><h2>Verwandte Artikel:</h2><ul><li><a href="http://www.im-tal.net/112/letzte-kommentare-anzeigen/" rel="bookmark" title="Permanent Link: Letzte Kommentare anzeigen">Letzte Kommentare anzeigen</a></li><li><a href="http://www.im-tal.net/110/verwandte-artikel-eines-artikels-anzeigen/" rel="bookmark" title="Permanent Link: Verwandte Artikel eines Artikels anzeigen">Verwandte Artikel eines Artikels anzeigen</a></li><li><a href="http://www.im-tal.net/541/antivir-startbildschirm-deaktivieren/" rel="bookmark" title="Permanent Link: AntiVir Startbildschirm deaktivieren">AntiVir Startbildschirm deaktivieren</a></li><li><a href="http://www.im-tal.net/810/wordpress-cdn-cookieless-domain/" rel="bookmark" title="Permanent Link: WordPress: CDN &#038; cookieless domain">WordPress: CDN &#038; cookieless domain</a></li><li><a href="http://www.im-tal.net/820/etwas-sicherheit-durch-die-htaccess/" rel="bookmark" title="Permanent Link: Etwas Sicherheit durch die .htaccess">Etwas Sicherheit durch die .htaccess</a></li></ul></small><br /><small>Copyright &copy; 2008-2010 <a href="http://www.im-tal.net">im-Tal.net</a> ( imtalnet (38.107.191.118) )</small><hr />]]></content:encoded>
			<wfw:commentRss>http://www.im-tal.net/598/post-thumbnails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Permalinks</title>
		<link>http://www.im-tal.net/597/wordpress-permalinks/</link>
		<comments>http://www.im-tal.net/597/wordpress-permalinks/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 09:37:58 +0000</pubDate>
		<dc:creator>maxe</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Permalinks]]></category>

		<guid isPermaLink="false">http://www.im-tal.net/?p=597</guid>
		<description><![CDATA[Wie Michael Wöhrer auf seinem Blog &#8220;Software Guide&#8221; berichtete, hat WordPress anscheinend Performance-Probleme mit einigen Permalink-Strukturen bei Verwendung von vielen statischen Seiten. So machen wohl solche Permalink-Kombinationen Probleme, die mit Kategorie (%category%), Tag (%tag%), Autor (%author%) oder Artikel-Titel (%postname%) beginnen. Dabei ist es wohl so, das WordPress das Datenbankfeld &#8220;rewrite_rules&#8221; &#160;...&#160;<a class="readmore" href="http://www.im-tal.net/597/wordpress-permalinks/"><img src="http://static.im-tal.net/images/weiterlesen.gif" width="100" height="21" alt="Weiterlesen &#187;" title="Weiterlesen &#187;" /></a>]]></description>
			<content:encoded><![CDATA[<p>Wie Michael Wöhrer auf seinem Blog &#8220;<a href="http://sw-guide.de/2009-02/wordpress-permalinks-und-die-performance/">Software Guide</a>&#8221; berichtete, hat <a href="http://www.im-tal.net/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Wordpress">WordPress</a> anscheinend Performance-Probleme mit einigen Permalink-Strukturen bei Verwendung von vielen statischen Seiten. So machen wohl solche Permalink-Kombinationen Probleme, die mit Kategorie (%category%), Tag (%tag%), Autor (%author%) oder Artikel-Titel (%postname%) beginnen. Dabei ist es wohl so, das <a href="http://www.im-tal.net/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Wordpress">WordPress</a> das Datenbankfeld &#8220;rewrite_rules&#8221; für jede einzelne Seite mit sämtlichen Informationen füllt, die dann bei mehreren 100 Seiten die Datenbank in die Knie zwingen. Auch im <a href="http://codex.wordpress.org/Using_Permalinks#Structure_Tags">WordPress-Codex</a> wird mittlerweile darauf hingewiesen.</p>
<p>Wenn man <a href="http://www.im-tal.net/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Wordpress">WordPress</a> mit vielen Seiten (Bsp. als CMS) betreibt, ist es also ratsam, die <a href="http://www.im-tal.net/tag/permalinks/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Permalinks">Permalinks</a> so umzustellen, dass eben nicht die vier o. g. Permalink-Tags am Anfang stehen. Anstelle dieser kann z.B. die &#8220;Post-ID&#8221; oder das &#8220;Year&#8221; zu Beginn stehen:</p>
<p>/%post_id%/%postname%/<br />
/%post_id%-%postname%/<br />
/%year%/%postname%/<br />
/%year%-%postname%/</p>
<br /><br /><small><h2>Verwandte Artikel:</h2><ul><li><a href="http://www.im-tal.net/497/umlaute-in-den-permalinks-ohne-plugin-aendern/" rel="bookmark" title="Permanent Link: Umlaute in den Permalinks ohne Plugin ändern">Umlaute in den Permalinks ohne Plugin ändern</a></li><li><a href="http://www.im-tal.net/247/wordpress-das-praxisbuch/" rel="bookmark" title="Permanent Link: WordPress-Das Praxisbuch">WordPress-Das Praxisbuch</a></li><li><a href="http://www.im-tal.net/455/wer-darf-was-in-wordpress/" rel="bookmark" title="Permanent Link: Wer darf was in WordPress?">Wer darf was in WordPress?</a></li><li><a href="http://www.im-tal.net/266/wordpress-27-ist-verfuegbar-trotz-upgrade/" rel="bookmark" title="Permanent Link: &#8220;WordPress 2.7 ist verfügbar&#8221; trotz Upgrade">&#8220;WordPress 2.7 ist verfügbar&#8221; trotz Upgrade</a></li><li><a href="http://www.im-tal.net/598/post-thumbnails/" rel="bookmark" title="Permanent Link: Post-Thumbnails">Post-Thumbnails</a></li></ul></small><br /><small>Copyright &copy; 2008-2010 <a href="http://www.im-tal.net">im-Tal.net</a> ( imtalnet (38.107.191.118) )</small><hr />]]></content:encoded>
			<wfw:commentRss>http://www.im-tal.net/597/wordpress-permalinks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Template-Tag &#8220;the_excerpt()&#8221;</title>
		<link>http://www.im-tal.net/593/wordpress-template-tag-the_excerpt/</link>
		<comments>http://www.im-tal.net/593/wordpress-template-tag-the_excerpt/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 06:35:41 +0000</pubDate>
		<dc:creator>maxe</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.im-tal.net/?p=593</guid>
		<description><![CDATA[Wer mit WordPress nicht gerne den ganzen Inhalt (mit Links, Bilder etc.) der Artikel auf der Startseite haben will sondern nur einen Auszug, arbeitet entweder mit dem more-Tag bei the_content() oder mit the_excerpt. the_excerpt zeigt keine Formatierungen, Bilder, Links etc. an. Außerdem hat das Template-Tag the_except leider keine Parameter worüber &#160;...&#160;<a class="readmore" href="http://www.im-tal.net/593/wordpress-template-tag-the_excerpt/"><img src="http://static.im-tal.net/images/weiterlesen.gif" width="100" height="21" alt="Weiterlesen &#187;" title="Weiterlesen &#187;" /></a>]]></description>
			<content:encoded><![CDATA[<p>Wer mit <a href="http://www.im-tal.net/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Wordpress">WordPress</a> nicht gerne den ganzen Inhalt (mit Links, Bilder etc.) der Artikel auf der Startseite haben will sondern nur einen Auszug, arbeitet entweder mit dem more-Tag bei the_content() oder mit <a href="http://doku.wordpress-deutschland.org/Template_Tags/the_excerpt">the_excerpt</a>. the_excerpt zeigt keine Formatierungen, Bilder, Links etc. an. Außerdem hat das Template-Tag the_except leider keine Parameter worüber man ein &#8220;weiterlesen&#8221; o. ä. bestimmen könnte. Trotzdem kann man das einigermaßen gut im entsprechenden Template (index.php, archive.php, category.php etc.) mit einem Link auf den ganzen Artikel lösen:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> the_excerpt<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>
&lt;p&gt;
&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?</span>php<span style="color: #339933;">&amp;</span>phpMyAdmin<span style="color: #339933;">=</span>efb1bc0ce47ede9fe1dbff3e50eb439e the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; rel=&quot;bookmark&quot; title=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'weiterlesen ...'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> 
<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<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>&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'weiterlesen ...'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;
&lt;/p&gt;</pre></div></div>

<p>wer im Code und mit den Templates etwas sicherer ist, kann eine Variante über die functions.php wählen:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// bildet das &quot;weiterlesen&quot; bei the_excerpt</span>
<span style="color: #000000; font-weight: bold;">function</span> link_hellip_in_excerpt<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$content</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$post_ID</span><span style="color: #339933;">;</span>
 <span style="color: #b1b100;">return</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'~\[\.\.\.\]$~'</span><span style="color: #339933;">,</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_ID</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'?phpMyAdmin=efb1bc0ce47ede9fe1dbff3e50eb439e&quot;&gt;[weiterlesen ...]&lt;/a&gt;'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$content</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'the_excerpt'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'link_hellip_in_excerpt'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">9</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'the_content'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'link_hellip_in_excerpt'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">9</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Ab <a href="http://www.im-tal.net/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Wordpress">WordPress</a> 2.9 werden sogar excerpt-Filter für Auszugs-Länge und Weiterlesen-Link unterstützt, die über die functions.php z.B. so aussehen können:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// ändern der excerpt Länge auf 40 Worte</span>
<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>
	<span style="color: #b1b100;">return</span> <span style="color: #cc66cc;">40</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
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>
&nbsp;
<span style="color: #666666; font-style: italic;">// ändern des excerpt more Strings</span>
<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>
<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'[weiterlesen …]'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
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></pre></div></div>

<p>Wie weiter oben schon erwähnt kannst du auch mit dem Template-Tag <a href="http://doku.wordpress-deutschland.org/Template_Tags/the_content">the_content</a> den gesamten Inhalt auf der Startseite einlesen lassen. the_content() zeigt im Gegensatz zu the_excerpt die Links, Bilder und Formatierungen vom Beitrag an. Außerdem lässt sich individuell mit dem &lt;!–more–&gt;-Tag bestimmen, was genau angezeigt werden soll. Der more-Tag, welchen man in der Artikel-Bearbeitung setzen kann, splittet den Beitrag / die Seite in zwei Teile. Auf der Startseite bzw. in Archiven wird dann nur der Teil vor dem more-Tag angezeigt, allerdings mit allen Links, Bildern und Formatierungen. Mehr darüber erfährst du auch in der WPD-FAQ: <a href="http://faq.wordpress-deutschland.org/keine-bilder-keine-links-im-archiv-the_excerpt/">http://faq.wordpress-deutschland.org/keine-bilder-keine-links-im-archiv-the_excerpt/</a></p>
<br /><br /><small><h2>Verwandte Artikel:</h2><ul><li><a href="http://www.im-tal.net/246/automatische-p-tags-in-wordpress-vermeiden/" rel="bookmark" title="Permanent Link: Automatische p-Tags in WordPress vermeiden">Automatische p-Tags in WordPress vermeiden</a></li><li><a href="http://www.im-tal.net/158/wordpress-tag-cloud-anzahl-der-themen/" rel="bookmark" title="Permanent Link: WordPress Tag Cloud-Anzahl der Themen">WordPress Tag Cloud-Anzahl der Themen</a></li><li><a href="http://www.im-tal.net/117/avatar-mit-gravatar/" rel="bookmark" title="Permanent Link: Avatar mit Gravatar">Avatar mit Gravatar</a></li><li><a href="http://www.im-tal.net/598/post-thumbnails/" rel="bookmark" title="Permanent Link: Post-Thumbnails">Post-Thumbnails</a></li><li><a href="http://www.im-tal.net/554/der-chcounter-geht-in-die-naechste-runde-expcounter/" rel="bookmark" title="Permanent Link: Der chCounter geht in die nächste Runde: expCounter">Der chCounter geht in die nächste Runde: expCounter</a></li></ul></small><br /><small>Copyright &copy; 2008-2010 <a href="http://www.im-tal.net">im-Tal.net</a> ( imtalnet (38.107.191.118) )</small><hr />]]></content:encoded>
			<wfw:commentRss>http://www.im-tal.net/593/wordpress-template-tag-the_excerpt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Effekte mit der jQuery JavaScript Library</title>
		<link>http://www.im-tal.net/568/effekte-mit-der-jquery-javascript-library/</link>
		<comments>http://www.im-tal.net/568/effekte-mit-der-jquery-javascript-library/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 09:45:33 +0000</pubDate>
		<dc:creator>maxe</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://www.im-tal.net/?p=568</guid>
		<description><![CDATA[Mit der jQuery JavaScript Library sind tolle Effekte möglich, wie z. B. Sliding, Fading, Animating etc.
Wir haben uns selber noch nicht viel mit jQuery befasst, wollen aber unsere ersten Versuche hier als Einstiegsanleitung niederschreiben.
Also zu erst muss die Library ins Template eingebunden werden. Entweder man lädt sich die .js Datei &#160;...&#160;<a class="readmore" href="http://www.im-tal.net/568/effekte-mit-der-jquery-javascript-library/"><img src="http://static.im-tal.net/images/weiterlesen.gif" width="100" height="21" alt="Weiterlesen &#187;" title="Weiterlesen &#187;" /></a>]]></description>
			<content:encoded><![CDATA[<p>Mit der jQuery JavaScript Library sind tolle Effekte möglich, wie z. B. Sliding, Fading, Animating etc.<br />
Wir haben uns selber noch nicht viel mit jQuery befasst, wollen aber unsere ersten Versuche hier als Einstiegsanleitung niederschreiben.</p>
<p>Also zu erst muss die Library ins Template eingebunden werden. Entweder man lädt sich die .js Datei <a href="http://docs.jquery.com/Downloading_jQuery">hier herunter</a> und bindet sie anschließend so (am besten im Header) ein:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;jquery-1.3.2.min.js&quot;</span> type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>oder man bindet z. B. direkt die von jquery.com ein:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://code.jquery.com/jquery-latest.js&quot;</span> type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<hr />
<p>So, nachdem nun die Library eingebunden ist, können wir mit dem Javascript beginnen. Es läuft immer nach ähnlichem Schema.<br />
Erst sagen wir, wir wollen eine Funktion:<br />
<code>$(document).ready(function()</code><br />
Dann können wir bei Bedarf bestimmen, welches Element/Objekt bei Klick o. ä. die Änderung vornehmen soll:<br />
<code>$("button").click(function ()</code><br />
Auf jeden Fall werden dann die Element/Objekte bestimmt, welche ihr Aussehen/Verhalten ändern sollen:<br />
<code>$("p").slideToggle</code></p>
<p>Als <strong>1. kleines Beispiel</strong> lassen wir mit <em>slideToggle</em> alle Texte innernhalb eine p-Tags durch einen Button ein-/ausblenden:</p>
<div class="test1">

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><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>
  $<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>
&nbsp;
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;button&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</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>
      $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;p&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">slideToggle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;slow&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>Um den Button nun sichtbar zu machen, ist es nötig diesen an die entsprechende Stelle (vorzugsweise direkt über den Text) anzulegen:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&nbsp;
&lt;button&gt;Text ein-/ausblenden&lt;/button&gt;
&nbsp;
&lt;p&gt;
   Hier steht der Text der nun ein- bzw. ausgeblendet werden kann.
&lt;/p&gt;</pre></div></div>

<p>So lässt sich z. B. auch eine Sidebar aus-/einblenden. Statt &#8220;p&#8221; nimmt man dann z. B. den Div-Container der Sidebar (z. B. &#8220;#sidebar&#8221;).
</p></div>
<p><button class="1">Hier kannst du es testen</button></p>
<hr />
<p>Als <strong>2. Beispiel</strong> wollen wir zeigen, wie z. B. die Kombination von mehreren Elementen/Objekte mit mehrfacher Veränderung möglich sind:</p>
<div class="test2">

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><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>
  $<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>
&nbsp;
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;button&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</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>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;div.block&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;p.extra&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;blau&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Class in blau geaendert&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>Alle Div-Container mit der Class &#8220;.block&#8221; und alle p-Tags mit der Class &#8220;.extra&#8221; bekommen eine neue Class &#8220;.blau&#8221; zugefügt und es wird ein Hinweistext ausgegeben. Statt addClass können auch <a href="http://docs.jquery.com/Attributes">andere Attribute</a>, wie z. B. toggleClass genutzt werden.</p>
</div>
<p><button class="2">Hier kannst du es testen</button></p>
<hr />
<p>Eine <strong>weitere Spielerei</strong> wäre ein FadeIn-Effekt bei allen Bildern die im Div-Container &#8220;#content&#8221; sitzen:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><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>
  $<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>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#content img&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;display&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;none&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#content img&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeIn</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">5000</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<div class="test3">
<img src="http://static.im-tal.net/uploads/wordpress.jpg" alt="wordpress" title="wordpress" width="193" height="80" class="alignnone size-full wp-image-519" />
</div>
<p><button class="3">Hier kannst du es testen</button></p>
<blockquote><p><strong>Weitere Effekte findest du in der jQuery-Documentation: <a href="http://docs.jquery.com/Effects">http://docs.jquery.com/Effects</a></strong></p></blockquote>
<hr />
<h2>Ein kleiner Hinweis für <a href="http://www.im-tal.net/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Wordpress">WordPress</a>-User:</h2>
<p><a href="http://www.im-tal.net/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Wordpress">WordPress</a> bringt eine jquery.js im Verzeichnis /wp-includes/js/jquery/jquery.js mit. Falls ihr also damit arbeiten wollt ist eine kleine Abweichung zu beachten. Statt des $-Zeichen muss in WP jQuery benutzt werden:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">&lt;script src=&quot;http://www.deine_domain.xyz/wp-includes/js/jquery/jquery.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
<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>
  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>
&nbsp;
    jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;button&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</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>
    jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;div.block&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;p.extra&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toggleClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;blau&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Class geaendert&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>Falls ihr in <a href="http://www.im-tal.net/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Wordpress">WordPress</a> nicht mit der WP eigenen jquery.js arbeiten wollt, könnt ihr diese deaktiveren und eine andere einbinden. Könnte sein, dass in eurer header.php, footer.php oder functions.php schon der Aufruf der jquery drin steht:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquery'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Das dann wie folgt ändern bzw. hinzufügen, falls es noch nicht vorhanden ist:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
wp_deregister_script<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'jquery'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//derigistriert die jquery von WP</span>
wp_register_script<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'jquery'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'http://code.jquery.com/jquery-latest.js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//registriert die jquery von der externen URL</span>
wp_enqueue_script<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'jquery'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//laedt die neue jquery</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<br /><br /><small><h2>Verwandte Artikel:</h2><ul><li><a href="http://www.im-tal.net/529/neues-firefox-fenster-im-vordergrund-oeffnen/" rel="bookmark" title="Permanent Link: Neues Firefox-Fenster im Vordergrund öffnen">Neues Firefox-Fenster im Vordergrund öffnen</a></li><li><a href="http://www.im-tal.net/745/caching-mit-expires/" rel="bookmark" title="Permanent Link: Caching mit Expires">Caching mit Expires</a></li><li><a href="http://www.im-tal.net/508/firebug-fuer-firefox/" rel="bookmark" title="Permanent Link: Firebug für Firefox">Firebug für Firefox</a></li><li><a href="http://www.im-tal.net/723/gzip-komprimierung-aktivieren/" rel="bookmark" title="Permanent Link: gzip-Komprimierung aktivieren">gzip-Komprimierung aktivieren</a></li></ul></small><br /><small>Copyright &copy; 2008-2010 <a href="http://www.im-tal.net">im-Tal.net</a> ( imtalnet (38.107.191.118) )</small><hr />]]></content:encoded>
			<wfw:commentRss>http://www.im-tal.net/568/effekte-mit-der-jquery-javascript-library/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Der chCounter geht in die nächste Runde: expCounter</title>
		<link>http://www.im-tal.net/554/der-chcounter-geht-in-die-naechste-runde-expcounter/</link>
		<comments>http://www.im-tal.net/554/der-chcounter-geht-in-die-naechste-runde-expcounter/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 14:40:30 +0000</pubDate>
		<dc:creator>im-Tal.net</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Counter]]></category>

		<guid isPermaLink="false">http://www.im-tal.net/?p=554</guid>
		<description><![CDATA[Als Besuchszähler (Counter) setz(t)en wir bisher auf im-Tal.net den chCounter von Christoph Bachner bzw. ab 2007 weiterentwickelt von Bert Körn ein.
Wie wir bereits in unserem Artikel &#8220;chCounter für WordPress nutzen&#8221; erwähnten, ist die Entwicklung vom chCounter seit einiger Zeit aus nicht bekannten Gründen eingeschlafen. Jetzt greift Volker S. Latainski das &#160;...&#160;<a class="readmore" href="http://www.im-tal.net/554/der-chcounter-geht-in-die-naechste-runde-expcounter/"><img src="http://static.im-tal.net/images/weiterlesen.gif" width="100" height="21" alt="Weiterlesen &#187;" title="Weiterlesen &#187;" /></a>]]></description>
			<content:encoded><![CDATA[<p>Als Besuchszähler (<a href="http://www.im-tal.net/tag/counter/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Counter">Counter</a>) setz(t)en wir bisher auf im-Tal.net den chCounter von Christoph Bachner bzw. ab 2007 weiterentwickelt von Bert Körn ein.</p>
<p>Wie wir bereits in unserem Artikel &#8220;chCounter für <a href="http://www.im-tal.net/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Wordpress">WordPress</a> nutzen&#8221; erwähnten, ist die Entwicklung vom chCounter seit einiger Zeit aus nicht bekannten Gründen eingeschlafen. Jetzt greift Volker S. Latainski das Projekt auf und entwickelt den <a href="http://www.im-tal.net/tag/counter/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Counter">Counter</a>, dank GPL (Lizenz), unter neuem Namen weiter:</p>
<p><a href="http://www.expblog.net/expcounter/"><img src="http://www.expblog.net/expcounter/images/logo.png" alt="expCounter" title="expCounter" width="319" height="85" /></a></p>
<p>Die Installation erfolgt wie vom chCounter gewohnt. Auch der Umstieg vom chCounter auf den expCounter, <a href="http://www.expblog.net/expcounter/chcounter_zu_expcounter.html">wie hier beschrieben</a>, ist sehr einfach. Das Template (zuständig für die Anzeige) lässt sich sehr einfach über den <a href="http://www.expblog.net/expcounter/templategenerator">Template-Generator</a> anpassen.</p>
<p>Wir haben nun ziemlich früh umgestellt und sind auf die (Weiter-)Entwicklung des Counters gespannt.</p>
<p>Ach übrigens, unser Artikel &#8220;chCounter für <a href="http://www.im-tal.net/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Wordpress">WordPress</a> nutzen&#8221; (sowie die Artikel die sich mit der Einbindung in <a href="http://www.im-tal.net/tag/joomla/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Joomla">Joomla</a> beschäftigen) hat bisher noch Gültigkeit. Falls sich für die Einbindung in <a href="http://www.im-tal.net/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Wordpress">WordPress</a> etwas ändern sollte werden wir selbstverständlich berichten.</p>
<br /><br /><small><h2>Verwandte Artikel:</h2><ul><li><a href="http://www.im-tal.net/453/chcounter-fuer-wordpress-nutzen/" rel="bookmark" title="Permanent Link: chCounter / expCounter für WordPress nutzen">chCounter / expCounter für WordPress nutzen</a></li><li><a href="http://www.im-tal.net/515/chcounter-mit-sicherheitsluecke/" rel="bookmark" title="Permanent Link: chCounter mit Sicherheitslücke">chCounter mit Sicherheitslücke</a></li><li><a href="http://www.im-tal.net/212/chcounter-in-joomla-10xx-einbinden/" rel="bookmark" title="Permanent Link: chCounter in Joomla 1.0.xx einbinden">chCounter in Joomla 1.0.xx einbinden</a></li><li><a href="http://www.im-tal.net/219/chcounter-in-joomla-15xx-einbinden/" rel="bookmark" title="Permanent Link: chCounter in Joomla 1.5.xx einbinden">chCounter in Joomla 1.5.xx einbinden</a></li><li><a href="http://www.im-tal.net/255/website-mit-verschiedenen-browsern-testen/" rel="bookmark" title="Permanent Link: Website mit verschiedenen Browsern testen">Website mit verschiedenen Browsern testen</a></li></ul></small><br /><small>Copyright &copy; 2008-2010 <a href="http://www.im-tal.net">im-Tal.net</a> ( imtalnet (38.107.191.118) )</small><hr />]]></content:encoded>
			<wfw:commentRss>http://www.im-tal.net/554/der-chcounter-geht-in-die-naechste-runde-expcounter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress-Plugin: Remove Dashboard Widgets</title>
		<link>http://www.im-tal.net/547/wordpress-plugin-remove-dashboard-widgets/</link>
		<comments>http://www.im-tal.net/547/wordpress-plugin-remove-dashboard-widgets/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 15:52:38 +0000</pubDate>
		<dc:creator>maxe</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://www.im-tal.net/?p=547</guid>
		<description><![CDATA[Mit der Veröffentlichung von WordPress 2.7 wurde eine neue Dashboard Widgets API eingeführt, welche es sehr einfach macht, neue Widgets in das Dashboard hinzuzufügen. Aber auch der andere Weg ist seit WordPress 2.7 möglich, die Entfernung der Dashboard Widgets.
In einigen Situationen, vor allem auf Multi-User-Blogs, kann es sinnvoll sein einige &#160;...&#160;<a class="readmore" href="http://www.im-tal.net/547/wordpress-plugin-remove-dashboard-widgets/"><img src="http://static.im-tal.net/images/weiterlesen.gif" width="100" height="21" alt="Weiterlesen &#187;" title="Weiterlesen &#187;" /></a>]]></description>
			<content:encoded><![CDATA[<p>Mit der Veröffentlichung von <a href="http://www.im-tal.net/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Wordpress">WordPress</a> 2.7 wurde eine neue Dashboard Widgets API eingeführt, welche es sehr einfach macht, neue Widgets in das Dashboard hinzuzufügen. Aber auch der andere Weg ist seit <a href="http://www.im-tal.net/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Wordpress">WordPress</a> 2.7 möglich, die Entfernung der Dashboard Widgets.</p>
<p>In einigen Situationen, vor allem auf Multi-User-Blogs, kann es sinnvoll sein einige Widgets komplett zu entfernen anstatt nur auszublenden. Jeder Nutzer kann standardmäßig über das Optionen-Tab (an der rechten oberen Seite) einzelne Widgets ausblenden, aber wenn die User keine technischen Anwender sind, ist es sicherlich schöner, dass die nicht benötigten Dashboard-Widgets bereits vom Admin deaktiviert wurden.<br />
Aber auch aus Problemen mit der Ladezeit oder des Serverspeichers (bsp. mit Strato) kann es sinnvoll sein einige Dashboard Widgets komplett abzuschalten. Das bringt immerhin einige MB Platz.</p>
<p>Zurzeit  gibt es keine Funktion auf einfache Weise die Standard-Dashboard Widgets zu entfernen. Um sie zu entfernen, müsste man manuell über unset() die Elemente aus dem allgemeinen $ wp_meta_box Array entfernen:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> remove_dashboard_widgets<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">// Globalize the metaboxes array, this holds all the widgets for wp-admin</span>
  <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wp_meta_boxes</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// Remove the incomming links widget</span>
  <span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_meta_boxes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'normal'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'core'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard_incoming_links'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #666666; font-style: italic;">//Remove the plugins widget  </span>
  <span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_meta_boxes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'normal'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'core'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard_plugins'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #666666; font-style: italic;">// Remove the quickpress widget</span>
  <span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_meta_boxes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'side'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'core'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard_quick_press'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> 
&nbsp;
<span style="color: #666666; font-style: italic;">// Hoook into the 'wp_dashboard_setup' action to register our function</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_dashboard_setup'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'remove_dashboard_widgets'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><a href="http://codex.wordpress.org/Dashboard_Widgets_API#Advanced:_Removing_Dashboard_Widgets">http://codex.wordpress.org/Dashboard_Widgets_API#Advanced:_Removing_Dashboard_Widgets</a></p>
<p>Für dieses Problem haben wir ein Plugin geschrieben, welches diese Aufgabe auf einfache Weise übernimmt. Das Plugin &#8220;Remove Dashboard Widgets&#8221; kann übersichtlich über die Einstellungen einzelne/alle Standard-Dashboard-Widgets für alle User ausschalten.</p>
<p>Wie bereits erwähnt, arbeitet das Plugin <strong>erst ab <a href="http://www.im-tal.net/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Wordpress">WordPress</a> Version 2.7</strong>, da hier die neue Dashboard Widgets API eingeführt wurde!</p>
<p><strong>Download Zip-Datei:</strong><br />
<a href="http://static.im-tal.net/uploads/remove-dashboard-widgets.zip">Remove Dashboard Widgets 0.3</a></p>
<p><strong>Installation:</strong></p>
<ol>
<li> Download &#8220;Remove-Dashboard-Widgets&#8221; plugin</li>
<li> Entpacke das Archiv</li>
<li> Lade den Ordner per FTP in den <a href="http://www.im-tal.net/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Wordpress">WordPress</a>-Plugin-Ordner &#8230;/wp-content/<a href="http://www.im-tal.net/tag/plugins/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Plugins">plugins</a>/*</li>
<li> Gehe ins WP-Backend zum tab &#8220;<a href="http://www.im-tal.net/tag/plugins/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Plugins">Plugins</a>&#8221;</li>
<li> Aktiviere das &#8220;Remove-Dashboard-Widgets&#8221; Plugin</li>
<li> Gehe in die Plugin Einstellungen</li>
<li> Fertig</li>
</ol>
<p><strong>History:</strong><br />
0.1  &#8211;  Entwicklung Grundfunktionen über unset()<br />
0.2  &#8211;  Einstellungen über den Settings-Bereich im WP-Backend möglich, deutsche Sprache de_DE<br />
0.3  &#8211;  Code/Funktionen überarbeitet, Settings in die Dashboard-Box verlegt</p>
<p><a href="http://static.im-tal.net/uploads/remove-dashboard-widgets.jpg"><img class="size-full wp-image-550 alignnone" title="remove-dashboard-widgets" src="http://static.im-tal.net/uploads/remove-dashboard-widgets.jpg" alt="remove-dashboard-widgets" width="560" height="279" /></a></p>
<br /><br /><small><h2>Verwandte Artikel:</h2><ul><li><a href="http://www.im-tal.net/281/our-todo-list-plugin/" rel="bookmark" title="Permanent Link: Our Todo List Plugin">Our Todo List Plugin</a></li><li><a href="http://www.im-tal.net/495/antivirus-plugin-fuer-wordpress/" rel="bookmark" title="Permanent Link: AntiVirus-Plugin für WordPress">AntiVirus-Plugin für WordPress</a></li><li><a href="http://www.im-tal.net/304/all-in-one-seo-pack-plugin/" rel="bookmark" title="Permanent Link: All in one SEO Pack Plugin">All in one SEO Pack Plugin</a></li><li><a href="http://www.im-tal.net/288/antispam-bee/" rel="bookmark" title="Permanent Link: Antispam Bee">Antispam Bee</a></li><li><a href="http://www.im-tal.net/246/automatische-p-tags-in-wordpress-vermeiden/" rel="bookmark" title="Permanent Link: Automatische p-Tags in WordPress vermeiden">Automatische p-Tags in WordPress vermeiden</a></li></ul></small><br /><small>Copyright &copy; 2008-2010 <a href="http://www.im-tal.net">im-Tal.net</a> ( imtalnet (38.107.191.118) )</small><hr />]]></content:encoded>
			<wfw:commentRss>http://www.im-tal.net/547/wordpress-plugin-remove-dashboard-widgets/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
