<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>PapyGeek &#187; WordPress</title>
	<atom:link href="http://www.papygeek.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.papygeek.com</link>
	<description>Le coin des bons trucs du Web</description>
	<lastBuildDate>Wed, 01 Sep 2010 11:54:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
<cloud domain='www.papygeek.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Créer automatiquement un Sitemap Video sur WordPress</title>
		<link>http://www.papygeek.com/wordpress/creer-automatiquement-un-sitemap-video-sur-wordpress/</link>
		<comments>http://www.papygeek.com/wordpress/creer-automatiquement-un-sitemap-video-sur-wordpress/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 06:00:08 +0000</pubDate>
		<dc:creator>Papy</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[google webmaster tools]]></category>
		<category><![CDATA[moteurs de recherche]]></category>
		<category><![CDATA[pages web]]></category>
		<category><![CDATA[Search Engines]]></category>
		<category><![CDATA[Searching]]></category>
		<category><![CDATA[sitemap]]></category>
		<category><![CDATA[sitemap video]]></category>
		<category><![CDATA[video-sitemap]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://www.papygeek.com/?p=8997</guid>
		<description><![CDATA[Plus Google en sait sur vous, mieux c&#8217;est. Là je ne parle heureusement pas de votre vie privée mais de vos sites Web. Dans ce registre, les fichiers Sitemap peuvent permettre à votre site d&#8217;être indexé plus facilement, ou plus rapidement par les moteurs de recherche. Alors que les fichiers sitemap.xml listant les pages Web [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Plus Google en sait sur vous, mieux c&#8217;est. Là je ne parle heureusement pas de votre vie privée mais de vos sites Web. Dans ce registre, les fichiers <a title="Sitemap" href="http://fr.wikipedia.org/wiki/Sitemap">Sitemap</a> peuvent permettre à votre site <strong>d&#8217;être indexé plus facilement, ou plus rapidement par les moteurs de recherche</strong>. Alors que les fichiers sitemap.xml listant les pages Web sont les plus communs, un nouveau type de sitemap existe depuis quelques temps : les <strong>Sitemaps vidéos</strong>.</p>
<p style="text-align: center;"><a href="http://www.papygeek.com/wordpress/creer-automatiquement-un-sitemap-video-sur-wordpress/"><img class="aligncenter size-medium wp-image-8998" title="Sitemap Video" src="http://www.papygeek.com/wp-content/uploads/2010/07/Sitemap-Video-500x239.png" alt="Sitemap Video 500x239 Créer automatiquement un Sitemap Video sur WordPress" width="500" height="239" /></a></p>
<p>Pour faciliter le travail et éviter les développements supplémentaires, vous pouvez désormais utiliser le plugin <a href="http://wordpress.org/extend/plugins/xml-sitemaps-for-videos/">Google <acronym title="eXtensible Markup Language">XML</acronym> Sitemap for Videos</a> qui va rechercher automatiquement les vidéos YouTube de vos articles et les ajouter à un fichier <strong>video-sitemap.xml</strong>.</p>
<p>Le plugin est plutôt simple à installer, il suffit de le télécharger et de l&#8217;activer dans l&#8217;interface de WordPress, puis de lancer la génération du fichier sitemap vidéo dans les options :</p>
<p><object width="600" height="363"><param name="movie" value="http://www.youtube.com/v/Zql9_foKPiQ&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed  src="http://www.youtube.com/v/Zql9_foKPiQ&#038;fs=1" type="application/x-shockwave-flash" width="600" height="363" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Seul YouTube est supporté pour le moment, mais ce n&#8217;est pas très compliqué de modifier le code du plugin pour ajouter d&#8217;autres sites de vidéo en ligne, ses propres vidéos, ou des vidéos ajoutées par exemple via les champs personnalisés des articles.</p>
<p>Pour voir le résultat, vous pouvez vous rendre sur cette page : <a title="Video Sitemap" href="http://www.papygeek.com/video-sitemap.xml">http://www.papygeek.com/video-sitemap.xml</a></p>
<p>Il est aussi conseillé d&#8217;ajouter son plan sitemap dans <a href="https://www.google.com/webmasters/tools/home?hl=fr">Google Webmaster Tools</a>.</p>
<p><a href="http://www.papygeek.com/wp-content/uploads/2010/07/Video-Sitemap-Google-Webmaster-Tools.png"><img class="aligncenter size-medium wp-image-8999" title="Video Sitemap Google Webmaster Tools" src="http://www.papygeek.com/wp-content/uploads/2010/07/Video-Sitemap-Google-Webmaster-Tools-500x36.png" alt="Video Sitemap Google Webmaster Tools 500x36 Créer automatiquement un Sitemap Video sur WordPress" width="500" height="36" /></a></p>
<p>Et pour en savoir un peu plus sur les sitemaps vidéo, consulter <a href="http://www.google.com/support/webmasters/bin/topic.py?topic=10079">cette page de Google</a>, ou la vidéo ci-dessous :</p>
<p><object width="600" height="363"><param name="movie" value="http://www.youtube.com/v/lVEKhaI_RC4&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed  src="http://www.youtube.com/v/lVEKhaI_RC4&#038;fs=1" type="application/x-shockwave-flash" width="600" height="363" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://www.labnol.org/software/xml-video-sitemaps-for-google/14085/">Source</a>.</p>
<!-- google_ad_section_end -->
    <hr noshade style="margin:0;height:1px" />
    <p style="font-size: 78%;">&copy;<a href="http://www.papygeek.com">PapyGeek</a>, 2010. <a href="http://www.papygeek.com/wordpress/creer-automatiquement-un-sitemap-video-sur-wordpress/#comments">Voir les commentaires</a> de <a href="http://www.papygeek.com/wordpress/creer-automatiquement-un-sitemap-video-sur-wordpress/"><strong>"Créer automatiquement un Sitemap Video sur WordPress"</strong></a>.<br />
    Voir les autres articles class&eacute;s sous <a href="http://www.papygeek.com/category/wordpress/" title="Voir tous les articles dans WordPress" rel="category tag">WordPress</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.papygeek.com/wordpress/creer-automatiquement-un-sitemap-video-sur-wordpress/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
	<enclosure url="http://www.papygeek.com/wp-content/uploads/pth/thumb_Sitemap-Video-500x239.png" length="" type="image/jpeg" />
	<media:content url="http://www.papygeek.com/wp-content/uploads/pth/thumb_Sitemap-Video-500x239.png" medium="image" />
	<media:thumbnail url="http://www.papygeek.com/wp-content/uploads/pth/thumb_Sitemap-Video-500x239.png"  />
	<media:title type="html">Créer automatiquement un Sitemap Video sur WordPress</media:title>	</item>
		<item>
		<title>WordPress 2.8.3 : correctif pour le reset du password</title>
		<link>http://www.papygeek.com/wordpress/wordpress-2-8-3-correctif-pour-le-reset-du-password/</link>
		<comments>http://www.papygeek.com/wordpress/wordpress-2-8-3-correctif-pour-le-reset-du-password/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 16:48:15 +0000</pubDate>
		<dc:creator>Papy</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[adresse mail]]></category>
		<category><![CDATA[blogueurs]]></category>
		<category><![CDATA[confirmation]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[wp-login]]></category>

		<guid isPermaLink="false">http://www.papygeek.com/?p=7093</guid>
		<description><![CDATA[Une courte note pour les blogueurs sous WordPress 2.8 qui seraient victimes du reset de compte admin à répétition apparu sur la toile aujourd&#8217;hui. Pour rappel, un bug fait que la simple consultation de l&#8217;adresse http://votredomaine.tld/wp-login.php?action=rp&#38;key[]= envoie un nouveau mot de passe pour le premier utilisateur rencontré (souvent l&#8217;admin) sans demander de confirmation ni même [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Une courte note pour <strong>les blogueurs sous WordPress 2.8</strong> qui seraient victimes du <strong>reset de compte admin à répétition</strong> apparu sur la toile aujourd&#8217;hui.</p>
<p>Pour rappel, un bug fait que la simple consultation de l&#8217;adresse <a href="http://domaine.tld/wp-login.php?action=rp&amp;key[]=">http://votredomaine.tld/wp-login.php?action=rp&amp;key[]=</a> envoie un nouveau mot de passe pour le premier utilisateur rencontré (souvent l&#8217;admin) sans demander de confirmation ni même l&#8217;adresse mail de ce compte.</p>
<p>Le correctif officiel vient d&#8217;être fourni par l&#8217;équipe de WordPress, il faut donc modifier le fichier <strong>wp-login.php</strong> en remplaçant la ligne :</p>
<p><code>if ( empty( $key ) )</code></p>
<p>Par :</p>
<p><code>if ( empty( $key ) || is_array( $key ) )</code></p>
<p><span>Vous trouverez ça <a title="WordPress TRAC" href="http://core.trac.wordpress.org/changeset/11798">sur le TRAC de WordPress</a> et pouvez même <a href="http://core.trac.wordpress.org/export/11798/branches/2.8/wp-login.php">télécharger directement le fichier corrigé</a>.</span></p>
<p><span>Si vous n&#8217;avez pas de problème, une mise à jour devrait sûrement arriver d&#8217;ici peu.</span></p>
<p><span>Edit : la version 2.8.4 est déjà sortie!<br />
</span></p>
<!-- google_ad_section_end -->
    <hr noshade style="margin:0;height:1px" />
    <p style="font-size: 78%;">&copy;<a href="http://www.papygeek.com">PapyGeek</a>, 2009. <a href="http://www.papygeek.com/wordpress/wordpress-2-8-3-correctif-pour-le-reset-du-password/#comments">Voir les commentaires</a> de <a href="http://www.papygeek.com/wordpress/wordpress-2-8-3-correctif-pour-le-reset-du-password/"><strong>"WordPress 2.8.3 : correctif pour le reset du password"</strong></a>.<br />
    Voir les autres articles class&eacute;s sous <a href="http://www.papygeek.com/category/wordpress/" title="Voir tous les articles dans WordPress" rel="category tag">WordPress</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.papygeek.com/wordpress/wordpress-2-8-3-correctif-pour-le-reset-du-password/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
	<enclosure url="http://www.papygeek.com/wp-content/uploads/pth/thumb_defaultpp.jpg" length="" type="image/jpeg" />
	<media:content url="http://www.papygeek.com/wp-content/uploads/pth/thumb_defaultpp.jpg" medium="image" />
	<media:thumbnail url="http://www.papygeek.com/wp-content/uploads/pth/thumb_defaultpp.jpg"  />
	<media:title type="html">WordPress 2.8.3 : correctif pour le reset du password</media:title>	</item>
		<item>
		<title>FeedCount : Mise à jour suite au transfert des comptes sur Google</title>
		<link>http://www.papygeek.com/wordpress/feedcount-mise-a-jour-suite-au-transfert-des-comptes-sur-google/</link>
		<comments>http://www.papygeek.com/wordpress/feedcount-mise-a-jour-suite-au-transfert-des-comptes-sur-google/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 12:58:04 +0000</pubDate>
		<dc:creator>Papy</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[Feed]]></category>
		<category><![CDATA[FeedBurner]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[plugin WordPress]]></category>

		<guid isPermaLink="false">http://www.papygeek.com/?p=4458</guid>
		<description><![CDATA[Si vous utilisez le plugin WordPress FeedCount pour personnaliser l&#8217;affichage de votre nombre d&#8217;abonnés FeedBurner, vous devrez mettre à jour celui-ci si vous migrez votre compte sur feedburner.google.com. Cette migration étant obligatoire avant la fin du mois de février. Pour que le plugin continue à fonctionner correctement, il suffit de modifier l&#8217;URL de l&#8217;API utilisée [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Si vous utilisez <strong>le plugin WordPress</strong> <a title="FeedCount" href="http://www.mapelli.info/feed/feed-count-12">FeedCount</a> pour <strong>personnaliser l&#8217;affichage de votre nombre d&#8217;abonnés <a title="FeedBurner" href="http://www.feedburner.com/fb/a/home">FeedBurner</a></strong>, vous devrez mettre à jour celui-ci si vous migrez votre compte sur <strong>feedburner.google.com</strong>. Cette migration étant obligatoire avant la fin du mois de février.</p>
<p><a href="http://www.papygeek.com/feed/"><img src="http://www.papygeek.com/wp-content/uploads/2009/01/feedcount-mise-a-jour-suite-au-transfert-des-comptes-sur-google.png" alt="feedcount-mise-a-jour-suite-au-transfert-des-comptes-sur-google" title="feedcount-mise-a-jour-suite-au-transfert-des-comptes-sur-google" width="248" height="47" class="aligncenter size-full wp-image-4464" /></a></p>
<p>Pour que le plugin continue à fonctionner correctement, il suffit de modifier l&#8217;<acronym title="Uniform Resource Locator">URL</acronym> de l&#8217;<acronym title="Application Programming Interface">API</acronym> utilisée dans le code du plugin, et passer de :</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">http://api.feedburner.com/awareness/1.0/GetFeedData?uri=</pre></div></div>

<p>A :</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=</pre></div></div>

<p>La modification étant effectuée dans la version téléchargeable ci-dessous :</p>
Note: There is a file embedded within this post, please visit this post to download the file.
<p>Il ne vous reste donc plus qu&#8217;à mettre à jour votre plugin pour ceux l&#8217;utilisant.</p>
<p>Pour rappel, l&#8217;affichage du nombre d&#8217;abonnés s&#8217;effectue comme ceci :</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;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'fc_feedcount'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> fc_feedcount<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>Si vous voulez récupérer votre nombre d&#8217;abonnés sans plugin en PHP5, vous pouvez utiliser le code suivant :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$url</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=&lt;uri_feedburner&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$ch</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_RETURNTRANSFER<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_URL<span style="color: #339933;">,</span> <span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$xml</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SimpleXMLElement<span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$count</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$xml</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">feed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">entry</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'circulation'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Il vous faudra seulement modifier &lt;id_feedburner&gt; par l&#8217;identifiant de votre flux. Le nombre d&#8217;abonnés sera alors dans $count.</p>
<p>Maintenant, il va falloir être un peu patient pour que le compteur Feedburner arrête de faire du yoyo.</p>
<!-- google_ad_section_end -->
    <hr noshade style="margin:0;height:1px" />
    <p style="font-size: 78%;">&copy;<a href="http://www.papygeek.com">PapyGeek</a>, 2009. <a href="http://www.papygeek.com/wordpress/feedcount-mise-a-jour-suite-au-transfert-des-comptes-sur-google/#comments">Voir les commentaires</a> de <a href="http://www.papygeek.com/wordpress/feedcount-mise-a-jour-suite-au-transfert-des-comptes-sur-google/"><strong>"FeedCount : Mise à jour suite au transfert des comptes sur Google"</strong></a>.<br />
    Voir les autres articles class&eacute;s sous <a href="http://www.papygeek.com/category/wordpress/" title="Voir tous les articles dans WordPress" rel="category tag">WordPress</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.papygeek.com/wordpress/feedcount-mise-a-jour-suite-au-transfert-des-comptes-sur-google/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
	<enclosure url="http://www.papygeek.com/wp-content/uploads/pth/thumb_feedcount-mise-a-jour-suite-au-transfert-des-comptes-sur-google.png" length="" type="image/jpeg" />
	<media:content url="http://www.papygeek.com/wp-content/uploads/pth/thumb_feedcount-mise-a-jour-suite-au-transfert-des-comptes-sur-google.png" medium="image" />
	<media:thumbnail url="http://www.papygeek.com/wp-content/uploads/pth/thumb_feedcount-mise-a-jour-suite-au-transfert-des-comptes-sur-google.png"  />
	<media:title type="html">FeedCount : Mise à jour suite au transfert des comptes sur Google</media:title>	</item>
		<item>
		<title>WordPress : Plugin Articles liés + miniatures</title>
		<link>http://www.papygeek.com/wordpress/wordpress-plugin-articles-lies-miniatures/</link>
		<comments>http://www.papygeek.com/wordpress/wordpress-plugin-articles-lies-miniatures/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 10:46:22 +0000</pubDate>
		<dc:creator>Papy</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[activation]]></category>
		<category><![CDATA[attachments]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[miniature]]></category>
		<category><![CDATA[miniatures]]></category>
		<category><![CDATA[Navigation]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[plugin WordPress]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[Téléchargement]]></category>
		<category><![CDATA[thumb]]></category>
		<category><![CDATA[Upload]]></category>
		<category><![CDATA[vignettes]]></category>
		<category><![CDATA[WordPress 2.6]]></category>
		<category><![CDATA[WordPress 2.7]]></category>

		<guid isPermaLink="false">http://www.papygeek.com/?p=4431</guid>
		<description><![CDATA[Vous avez été nombreux à me demander comment réaliser la fonction d&#8217;articles liés utilisant des vignettes présent sur les articles du blog. Ce mode de navigation pour les articles liés a été inspiré par LifeHacker qui l&#8217;utilisait il y a quelques temps. Pour copier ce type de navigation, j&#8217;ai rapidement modifié le plugin Related Entries [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Vous avez été nombreux à me demander comment réaliser la fonction <strong>d&#8217;articles liés utilisant des vignettes</strong> présent sur les articles du blog.</p>
<p><a href="http://www.papygeek.com/wp-content/uploads/2009/01/wordpress-articles-lies-miniatures.png"><img class="aligncenter size-medium wp-image-4433" title="wordpress-articles-lies-miniatures" src="http://www.papygeek.com/wp-content/uploads/2009/01/wordpress-articles-lies-miniatures-499x162.png" alt="wordpress-articles-lies-miniatures" width="499" height="162" /></a></p>
<p>Ce mode de navigation pour les articles liés a été inspiré par <a title="LifeHacker" href="http://lifehacker.com/">LifeHacker</a> qui l&#8217;utilisait il y a quelques temps. Pour copier ce type de navigation, j&#8217;ai rapidement modifié le plugin <a title="Related Entries" href="http://wasabi.pbwiki.com/Related%20Entries">Related Entries</a> que j&#8217;utilisais déjà pour la fonction classique d&#8217;articles liés. J&#8217;ai ensuite intégré un autre plugin pour la génération des vignettes : <a title="Post Thumb Revisited" href="http://www.alakhnor.com/post-thumb">Post Thumb Revisited</a> (qui est plutôt à l&#8217;abandon en ce moment).</p>
<p>Un peu de javascript dégueulasse et tout ça semble fonctionner plutôt pas mal. Depuis, le plugin a été utilisé par <a title="2803" href="http://www.2803.fr/wordpress/image-related-post-plus-deffet-pour-la-navigation-connexe-3660/#comments">Henri de 2803</a>, qui m&#8217;a fait faire quelques modifications pour pouvoir se passer de <strong>Post Thumb Revisited</strong> et utiliser les miniatures/attachments de WordPress directement.</p>
<p><a href="http://www.papygeek.com/wp-content/uploads/2009/01/image-related-posts-2803.png"><img class="aligncenter size-medium wp-image-4434" title="image-related-posts-2803" src="http://www.papygeek.com/wp-content/uploads/2009/01/image-related-posts-2803-500x231.png" alt="image-related-posts-2803" width="500" height="231" /></a></p>
<p>Je n&#8217;avais pas encore proposé le plugin au téléchargement puisque je voulais rendre le code Javascript un peu moins intrusif (avec jQuery par exemple), mais finalement je n&#8217;ai jamais le temps donc je vais vous fournir le plugin tel quel.</p>
<p>Voici donc les fonctions disponibles avec ce plugin WordPress :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Related Posts - Utilise Post Thumbs Revisited - http://www.alakhnor.com/post-thumb</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> related_posts_thumbnails<span style="color: #009900;">&#40;</span><span style="color: #000088;">$limit</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">,</span> <span style="color: #000088;">$len</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #000088;">$before_title</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$after_title</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$before_post</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$after_post</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$show_pass_post</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #000088;">$show_excerpt</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>Cette fonction nécessite l&#8217;installation et l&#8217;activation du plugin <strong>Post Thumb Revisited</strong> (disponible plus bas dans la version légèrement modifiée que j&#8217;utilise.)</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Related Posts V2 - Utilise les vignettes intégrées de WordPress &gt; 2.6 (Attachments)</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> related_posts_thumbnails_v2<span style="color: #009900;">&#40;</span><span style="color: #000088;">$limit</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">,</span> <span style="color: #000088;">$len</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #000088;">$before_title</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$after_title</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$before_post</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$after_post</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$show_pass_post</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #000088;">$show_excerpt</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>Cette fonction ne nécessite pas de plugin particulier.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Related Posts 404 -  Utilise Post Thumbs Revisited pour les pages d'erreur 404 - http://www.alakhnor.com/post-thumb</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> related_posts_thumbnails_404<span style="color: #009900;">&#40;</span><span style="color: #000088;">$limit</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">,</span> <span style="color: #000088;">$len</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #000088;">$before_title</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$after_title</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$before_post</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$after_post</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$show_pass_post</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #000088;">$show_excerpt</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>Une fonction plutôt intéressante pour les visiteurs qui permet d&#8217;afficher des propositions d&#8217;articles sur les pages d&#8217;erreur 404 en fonction des mots clés de l&#8217;<acronym title="Uniform Resource Locator">URL</acronym> tapée (si vous utilisez des <acronym title="Uniform Resource Locator">URL</acronym> réécrites).</p>
<p>Un exemple pratique :<br />
Si on cherche l&#8217;article <a href="http://www.papygeek.com/wordpress/les-meilleurs-plugins/" rel="nofollow">http://www.papygeek.com/wordpress/les-meilleurs-plugins/</a> qui n&#8217;existe pas sur mon blog, on obtient alors la page d&#8217;erreur suivante :<br />
<a href="http://www.papygeek.com/wp-content/uploads/2009/01/erreur-sur-papy-geek.png"><img src="http://www.papygeek.com/wp-content/uploads/2009/01/erreur-sur-papy-geek-500x352.png" alt="erreur-sur-papy-geek" title="erreur-sur-papy-geek" width="500" height="352" class="aligncenter size-medium wp-image-4435" /></a></p>
<p>Ce qui est relativement visuel pour les âmes perdues&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Related Posts Random -  Utilise Post Thumbs Revisited pour afficher des articles liés au hasard - http://www.alakhnor.com/post-thumb</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> related_posts_thumbnails_random<span style="color: #009900;">&#40;</span><span style="color: #000088;">$limit</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">,</span> <span style="color: #000088;">$len</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #000088;">$before_title</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$after_title</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$before_post</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$after_post</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$show_pass_post</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #000088;">$show_excerpt</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>Cette fonction permet l&#8217;affichage d&#8217;articles au hasard. Ce n&#8217;est donc plus vraiment des articles liés, mais peut servir pour suggérer d&#8217;autres pages tout de même.</p>
<p>Voici maintenant comment intégrer la fonction <strong>related_posts_thumbnails</strong> dans le fichier <strong>single.php</strong> :</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>is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'related_posts_thumbnails'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;div id=&quot;relatedarticles&quot;&gt;
		&lt;h3&gt;Articles liés :&lt;/h3&gt;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> related_posts_thumbnails<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;/div&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>(Même chose avec related_posts_thumbnails_v2).</p>
<p>Et la fonction <strong>related_posts_thumbnails_404</strong> dans <strong>404.php</strong> :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;div id=&quot;relatedarticles&quot;&gt;
	&lt;h2&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$terms</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>... ???&lt;/h2&gt;
	&lt;p&gt;Vous n'avez pas trouvé votre bonheur ? Ce que vous recherchez est peut-être ici :&lt;br /&gt;
		<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;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'related_posts_thumbnails_404'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> related_posts_thumbnails_404<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'10'</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>
	&lt;/p&gt;
&lt;/div&gt;</pre></div></div>

<p>Pour ici afficher 10 vignettes sur la page d&#8217;erreur.</p>
<p>Et voici donc les liens de téléchargement :</p>
Note: There is a file embedded within this post, please visit this post to download the file.
Note: There is a file embedded within this post, please visit this post to download the file.
<p>Allez, bidouillez bien maintenant!</p>
<p class="warning">Le plugin a été développé pour fonctionner sur ma configuration seulement, il n&#8217;est donc pas garanti qu&#8217;il fonctionne sur votre installation de WordPress. Si vous faites des modifications, n&#8217;hésitez pas à me les transmettre.</p>
<!-- google_ad_section_end -->
    <hr noshade style="margin:0;height:1px" />
    <p style="font-size: 78%;">&copy;<a href="http://www.papygeek.com">PapyGeek</a>, 2009. <a href="http://www.papygeek.com/wordpress/wordpress-plugin-articles-lies-miniatures/#comments">Voir les commentaires</a> de <a href="http://www.papygeek.com/wordpress/wordpress-plugin-articles-lies-miniatures/"><strong>"WordPress : Plugin Articles liés + miniatures"</strong></a>.<br />
    Voir les autres articles class&eacute;s sous <a href="http://www.papygeek.com/category/wordpress/" title="Voir tous les articles dans WordPress" rel="category tag">WordPress</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.papygeek.com/wordpress/wordpress-plugin-articles-lies-miniatures/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
	
	<enclosure url="http://www.papygeek.com/wp-content/uploads/pth/thumb_wordpress-articles-lies-miniatures.png" length="" type="image/jpeg" />
	<media:content url="http://www.papygeek.com/wp-content/uploads/pth/thumb_wordpress-articles-lies-miniatures.png" medium="image" />
	<media:thumbnail url="http://www.papygeek.com/wp-content/uploads/pth/thumb_wordpress-articles-lies-miniatures.png"  />
	<media:title type="html">WordPress : Plugin Articles liés + miniatures</media:title>	</item>
		<item>
		<title>WordPress 2.7 disponible au téléchargement</title>
		<link>http://www.papygeek.com/wordpress/wordpress-27-disponible-au-telechargement/</link>
		<comments>http://www.papygeek.com/wordpress/wordpress-27-disponible-au-telechargement/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 08:03:47 +0000</pubDate>
		<dc:creator>Papy</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[A à Z]]></category>
		<category><![CDATA[Anglais]]></category>
		<category><![CDATA[automatique]]></category>
		<category><![CDATA[De A à Z]]></category>
		<category><![CDATA[Fichier]]></category>
		<category><![CDATA[fonction]]></category>
		<category><![CDATA[fonctionnalité]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[Mise à jour]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[Qualité]]></category>
		<category><![CDATA[sortie]]></category>
		<category><![CDATA[Téléchargement]]></category>
		<category><![CDATA[télécharger]]></category>
		<category><![CDATA[Télécharger WordPress 2.7]]></category>
		<category><![CDATA[Traduction]]></category>
		<category><![CDATA[tuto]]></category>
		<category><![CDATA[version]]></category>
		<category><![CDATA[WordPress 2.7]]></category>

		<guid isPermaLink="false">http://www.papygeek.com/?p=3876</guid>
		<description><![CDATA[C&#8217;est fait! Je vous ai trop parlé de la version 2.7 de WordPress et de ses nouveautés pour ne pas vous annoncer sa sortie! Donc voici le lien qui s&#8217;est tant fait attendre : Télécharger WordPress 2.7 (“Coltrane”) Et voici une petite présentation en vidéo (en anglais, mais on comprend facilement) : Pour vous aider, [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>C&#8217;est fait! Je vous ai trop parlé <a title="WordPress 2.7" href="http://www.papygeek.com/wordpress/wordpress-27-de-a-a-z/">de la version 2.7 de WordPress et de ses nouveautés</a> pour ne pas vous annoncer <a title="WordPress 2.7" href="http://wordpress.org/download/">sa sortie</a>!</p>
<p>Donc voici le lien qui s&#8217;est tant fait attendre :</p>
<p class="download"><a href="http://wordpress.org/latest.zip">Télécharger WordPress 2.7 (“Coltrane”)</a></p>
<p>Et voici une petite présentation en vidéo (en anglais, mais on comprend facilement) :</p>
<p><embed src="http://v.wordpress.com/hFr8Nyar" type="application/x-shockwave-flash" width="640" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></p>
<p>Pour vous aider, je vous rappelle quelques liens :</p>
<ul>
<li><a href="http://codex.wordpress.org/Installing_WordPress">Le guide d&#8217;installation de WordPress officiel</a>,</li>
<li><a href="http://www.papygeek.com/wordpress/tuto-blog-wordpress-tester-wordpress-27-en-local/">Tuto Blog WordPress : tester WordPress 2.7 en local</a>,</li>
<li><a href="http://www.papygeek.com/wordpress/wordpress-27-de-a-a-z/">WordPress 2.7 de A à Z</a> : le guide détaillé de toutes les fonctionnalités de la version 2.7 et comment en profiter,</li>
<li><a href="http://www.papygeek.com/wordpress/wordpress-27-rc1/">Le petit patch pour faire fonctionner Simple Tags sur WordPress 2.7</a>,</li>
<li>La dernière version <a href="http://svn.automattic.com/wordpress-i18n/fr_FR/branches/2.7/messages/">des fichiers de traduction FR</a>, <a href="http://fr.wordpress.org/">en attendant la version française</a>.</li>
</ul>
<p>Les qualités de cette version sont indéniables, donc n&#8217;hésitez pas. Et avec la nouvelle fonction de mise à jour automatique, cette mise à jour manuelle devrait être la dernière!</p>
<!-- google_ad_section_end -->
    <hr noshade style="margin:0;height:1px" />
    <p style="font-size: 78%;">&copy;<a href="http://www.papygeek.com">PapyGeek</a>, 2008. <a href="http://www.papygeek.com/wordpress/wordpress-27-disponible-au-telechargement/#comments">Voir les commentaires</a> de <a href="http://www.papygeek.com/wordpress/wordpress-27-disponible-au-telechargement/"><strong>"WordPress 2.7 disponible au téléchargement"</strong></a>.<br />
    Voir les autres articles class&eacute;s sous <a href="http://www.papygeek.com/category/wordpress/" title="Voir tous les articles dans WordPress" rel="category tag">WordPress</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.papygeek.com/wordpress/wordpress-27-disponible-au-telechargement/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
	<enclosure url="http://www.papygeek.com/wp-content/uploads/pth/thumb_defaultpp.jpg" length="" type="image/jpeg" />
	<media:content url="http://www.papygeek.com/wp-content/uploads/pth/thumb_defaultpp.jpg" medium="image" />
	<media:thumbnail url="http://www.papygeek.com/wp-content/uploads/pth/thumb_defaultpp.jpg"  />
	<media:title type="html">WordPress 2.7 disponible au téléchargement</media:title>	</item>
		<item>
		<title>WordPress 2.7 RC1</title>
		<link>http://www.papygeek.com/wordpress/wordpress-27-rc1/</link>
		<comments>http://www.papygeek.com/wordpress/wordpress-27-rc1/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 08:04:42 +0000</pubDate>
		<dc:creator>Papy</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[astuce]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Mise à jour]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[Projet]]></category>
		<category><![CDATA[Release]]></category>
		<category><![CDATA[tags]]></category>
		<category><![CDATA[télécharger]]></category>
		<category><![CDATA[Télécharger WordPress 2.7]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[version]]></category>
		<category><![CDATA[version beta]]></category>
		<category><![CDATA[WordPress 2.7]]></category>
		<category><![CDATA[WordPress 2.7 RC1]]></category>

		<guid isPermaLink="false">http://www.papygeek.com/?p=3682</guid>
		<description><![CDATA[Je vous parlais depuis un petit moment de cette version 2.7 de WordPress qui devait sortir au mois de Novembre. Et bien c&#8217;est raté pour le mois de Novembre puisque c&#8217;est la version Release Canditate 1 qui vient d&#8217;être publiée. J&#8217;utilise la version beta depuis quelques temps, et WordPress 2.7 RC1 semble d&#8217;une qualité irréprochable. [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Je vous parlais depuis un petit moment de cette <a title="WordPress 2.7" href="http://www.papygeek.com/wordpress/wordpress-27-de-a-a-z/">version 2.7 de WordPress</a> qui devait sortir au mois de Novembre. Et bien <a title="WordPress 2.7" href="http://wordpress.org/about/roadmap/">c&#8217;est raté</a> pour le mois de Novembre puisque c&#8217;est la version <a title="WordPress 2.7 RC1" href="http://wordpress.org/development/2008/12/wordpress-27-release-candidate-1/">Release Canditate 1</a> qui vient d&#8217;être publiée.</p>
<p><a href="http://www.papygeek.com/wp-content/uploads/2008/12/wordpress-e280ba-about-c2bb-roadmap.png"><img class="aligncenter size-medium wp-image-3686" title="wordpress-e280ba-about-c2bb-roadmap" src="http://www.papygeek.com/wp-content/uploads/2008/12/wordpress-e280ba-about-c2bb-roadmap-500x153.png" alt="wordpress-e280ba-about-c2bb-roadmap" width="500" height="153" /></a></p>
<p>J&#8217;utilise la version beta depuis quelques temps, et <strong>WordPress 2.7 RC1</strong> semble d&#8217;une qualité irréprochable. Pour ceux encore sur la version 2.6, le changement va sûrement être apprécié avec <a title="WordPress 2.7" href="http://www.papygeek.com/wordpress/wordpress-27-de-a-a-z/">toutes les nouvelles fonctions de WordPress 2.7</a>.</p>
<p>Une des fonctions appréciable est d&#8217;ailleurs de pouvoir effectuer les mises à jour de WordPress d&#8217;un seul clic. Et pour moi ça fonctionne du tonnerre. Il suffit de cliquer sur le lien &laquo;&nbsp;<a title="WordPress 2.7 update" href="wp-admin/update-core.php">stay updated</a>&nbsp;&raquo; ou &laquo;&nbsp;<a title="WordPress 2.7 update" href="wp-admin/update-core.php">rester à jour</a>&nbsp;&raquo; en français, et la mise à jour s&#8217;effectue en quelques secondes.</p>
<p>Le design du tableau de bord est maintenant très proche du <a title="WordPress 2.7 Design" href="http://wordpress.org/development/2008/10/the-visual-design-of-27/">projet initial</a> qui devait ressembler à ça :</p>
<p><a href="http://www.papygeek.com/wp-content/uploads/2008/12/dashboard.png"><img class="aligncenter size-medium wp-image-3683" title="dashboard" src="http://www.papygeek.com/wp-content/uploads/2008/12/dashboard-396x500.png" alt="dashboard" width="396" height="500" /></a></p>
<p>Et voici ce que ça donne sur mon blog (sans le Flash, pas merci ScreenGrab <img src='http://www.papygeek.com/wp-includes/images/smilies/wink.png' alt=';)' class='wp-smiley' title="WordPress 2.7 RC1" />  ):</p>
<p><a href="http://www.papygeek.com/wp-content/uploads/2008/12/papy-geek-e280ba-tableau-de-bord-wordpress-27-rc1.png"><img class="aligncenter size-full wp-image-3685" title="papy-geek-e280ba-tableau-de-bord-wordpress-27-rc1" src="http://www.papygeek.com/wp-content/uploads/2008/12/papy-geek-e280ba-tableau-de-bord-wordpress-27-rc1.png" alt="papy-geek-e280ba-tableau-de-bord-wordpress-27-rc1" width="381" height="500" /></a></p>
<p>Bref, vous pouvez tester sans attendre, <a title="Compatibilité plugins" href="http://codex.wordpress.org/Plugins/Plugin_Compatibility/2.7">presque tous les plugins sont compatibles</a>. Il n&#8217;y a que <em>Simple Tags</em> qui m&#8217;a posé problème mais il faut seulement quelques secondes pour <a title="Correctif Simple Tags" href="http://code.google.com/p/simple-tags/issues/detail?id=100#c2">appliquer le correctif</a> qui consiste à remplacer dans le fichier <em>simple-tags.php</em> cette ligne :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><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;">$wp_version</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'2.5'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span> <span style="color: #339933;">||</span> <span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_version</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'2.6'</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></pre></div></div>

<p>Par celle-là :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><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;">$wp_version</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'2.5'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span> <span style="color: #339933;">||</span> <span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_version</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'2.6'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span> <span style="color: #339933;">||</span>
<span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_version</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'2.7'</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></pre></div></div>

<p>Facile! Merci <a href="http://www.jeanbaptistebeaux.fr/rendre-simple-tags-compatible-avec-wordpress-27">Jean-Baptiste</a> pour l&#8217;astuce.</p>
<p class="download"><a href="http://wordpress.org/wordpress-2.7-RC1.zip">Télécharger WordPress 2.7 RC1</a>.</p>
<!-- google_ad_section_end -->
    <hr noshade style="margin:0;height:1px" />
    <p style="font-size: 78%;">&copy;<a href="http://www.papygeek.com">PapyGeek</a>, 2008. <a href="http://www.papygeek.com/wordpress/wordpress-27-rc1/#comments">Voir les commentaires</a> de <a href="http://www.papygeek.com/wordpress/wordpress-27-rc1/"><strong>"WordPress 2.7 RC1"</strong></a>.<br />
    Voir les autres articles class&eacute;s sous <a href="http://www.papygeek.com/category/wordpress/" title="Voir tous les articles dans WordPress" rel="category tag">WordPress</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.papygeek.com/wordpress/wordpress-27-rc1/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
	<enclosure url="http://www.papygeek.com/wp-content/uploads/pth/thumb_wordpress-e280ba-about-c2bb-roadmap.png" length="" type="image/jpeg" />
	<media:content url="http://www.papygeek.com/wp-content/uploads/pth/thumb_wordpress-e280ba-about-c2bb-roadmap.png" medium="image" />
	<media:thumbnail url="http://www.papygeek.com/wp-content/uploads/pth/thumb_wordpress-e280ba-about-c2bb-roadmap.png"  />
	<media:title type="html">WordPress 2.7 RC1</media:title>	</item>
		<item>
		<title>Tuto Blog WordPress : tester WordPress 2.7 en local</title>
		<link>http://www.papygeek.com/wordpress/tuto-blog-wordpress-tester-wordpress-27-en-local/</link>
		<comments>http://www.papygeek.com/wordpress/tuto-blog-wordpress-tester-wordpress-27-en-local/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 19:49:09 +0000</pubDate>
		<dc:creator>Papy</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[apache 2]]></category>
		<category><![CDATA[apache conf]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[base de données]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[compatibilité]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[easyphp]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[Fonctions]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux windows]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[Mise à jour]]></category>
		<category><![CDATA[mise à jour de WordPress]]></category>
		<category><![CDATA[mod rewrite]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[nouvelle version]]></category>
		<category><![CDATA[Outils]]></category>
		<category><![CDATA[php 5]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[serveur web]]></category>
		<category><![CDATA[version finale]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[WordPress 2.7]]></category>
		<category><![CDATA[xampp]]></category>
		<category><![CDATA[xampplite]]></category>

		<guid isPermaLink="false">http://www.papygeek.com/?p=2825</guid>
		<description><![CDATA[La migration vers WordPress 2.7 risque d&#8217;être moins simple que d&#8217;habitude si l&#8217;on veut profiter de toutes les nouveautés. Aujourd&#8217;hui, WordPress 2.7 beta 1 vient de sortir, c&#8217;est donc le bon moment pour se préparer à la sortie de la version finale, qui devrait finalement arriver vers la fin du mois de Novembre suite à [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>La migration vers <a title="WordPress 2.7" href="http://www.papygeek.com/wordpress/wordpress-27-de-a-a-z/">WordPress 2.7</a> risque d&#8217;être moins simple que d&#8217;habitude si l&#8217;on veut profiter de <a title="WordPress 2.7 nouveautés" href="http://www.papygeek.com/wordpress/wordpress-27-de-a-a-z/">toutes les nouveautés</a>.<br />
Aujourd&#8217;hui, <a title="WordPress 2.7 beta1" href="http://wordpress.org/development/2008/11/wordpress-27-beta-1/">WordPress 2.7 beta 1</a> vient de sortir, c&#8217;est donc le bon moment pour <strong>se préparer à la sortie de la version finale</strong>, qui devrait finalement arriver vers la fin du mois de Novembre suite à un retard de 2 semaines environ. Le 10 Novembre qui devait être la date de sortie de la version finale verra désormais arriver <strong>la version RC1</strong>.</p>
<p>Pour éviter de trop perturber votre blog en ligne, une bonne pratique consiste à <strong>récupérer toutes vos données et à les installer en local sur votre PC</strong>. Vous pourrez ensuite installer la nouvelle version et observer les dégâts pour éventuellement corriger le tir.</p>
<h2>Etape 1 : le serveur Web</h2>
<p>La première chose à faire est d&#8217;installer un serveur Web en local sur votre machine. Comme la plupart d&#8217;entre vous doivent utiliser le trio Apache/<acronym title="Pre-Hypertext Processing">PHP</acronym>/MySQL, je vais donc prendre cet exemple. Il existe plusieurs packages connus permettant d&#8217;installer directement ces 3 produits comme <a title="EasyPHP" href="http://www.easyphp.org/">EasyPHP</a>, <a title="WampServer" href="http://www.wampserver.com/">WampServer</a> ou encore <a title="XAMPP" href="http://www.apachefriends.org/fr/xampp.html">XAMPP</a> (pour Apache, MySQL, , <acronym title="Pre-Hypertext Processing">PHP</acronym> et <acronym title="Practical Extraction and Report Language">Perl</acronym>). C&#8217;est <a title="XAMPP" href="http://www.apachefriends.org/fr/xampp-windows.html">ce dernier</a> que je vais utiliser, <strong>le package étant à jour et disponible pour Linux, Windows, MacOS X et Solaris</strong>.</p>
<p><a href="http://www.papygeek.com/wp-content/uploads/2008/11/apache-friends-xampp-pour-windows.png"><img class="aligncenter size-medium wp-image-2826" title="apache-friends-xampp-pour-windows" src="http://www.papygeek.com/wp-content/uploads/2008/11/apache-friends-xampp-pour-windows-500x216.png" alt="apache friends xampp pour windows 500x216 Tuto Blog Wordpress : tester WordPress 2.7 en local" width="500" height="216" /></a></p>
<p>Comme vous êtes nombreux sous Windows, je vais donc utiliser <a title="XAMPP installation Windows" href="http://www.apachefriends.org/download.php?xampplite-win32-1.6.8.exe">ce package de XAMPP Lite pour Windows</a> comprenant Apache 2.2.9, <acronym title="Pre-Hypertext Processing">PHP</acronym> 5.2.6, MySQL 5.0.67 et phpMyAdmin 2.11.9.2. Si vous utilisez encore PHP4, commencez par migrer vers PHP5, ça ne vous fera pas de mal <img src='http://www.papygeek.com/wp-includes/images/smilies/wink.png' alt=';)' class='wp-smiley' title="Tuto Blog Wordpress : tester WordPress 2.7 en local" /> </p>
<p><a href="http://www.papygeek.com/wp-content/uploads/2008/11/telechargement-xampp-lite.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/11/telechargement-xampp-lite-499x142.png" alt="telechargement xampp lite 499x142 Tuto Blog Wordpress : tester WordPress 2.7 en local" title="telechargement-xampp-lite" width="499" height="142" class="aligncenter size-medium wp-image-2827" /></a></p>
<p>Lancer l&#8217;exécutable et le décompresser par exemple à la racine de C: :<br />
<a href="http://www.papygeek.com/wp-content/uploads/2008/11/xampp-7zip.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/11/xampp-7zip.png" alt="xampp 7zip Tuto Blog Wordpress : tester WordPress 2.7 en local" title="xampp-7zip" width="358" height="163" class="aligncenter size-medium wp-image-2828" /></a></p>
<p>Aller ensuite dans <strong>C:\xampplite</strong> et lancer <strong>setup_xampp.bat</strong> :<br />
<a href="http://www.papygeek.com/wp-content/uploads/2008/11/setup-xampp.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/11/setup-xampp-500x251.png" alt="setup xampp 500x251 Tuto Blog Wordpress : tester WordPress 2.7 en local" title="setup-xampp" width="500" height="251" class="aligncenter size-medium wp-image-2829" /></a></p>
<p>Pour activer le <strong>mod_rewrite</strong> et permettre une structure personnalisée des permaliens dans WordPress, il faut modifier le fichier <strong>C:\xampplite\apache\conf\apache2.conf</strong>. Recherchez la ligne :</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;">#LoadModule rewrite_module modules/mod_rewrite.so</span></pre></div></div>

<p>Et décommentez là :</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">LoadModule</span> rewrite_module modules/mod_rewrite.so</pre></div></div>

<p>Lancer ensuite <strong>xampp-control.exe</strong> et démarrer Apache et MySQL (en validant les éventuels avertissements sous XP SP2 ou Vista) :<br />
<a href="http://www.papygeek.com/wp-content/uploads/2008/11/xampp-control-panel.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/11/xampp-control-panel.png" alt="xampp control panel Tuto Blog Wordpress : tester WordPress 2.7 en local" title="xampp-control-panel" width="454" height="361" class="aligncenter size-medium wp-image-2830" /></a></p>
<p>Ouvrez ensuite votre navigateur sur <strong>http://localhost/</strong> :<br />
<a href="http://www.papygeek.com/wp-content/uploads/2008/11/xampp-localhost.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/11/xampp-localhost-500x112.png" alt="xampp localhost 500x112 Tuto Blog Wordpress : tester WordPress 2.7 en local" title="xampp-localhost" width="500" height="112" class="aligncenter size-medium wp-image-2831" /></a></p>
<p>Choisissez ensuite la langue pour vous retrouver sur la page d&#8217;accueil de Xampp :<br />
<a href="http://www.papygeek.com/wp-content/uploads/2008/11/xampp-version-168.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/11/xampp-version-168-500x297.png" alt="xampp version 168 500x297 Tuto Blog Wordpress : tester WordPress 2.7 en local" title="xampp-version-168" width="500" height="297" class="aligncenter size-medium wp-image-2832" /></a></p>
<p>Lancer ensuite <strong>PHPMyAdmin</strong> avec le lien dans la catégorie outils :<br />
<a href="http://www.papygeek.com/wp-content/uploads/2008/11/localhost-localhost-phpmyadmin-21192.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/11/localhost-localhost-phpmyadmin-21192-500x242.png" alt="localhost localhost phpmyadmin 21192 500x242 Tuto Blog Wordpress : tester WordPress 2.7 en local" title="localhost-localhost-phpmyadmin-21192" width="500" height="242" class="aligncenter size-medium wp-image-2833" /></a></p>
<h2>Etape 2 : récupérer sa base de données WordPress</h2>
<p>Le plus simple pour récupérer la base de données est d&#8217;utiliser la fonction intégrée dans WordPress ou de récupérer simplement le dernier backup que vous devez avoir dans vos mails si vous utilisez comme il se doit <a href="http://www.ilfilosofo.com/blog/wp-db-backup">WordPress Database Backup</a>.<br />
Vous pouvez également suivre ce guide sur le codex de WordPress : <a href="http://codex.wordpress.org/Backing_Up_Your_Database">Backing Up Your Database</a>.</p>
<p>Dans <strong>WordPress</strong>, allez dans <strong>Gérer->Backup</strong>, cochez tout et cliquez sur <strong>Backup Now</strong> en sélectionnant <strong>Download to your Computer</strong> :<br />
<a href="http://www.papygeek.com/wp-content/uploads/2008/11/papy-geek-e280ba-backup-wordpress.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/11/papy-geek-e280ba-backup-wordpress.png" alt="papy geek e280ba backup wordpress Tuto Blog Wordpress : tester WordPress 2.7 en local" title="papy-geek-e280ba-backup-wordpress" width="494" height="247" class="aligncenter size-medium wp-image-2834" /></a></p>
<p>Vous devriez alors obtenir un fichier à l&#8217;extension <strong>.sql.gz</strong>.</p>
<p>Sur PHPMyAdmin, créer une nouvelle base <strong>wordpress</strong> en <strong>utf8_general_ci</strong> :<br />
<a href="http://www.papygeek.com/wp-content/uploads/2008/11/wordpress-utf8_general_ci-phpmyadmin-21192.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/11/wordpress-utf8_general_ci-phpmyadmin-21192.png" alt="wordpress utf8 general ci phpmyadmin 21192 Tuto Blog Wordpress : tester WordPress 2.7 en local" title="wordpress-utf8_general_ci-phpmyadmin-21192" width="450" height="51" class="aligncenter size-medium wp-image-2848" /></a></p>
<p><a href="http://www.papygeek.com/wp-content/uploads/2008/11/localhost-localhost-wordpress-phpmyadmin-21192.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/11/localhost-localhost-wordpress-phpmyadmin-21192.png" alt="localhost localhost wordpress phpmyadmin 21192 Tuto Blog Wordpress : tester WordPress 2.7 en local" title="localhost-localhost-wordpress-phpmyadmin-21192" width="333" height="58" class="aligncenter size-medium wp-image-2836" /></a></p>
<p>Cliquer ensuite sur l&#8217;onglet &laquo;&nbsp;<strong>Importer</strong>&nbsp;&raquo; et utiliser le fichier en <strong>.sql.gz</strong> précédent en cliquant sur <strong>Parcourir</strong> puis <strong>Exécuter</strong> :<br />
<a href="http://www.papygeek.com/wp-content/uploads/2008/11/wordpress-phpmyadmin-21192-import.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/11/wordpress-phpmyadmin-21192-import.png" alt="wordpress phpmyadmin 21192 import Tuto Blog Wordpress : tester WordPress 2.7 en local" title="wordpress-phpmyadmin-21192-import" width="448" height="57" class="aligncenter size-medium wp-image-2837" /></a></p>
<h2>Etape 3 : récupération des fichiers de votre blog</h2>
<p>Téléchargez avec votre client <acronym title="File Transfer Protocol">FTP</acronym> habituel tous les fichiers de WordPress présents sur votre hébergement et copiez-les dans <strong>C:\xampplite\htdocs\wordpress</strong> :</p>
<p><a href="http://www.papygeek.com/wp-content/uploads/2008/11/transfert.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/11/transfert-500x409.png" alt="transfert 500x409 Tuto Blog Wordpress : tester WordPress 2.7 en local" title="transfert" width="500" height="409" class="aligncenter size-medium wp-image-2838" /></a></p>
<p>Vous pouvez au passage vous contenter des dossiers <strong>languages</strong>, <strong>plugins</strong> et <strong>themes</strong> dans <strong>wp-content</strong> pour ne pas rapatrier toutes vos images contenues dans <strong>uploads</strong> et ainsi gagner du temps. Les liens de vos billets afficheront de toutes façons les images présentes en ligne.</p>
<h2>Etape 4 : paramétrage de WordPress</h2>
<p>Vos fichiers de WordPress contiennent des valeurs pour votre blog en ligne, il faut les adapter pour relier votre blog à votre base locale. Editer donc le fichier <strong>wp-config.php</strong> avec les valeurs suivantes :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DB_NAME'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wordpress'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    <span style="color: #666666; font-style: italic;">// The name of the database</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DB_USER'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'root'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>     <span style="color: #666666; font-style: italic;">// Your MySQL username</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DB_PASSWORD'</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: #666666; font-style: italic;">// ...and password</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DB_HOST'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'localhost'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    <span style="color: #666666; font-style: italic;">// 99% chance you won't need to change this value</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DB_CHARSET'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'utf8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DB_COLLATE'</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: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_SITEURL'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'http://localhost/wordpress'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_HOME'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'http://localhost/wordpress'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>Supprimez</strong> également l&#8217;éventuelle ligne suivante pour que votre mot de passe reste accessible :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'SECRET_KEY'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'SECRET'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Les premières lignes concernent le paramétrage de la base locale <strong>wordpress</strong> sur <strong>localhost</strong>. Les deux dernières lignes sont très pratiques et permettent d&#8217;ignorer les paramètres présents dans les options de WordPress et contenant l&#8217;<acronym title="Uniform Resource Locator">URL</acronym> du blog. Ici, on indique la nouvelle <acronym title="Uniform Resource Locator">URL</acronym> en local : <strong>http://localhost/wordpress</strong>.</p>
<p>Il faudra également éventuellement en fonction de votre environnement faire le ménage dans votre .htaccess qui devrait maintenant ressembler à ça :</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;"># BEGIN WordPress</span>
&lt;<span style="color: #000000; font-weight:bold;">IfModule</span> mod_rewrite.c&gt;
<span style="color: #00007f;">RewriteEngine</span> <span style="color: #0000ff;">On</span>
<span style="color: #00007f;">RewriteBase</span> /wordpress/
<span style="color: #00007f;">RewriteCond</span> %{REQUEST_FILENAME} !-f
<span style="color: #00007f;">RewriteCond</span> %{REQUEST_FILENAME} !-d
<span style="color: #00007f;">RewriteRule</span> . /wordpress/index.php [L]
&lt;/<span style="color: #000000; font-weight:bold;">IfModule</span>&gt;
<span style="color: #adadad; font-style: italic;"># END WordPress</span></pre></div></div>

<p>Vous pouvez régénérer ces règles en allant dans l&#8217;administration de WordPress dans <strong>Réglages->Permaliens</strong> et en sauvegardant.</p>
<h2>Etape 5 : test du blog en local dans la version actuelle</h2>
<p>Il suffit de se connecter à l&#8217;url <strong>http://localhost/wordpress</strong> pour voir apparaitre votre blog local, qui doit normalement être identique à votre blog en ligne.</p>
<p><a href="http://www.papygeek.com/wp-content/uploads/2008/11/papy-geek-un-blog-different-sur-tous-les-bons-trucs-du-web1.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/11/papy-geek-un-blog-different-sur-tous-les-bons-trucs-du-web1-500x236.png" alt="papy geek un blog different sur tous les bons trucs du web1 500x236 Tuto Blog Wordpress : tester WordPress 2.7 en local" title="papy-geek-un-blog-different-sur-tous-les-bons-trucs-du-web1" width="500" height="236" class="aligncenter size-medium wp-image-2841" /></a></p>
<h2>Etape 6 : Mise à jour de WordPress vers la version 2.7</h2>
<p>Les étapes sont détaillées sur la page &laquo;&nbsp;<a href="http://codex.wordpress.org/Upgrading_WordPress">Upgrading WordPress</a>&laquo;&nbsp;.<br />
Commencez par <strong>désactiver tous vos plugins</strong>. Téléchargez <strong>la dernière version disponible de WordPress</strong>. Dans notre cas il s&#8217;agit de <a href="http://wordpress.org/wordpress-2.7-beta1.zip">WordPress 2.7 Beta 1</a>.</p>
<p>Décompressez le fichier téléchargé dans <strong>C:\xampplite\htdocs</strong> en écrasant les fichiers existants.</p>
<p>Aller ensuite à l&#8217;adresse <strong>http://localhost/wordpress/wp-admin/upgrade.php</strong> et cliquez sur &laquo;&nbsp;<strong>Mettre à jour WordPress</strong>&nbsp;&raquo; :<br />
<a href="http://www.papygeek.com/wp-content/uploads/2008/11/wordpress-e280ba-mise-a-jour-1.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/11/wordpress-e280ba-mise-a-jour-1-499x185.png" alt="wordpress e280ba mise a jour 1 499x185 Tuto Blog Wordpress : tester WordPress 2.7 en local" title="wordpress-e280ba-mise-a-jour-1" width="499" height="185" class="aligncenter size-medium wp-image-2842" /></a></p>
<p>Cliquez ensuite sur &laquo;&nbsp;<strong>Continuer</strong>&nbsp;&raquo; :<br />
<a href="http://www.papygeek.com/wp-content/uploads/2008/11/wordpress-e280ba-mise-a-jour-2.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/11/wordpress-e280ba-mise-a-jour-2-500x163.png" alt="wordpress e280ba mise a jour 2 500x163 Tuto Blog Wordpress : tester WordPress 2.7 en local" title="wordpress-e280ba-mise-a-jour-2" width="500" height="163" class="aligncenter size-medium wp-image-2843" /></a></p>
<p>Et voilà le travail!<br />
<div id="attachment_2844" class="wp-caption aligncenter" style="width: 428px"><a href="http://www.papygeek.com/wp-content/uploads/2008/11/papy-geek-e280ba-tableau-de-bord-wordpress.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/11/papy-geek-e280ba-tableau-de-bord-wordpress-418x500.png" alt="Tableau de Bord WordPress 2.7 Beta 1" title="papy-geek-e280ba-tableau-de-bord-wordpress" width="418" height="500" class="size-medium wp-image-2844" /></a><p class="wp-caption-text">Tableau de Bord WordPress 2.7 Beta 1</p></div></p>
<p><a href="http://www.papygeek.com/wp-content/uploads/2008/11/papy-geek-e280ba-modifier-les-commentaires-wordpress.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/11/papy-geek-e280ba-modifier-les-commentaires-wordpress-500x236.png" alt="papy geek e280ba modifier les commentaires wordpress 500x236 Tuto Blog Wordpress : tester WordPress 2.7 en local" title="papy-geek-e280ba-modifier-les-commentaires-wordpress" width="500" height="236" class="aligncenter size-medium wp-image-2845" /></a></p>
<p><a href="http://www.papygeek.com/wp-content/uploads/2008/11/papy-geek-e280ba-add-new-post-wordpress.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/11/papy-geek-e280ba-add-new-post-wordpress-500x388.png" alt="papy geek e280ba add new post wordpress 500x388 Tuto Blog Wordpress : tester WordPress 2.7 en local" title="papy-geek-e280ba-add-new-post-wordpress" width="500" height="388" class="aligncenter size-medium wp-image-2846" /></a></p>
<p>Et franchement, c&#8217;est déjà bien sympa. Maintenant, il ne reste plus qu&#8217;a réactiver tous les plugins un par un pour observer les éventuelles incompatibilités, et d&#8217;intégrer <a href="http://www.papygeek.com/wordpress/wordpress-27-de-a-a-z/">les nouvelles fonctions de WordPress 2.7 en suivant mon article</a>.</p>
<p>Et bien sûr je vous tiendrai au courant des problèmes classiques pour la version 2.7 dans un prochain article <img src='http://www.papygeek.com/wp-includes/images/smilies/wink.png' alt=';)' class='wp-smiley' title="Tuto Blog Wordpress : tester WordPress 2.7 en local" /> </p>
<!-- google_ad_section_end -->
    <hr noshade style="margin:0;height:1px" />
    <p style="font-size: 78%;">&copy;<a href="http://www.papygeek.com">PapyGeek</a>, 2008. <a href="http://www.papygeek.com/wordpress/tuto-blog-wordpress-tester-wordpress-27-en-local/#comments">Voir les commentaires</a> de <a href="http://www.papygeek.com/wordpress/tuto-blog-wordpress-tester-wordpress-27-en-local/"><strong>"Tuto Blog WordPress : tester WordPress 2.7 en local"</strong></a>.<br />
    Voir les autres articles class&eacute;s sous <a href="http://www.papygeek.com/category/wordpress/" title="Voir tous les articles dans WordPress" rel="category tag">WordPress</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.papygeek.com/wordpress/tuto-blog-wordpress-tester-wordpress-27-en-local/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
	
	<enclosure url="http://www.papygeek.com/wp-content/uploads/pth/thumb_apache-friends-xampp-pour-windows.png" length="" type="image/jpeg" />
	<media:content url="http://www.papygeek.com/wp-content/uploads/pth/thumb_apache-friends-xampp-pour-windows.png" medium="image" />
	<media:thumbnail url="http://www.papygeek.com/wp-content/uploads/pth/thumb_apache-friends-xampp-pour-windows.png"  />
	<media:title type="html">Tuto Blog WordPress : tester WordPress 2.7 en local</media:title>	</item>
		<item>
		<title>WordPress 2.7 de A à Z</title>
		<link>http://www.papygeek.com/wordpress/wordpress-27-de-a-a-z/</link>
		<comments>http://www.papygeek.com/wordpress/wordpress-27-de-a-a-z/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 05:25:14 +0000</pubDate>
		<dc:creator>Papy</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[A à Z]]></category>
		<category><![CDATA[Commentaires]]></category>
		<category><![CDATA[De A à Z]]></category>
		<category><![CDATA[fonctionnalités]]></category>
		<category><![CDATA[Fonctions]]></category>
		<category><![CDATA[Formation WordPress]]></category>
		<category><![CDATA[Mise à jour]]></category>
		<category><![CDATA[Pagination]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[Threaded Comments]]></category>
		<category><![CDATA[WordPress 2.7]]></category>

		<guid isPermaLink="false">http://www.papygeek.com/?p=2594</guid>
		<description><![CDATA[WordPress 2.7 dont la sortie est prévue pour le 10 Novembre 2008, devrait amener des changement plutôt importants, surtout en ce qui concerne les commentaires. Les auteurs de WordPress s&#8217;attaquent enfin à ce domaine qui a trop longtemps été délaissé depuis un certain nombre de versions. Les nouveautés Les commentaires voient arriver deux fonctionnalités importantes [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p><a href="http://wordpress.org/">WordPress 2.7</a> dont <a href="http://wordpress.org/about/roadmap/">la sortie est prévue pour le 10 Novembre 2008</a>, devrait amener des changement plutôt importants, surtout en ce qui concerne les commentaires. Les auteurs de WordPress s&#8217;attaquent enfin à ce domaine qui a trop longtemps été délaissé depuis un certain nombre de versions.</p>
<h2>Les nouveautés</h2>
<p>Les commentaires voient arriver deux fonctionnalités importantes : &laquo;&nbsp;<strong>Threaded Comments</strong>&laquo;&nbsp;, c&#8217;est-à-dire des commentaires imbriqués comme sur Digg, et <strong>la pagination des commentaires</strong>.</p>
<div id="attachment_2632" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.papygeek.com/wp-content/uploads/2008/10/digg-threaded-comments.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/10/digg-threaded-comments-500x210.png" alt="Les commentaires imbriqués sur Digg." title="digg-threaded-comments" width="500" height="210" class="size-medium wp-image-2632" /></a><p class="wp-caption-text">Les commentaires imbriqués sur Digg.</p></div>
<p>Il y a également pas mal de mouvement du côté de l&#8217;interface d&#8217;administration, qui se voit reliftée pour l&#8217;occasion. Cette refonte graphique a été faite à partir d&#8217;ébauches : <a href="http://wordpress.org/development/2008/10/wordpress-27-wireframes/">les WireFrames que je vous invite à consulter</a> et de différents sondages soumis à la communauté, vous y avez d&#8217;ailleurs peut-être répondu.</p>
<div id="attachment_2614" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-wireframes.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-wireframes-500x397.png" alt="WordPress 2.7 Wireframes" title="wordpress-27-wireframes" width="500" height="397" class="size-medium wp-image-2614" /></a><p class="wp-caption-text">WordPress 2.7 Wireframes</p></div>
<p>Voici à quoi devrait ressembler <strong><a href="http://wordpress.org/development/2008/10/the-visual-design-of-27/">le design final de la version 2.7 de WordPress</a></strong> :</p>
<div id="attachment_2650" class="wp-caption aligncenter" style="width: 509px"><a href="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-finale-nouvel-article.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-finale-nouvel-article-499x336.png" alt="Le design final de WordPress 2.7 - Menu Nouvel Article" title="wordpress-27-finale-nouvel-article" width="499" height="336" class="size-medium wp-image-2650" /></a><p class="wp-caption-text">Le design final de WordPress 2.7 - Menu Nouvel Article</p></div>
<div id="attachment_2651" class="wp-caption aligncenter" style="width: 406px"><a href="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-finale-dashbord.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-finale-dashbord-396x500.png" alt="Le design final de WordPress 2.7 - Le Tableau de bord (DashBoard)" title="wordpress-27-finale-dashbord" width="396" height="500" class="size-medium wp-image-2651" /></a><p class="wp-caption-text">Le design final de WordPress 2.7 - Le Tableau de bord (DashBoard)</p></div>
<p>La meilleure façon d&#8217;observer les changements en cours est sûrement de se connecter au <a href="http://wp.chrisjohnston.org/wp-admin/">WordPress de démonstration</a> disponible sur cette page. La connexion s&#8217;effectue avec le compte &laquo;&nbsp;<strong>admin</strong>&nbsp;&raquo; et le mot de passe &laquo;&nbsp;<strong>demo</strong>&nbsp;&raquo; :<br />
<div id="attachment_2635" class="wp-caption aligncenter" style="width: 425px"><a href="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-icones-reduites.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-icones-reduites.png" alt="Le menu d\&#039;administration, avec les rubriques sous forme d&#039;icônes, ici réduites." title="wordpress-27-icones-reduites" width="415" height="411" class="size-medium wp-image-2635" /></a><p class="wp-caption-text">Le menu d'administration, avec les rubriques sous forme d'icônes, ici réduites.</p></div></p>
<div id="attachment_2634" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-icones-deplies.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-icones-deplies-500x391.png" alt="Après un clic sur l&#039;icône du haut, le texte des catégories est visible." title="wordpress-27-icones-deplies" width="500" height="391" class="size-medium wp-image-2634" /></a><p class="wp-caption-text">Après un clic sur l'icône du haut, le texte des catégories est visible.</p></div>
<p>Pouvoir cacher le texte des menus sur la barre latérale permet d&#8217;avoir un espace de travail maximal. Parfait pour les écrans à la résolution moyenne.</p>
<div id="attachment_2617" class="wp-caption aligncenter" style="width: 379px"><a href="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-demo-site-dashboard-wordpress.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-demo-site-dashboard-wordpress-369x500.png" alt="Le Dashboard de WordPress 2.7, avec tous les menus dépliés." title="wordpress-27-demo-site-dashboard-wordpress" width="369" height="500" class="size-medium wp-image-2617" /></a><p class="wp-caption-text">Le Dashboard de WordPress 2.7, avec tous les menus dépliés.</p></div>
<div id="attachment_2618" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-demo-site-install-plugins-wordpress.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-demo-site-install-plugins-wordpress-500x204.png" alt="La page des plugins permet de rechercher et d\&#039;installer les plugins directement depuis l&#039;administration de WordPress." title="wordpress-27-demo-site-install-plugins-wordpress" width="500" height="204" class="size-medium wp-image-2618" /></a><p class="wp-caption-text">La page des plugins permet de rechercher et d'installer les plugins directement depuis l'administration de WordPress.</p></div>
<div id="attachment_2619" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-demo-site-install-plugins-2-wordpress.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-demo-site-install-plugins-2-wordpress-500x213.png" alt="Il est également possible d&#039;uploader et d&#039;installer un plugin au format Zip. On peut aussi afficher les plugins les plus populaires." title="wordpress-27-demo-site-install-plugins-2-wordpress" width="500" height="213" class="size-medium wp-image-2619" /></a><p class="wp-caption-text">Il est également possible d'uploader et d'installer un plugin au format Zip. On peut aussi afficher les plugins les plus populaires.</p></div>
<div id="attachment_2620" class="wp-caption aligncenter" style="width: 378px"><a href="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-demo-site-discussion-settings-wordpress.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-demo-site-discussion-settings-wordpress.png" alt="Il est possible de fermer automatiquement les commentaires sur les articles vieux d\&#039;un certain nombre de jours, pour éviter le spam, de grouper les commentaires sous forme de threads en choisissant la profondeur et de paginer les commentaires en choisissant le nombre maximum de commentaires par page." title="wordpress-27-demo-site-discussion-settings-wordpress" width="368" height="101" class="size-medium wp-image-2620" /></a><p class="wp-caption-text">Il est possible de fermer automatiquement les commentaires sur les articles vieux d'un certain nombre de jours (pour éviter le spam), de grouper les commentaires sous forme de threads en choisissant la profondeur maximum et de paginer les commentaires en choisissant le nombre de commentaires par page.</p></div>
<div id="attachment_2621" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-demo-site-media-settings-wordpress.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-demo-site-media-settings-wordpress-500x245.png" alt="La section &quot;Media Settings&quot; permet de choisir s\&#039;il on désire lier les media à l\&#039;article ou au fichier lui-même. On peut maintenant choisir une taille maximum pour les images, et le format d\&#039;affichage par défaut : Auto, Thumbnail, Medium, Large ou Full size. L\&#039;par défaut des images est paramétrable." title="wordpress-27-demo-site-media-settings-wordpress" width="500" height="245" class="size-medium wp-image-2621" /></a><p class="wp-caption-text">La section 'Media Settings' permet de choisir s'il on désire lier les media à l'article ou au fichier lui-même. On peut maintenant choisir une taille maximum pour les images, et le format d'affichage par défaut : Auto, Thumbnail, Medium, Large ou Full size. L'alignement par défaut des images est paramétrable.</p></div>
<div id="attachment_2622" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-demo-site-edit-view-all-posts-wordpress.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-demo-site-edit-view-all-posts-wordpress-500x231.png" alt="Edition rapide des paramètres d\&#039;un article" title="wordpress-27-demo-site-edit-view-all-posts-wordpress" width="500" height="231" class="size-medium wp-image-2622" /></a><p class="wp-caption-text">Edition rapide des paramètres d'un article</p></div>
<div id="attachment_2640" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-demo-site-customisation.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-demo-site-customisation-500x36.png" alt="Il est possible de choisir les éléments à afficher dans tous les menus d\&#039;administration." title="wordpress-27-demo-site-customisation" width="500" height="36" class="size-medium wp-image-2640" /></a><p class="wp-caption-text">Il est possible de choisir les éléments à afficher dans tous les menus d'administration.</p></div>
<p>En plus de cela, quelques fonctions supplémentaires :</p>
<ul>
<li>Sur la page d&#8217;édition d&#8217;article et sur le tableau de bord, les boîtes sont déplaçables et peuvent être masquées complètement,</li>
<li>Dans l&#8217;interface d&#8217;administration, <a href="http://trac.wordpress.org/ticket/7643">des raccourcis claviers</a> permettent la modération des commentaires,</li>
<li>Dans l&#8217;administration, il est possible de filtrer les colonnes dans la page listant les articles,</li>
<li>Possibilité de modifier certains attributs des articles directement depuis cette page,</li>
<li><a href="http://codex.wordpress.org/Version_2.7#Comment_API"><acronym title="Application Programming Interface">API</acronym> XMLRPC</a> pour les commentaires (pour pouvoir par exemple modérer les commentaires depuis l&#8217;Iphone un jour ?)</li>
<li><strong>Réponse aux commentaires depuis l&#8217;administration</strong>,</li>
<li>Raccourcis clavier pour la gestion des commentaires,</li>
<li><acronym title="Application Programming Interface">API</acronym> pour les commentaires imbriqués et le nouveau wp_list_comments(),</li>
<li><acronym title="Application Programming Interface">API</acronym> pour la mise à jour des thèmes (comme celle pour la mise à jour des plugins),</li>
<li><strong>Sticky Posts</strong> pour maintenir un article sur la page d&#8217;accueil,</li>
<li><strong>Installation automatique des plugins</strong> et <strong>navigation dans la base des plugins depuis l&#8217;administration</strong>,</li>
<li><strong>Mises à jour automatiques de WordPress</strong>,</li>
<li>Cookies de type HTTPOnly pour l&#8217;authentification,</li>
<li>Nouvelle <acronym title="Application Programming Interface">API</acronym> pour les requêtes <acronym title="HyperText Transfer Protocol">HTTP</acronym>,</li>
<li><a href="http://trac.wordpress.org/ticket/7827">Suppression de la compression pour TinyMCE</a> afin de permettre la mise en cache du Javascript par le navigateur et par Google Gears (la page d&#8217;édition devrait charger plus rapidement),</li>
<li>Une nouvelle abstraction d&#8217;un système de fichier SSH2 pour effectuer les installations et des mises à jour en SFTP.</li>
</ul>
<h2>Quelques fonctionnalités qui rateront la v2.7</h2>
<ul>
<li>L&#8217;amélioration de l&#8217;interface de la fonction &laquo;&nbsp;historique de l&#8217;article&nbsp;&raquo; affichant les révisions,</li>
<li>Des informations de géolocalisation pour les articles, les commentaires, &#8230;,</li>
<li>Rendre l&#8217;uploader (SWFUploader) compatible avec Flash 10,</li>
<li>Des améliorations pour le tag &laquo;&nbsp;gallery&nbsp;&raquo;,</li>
<li>La coloration syntaxique <a href="http://fr.wikipedia.org/wiki/CodePress">CodePress</a> pour les éditeurs de code de l&#8217;administration,</li>
<li>Un éditeur de menu,</li>
<li>L&#8217;intégration de sitemaps,</li>
<li>Un versionning pour l&#8217;édition des templates,</li>
<li>&#8230;</li>
</ul>
<p>Tout ça pour la <a href="http://codex.wordpress.org/Version_2.8">version 2.8</a> ?</p>
<h2>Compatibilité des plugins avec WordPress 2.7</h2>
<p>Comme d&#8217;habitude, il suffit de se rendre <a href="http://codex.wordpress.org/Plugins/Plugin_Compatibility/2.7">sur cette page du Codex WordPress</a> pour vérifier la compatibilité des plugins avec la version 2.7.</p>
<h2>WordPress, un BloatWare ?</h2>
<p>Voilà qui fait énormément de nouveautés. Certains pensent que des logiciels comme WordPress <a href="http://performancing.com/future-all-software-bloatware">sont condamnés à devenir des BloatWares</a> avec le temps, à force d&#8217;accumuler les fonctionnalités. Il faut de la nouveauté en permanence pour faire parler de soi, n&#8217;est-ce pas ?</p>
<p>Certains pensent ainsi que la réécriture plus ou moins complète d&#8217;un logiciel doit avoir lieu régulièrement, les objectifs de celui-ci pouvant varier largement au bout de quelques années rendant ses bases inadaptées.</p>
<p>Le cas de WordPress 2.7 est assez impressionnant. En effet, les dotcleariens semblent conserver <a href="http://www.dotclear.net/blog/post/2008/10/14/Au-programme-de-la-21#c3499">la philosophie suivante</a> : </p>
<blockquote><p>Si Dotclear devait répondre à chaque besoin spécifique, il aurait 36000 fonctions et péserait bien plus que son poids actuel. Avec des plugins, on offre le choix aux utilisateurs d&#8217;installer et utiliser seulement ce dont ils ont besoin.</p></blockquote>
<p>WordPress 2.7 intégrera en natif des fonctionnalités qui remplaceront un nombre très important de plugins. Voici quelques exemples que j&#8217;ai pu trouver :</p>
<ul>
<li><a href="http://wordpress.org/extend/plugins/comment-timeout/">Comment Timeout</a> pour fermer les commentaires au bout d&#8217;un certain temps,</li>
<li><a href="http://www.keyvan.net/code/paged-comments/">Paged Comments</a> pour paginer les commentaires,</li>
<li><a href="http://meidell.dk/archives/2004/09/04/nested-comments/">Threaded Comments</a> pour les commentaires imbriqués,</li>
<li>Le menu sur la gauche pour l&#8217;administration, que proposait d&#8217;une certaine façon <a href="http://deanjrobinson.com/projects/fluency-admin/">Fluency Admin</a>,</li>
<li><a href="http://www.drunkadmin.com/projects/plugin-manager">Plugin Manager</a> qui permettait de parcourir les plugins et de les installer et <a href="http://gaarai.com/wp-easy-uploader/"><acronym title="WordPress">WP</acronym> Easy Uploader</a> qui permettait d&#8217;envoyer un zip et de le décompresser,</li>
<li>Quelques options de <a href="http://pressography.com/plugins/wp-comment-remix/"><acronym title="WordPress">WP</acronym> Comment Remix</a> pour les commentaires,</li>
<li><a href="http://wordpress.org/extend/plugins/wp-sticky/"><acronym title="WordPress">WP</acronym>-Sticky</a> pour les Stickys Posts,</li>
<li><a href="http://wordpress.org/extend/plugins/wordpress-automatic-upgrade/">WordPress Automatic Upgrade</a> pour les mises à jour automatiques de WordPress,</li>
<li><a href="http://robm.me.uk/projects/plugins/wordpress/batch-categories">Batch Categories</a> pour l&#8217;édition en ligne des articles,</li>
<li>Et bientôt <a href="http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/">Google <acronym title="eXtensible Markup Language">XML</acronym> Sitemaps Generator</a> pour les sitemaps,</li>
</ul>
<p>Et j&#8217;en oublie sûrement&#8230;<br />
Que penser de tout cela ? D&#8217;un côté c&#8217;est une bonne chose, puisque <strong>nous n&#8217;aurons pas à nous soucier de la compatibilité de ces plugins pour les futures versions de WordPress</strong>, d&#8217;un autre côté on peut <strong>se demander si WordPress ne va pas devenir un peu lourd</strong> et <strong>si maintenir ces fonctions supplémentaires ne va finalement pas ralentir les futurs développements</strong>.</p>
<p>L&#8217;avenir nous le dira, mais vous pouvez faire vos pronostics dans les commentaires <img src='http://www.papygeek.com/wp-includes/images/smilies/wink.png' alt=';)' class='wp-smiley' title="WordPress 2.7 de A à Z" /> </p>
<h2>Des modifications lourdes pour supporter les nouvelles fonctions</h2>
<p>Les modifications pour les commentaires demanderont quelques efforts plus ou moins importants pour les blogueurs. Aussi bien du côté des fichiers du thème que de la feuille de style.</p>
<div id="attachment_2596" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-comments-enhancements-threaded-comments.png"><img class="size-medium wp-image-2596" title="wordpress-27-comments-enhancements-threaded-comments" src="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-27-comments-enhancements-threaded-comments-500x248.png" alt="Threaded Comments - Les commentaires imbriqués" width="500" height="248" /></a><p class="wp-caption-text">Threaded Comments - Les commentaires imbriqués</p></div>
<div id="attachment_2597" class="wp-caption aligncenter" style="width: 207px"><a href="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-pagination.png"><img class="size-medium wp-image-2597" title="wordpress-pagination" src="http://www.papygeek.com/wp-content/uploads/2008/10/wordpress-pagination.png" alt="Pagination des commentaires" width="197" height="63" /></a><p class="wp-caption-text">Pagination des commentaires</p></div>
<p>Rassurez-vous, votre thème restera compatible avec la nouvelle version, mais pour profiter des nouvelles fonctions, vous devrez l&#8217;adapter. Ce qui suit est un exemple d&#8217;adaptation du thème par défaut pour passer de la version 2.6 à la version 2.7. La version actuelle n&#8217;étant pas définitive, le code peut encore évoluer.</p>
<p>Attention, la suite peut donner mal aux crâne aux non-codeurs, pensez à prendre un petit café pour tenir <img src='http://www.papygeek.com/wp-includes/images/smilies/wink.png' alt=';)' class='wp-smiley' title="WordPress 2.7 de A à Z" /> </p>
<h2>Retrocompatibilité</h2>
<p>Tout d&#8217;abord, WordPress 2.7 utilise une nouvelle fonction pour les commentaires, qui fait presque tout  : &laquo;&nbsp;<strong>wp_list_comments</strong>&laquo;&nbsp;, il suffira donc d&#8217;utiliser un code de ce type dans &laquo;&nbsp;<strong>comments.php</strong>&nbsp;&raquo; pour assurer la retrocompatibilité :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_list_comments'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span>
<span style="color: #666666; font-style: italic;">// nouveau code pour comments.php avec wp_list_comments et autre</span>
<span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span>
<span style="color: #666666; font-style: italic;">// ancien code pour la retrocompatibilité</span>
<span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span></pre></div></div>

<h2>Protection par mot de passe</h2>
<p>Pour gérer la protection par mot de passe des articles, le code en haut du fichier &laquo;&nbsp;<strong>comments.php</strong>&nbsp;&raquo; est légèrement modifié :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'SCRIPT_FILENAME'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #0000ff;">'comments.php'</span> <span style="color: #339933;">==</span> <span style="color: #990000;">basename</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'SCRIPT_FILENAME'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #990000;">die</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Please do not load this page directly. Thanks!'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> post_password_required<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'This post is password protected. Enter the password to view comments.'</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h2>Boucle des commentaires</h2>
<p>Quant à la boucle des commentaires, qui ressemblait à cela :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">if ($comments) :
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$comment_count</span> <span style="color: #339933;">=</span> get_comment_count<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$comment_count</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'approved'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> Comments
&lt;ul class=&quot;commentlist&quot;&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$comments</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$comment</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span>
<span style="color: #666666; font-style: italic;">// stuff to display the comment in an LI here</span>
<span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/ul&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'open'</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_status</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span>
	<span style="color: #666666; font-style: italic;">// If comments are open, but there are no comments.</span>
<span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span>
	<span style="color: #666666; font-style: italic;">// comments are closed</span>
<span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span></pre></div></div>

<p>Elle intègre désormais la fonction &laquo;&nbsp;<strong>wp_list_comments</strong>&nbsp;&raquo; comme ceci :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">if ( have_comments() ) : ?&gt;
&lt;h4 id=&quot;comments&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> comments_number<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'No Comments'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'One Comment'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'% Comments'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h4&gt;
&lt;ul class=&quot;commentlist&quot;&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<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;/ul&gt;
&lt;div class=&quot;navigation&quot;&gt;
&lt;div class=&quot;alignleft&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> previous_comments_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;
&lt;div class=&quot;alignright&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> next_comments_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;
&lt;/div&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// this is displayed if there are no comments so far ?&gt;</span>
	<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: #0000ff;">'open'</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_status</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span>
		<span style="color: #666666; font-style: italic;">// If comments are open, but there are no comments.</span>
	<span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// comments are closed</span>
	<span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span></pre></div></div>

<p>On voit ici que:</p>
<ul>
<li>&laquo;&nbsp;<strong>have_comments</strong>&nbsp;&raquo; remplace le &laquo;&nbsp;<strong>if ($comments)</strong>&laquo;&nbsp;,</li>
<li>&laquo;&nbsp;<strong>wp_list_comments</strong>&nbsp;&raquo; remplace la boucle foreach et affiche tous les commentaires en y ajoutant les nouvelles fonctions de commentaires imbriqués ainsi que les classes nécessaires pour la feuille de style,</li>
<li>Une section de navigation est ajoutée pour les commentaires (comme celle qui existait pour les articles).</li>
</ul>
<p>Pour que les commentaires imbriqués fonctionnent correctement, il faut également ajouter le code suivant dans le formulaire de commentaires :</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> comment_parent_field<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>

<h2>Javascript dans les commentaires</h2>
<p>Pour activer les effets Javascript dans les commentaires, il est nécessaire d&#8217;ajouter une ligne dans le fichier &laquo;&nbsp;<strong>header.php</strong>&nbsp;&raquo; juste avant l&#8217;appel à &laquo;&nbsp;<strong>wp_head()</strong>&nbsp;&raquo; :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_singular<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> wp_enqueue_script<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'comment-reply'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h2>Contraintes supplémentaires</h2>
<p>Pour faire fonctionner l&#8217;ensemble, il faut également respecter certaines contraintes, notamment quant au nommage des attributs &laquo;&nbsp;<strong>id</strong>&laquo;&nbsp;. </p>
<ul>
<li>Le champ &laquo;&nbsp;<strong>textarea</strong>&nbsp;&raquo; du formulaire de commentaires devra avoir un <strong>id=”comment”</strong>,</li>
<li>Le formulaire de commentaire devra être encadré par un DIV avec un <strong>id=”respond”</strong> (au lieu de <strong>&lt;a id=&nbsp;&raquo;respond&nbsp;&raquo;&gt;&lt;/a&gt;</strong> sur certains thèmes)</li>
<li>Remplacer &laquo;&nbsp;Laisser un commentaire&nbsp;&raquo; ou &laquo;&nbsp;Leave a Comment&nbsp;&raquo; par :

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_form_title<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'Laisser un commentaire'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Laisser un commentaire à %s'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

</li>
<li>Pour permettre d&#8217;annuler l&#8217;ajout d&#8217;un commentaire, il faut ajouter un lien de type &laquo;&nbsp;cancel&nbsp;&raquo;. Dans votre thème juste sous le &laquo;&nbsp;<strong>comment_form_title</strong>&laquo;&nbsp;, ajoutez le code :

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;div id=&quot;cancel-comment-reply&quot;&gt;
	&lt;small&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> cancel_comment_reply_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/small&gt;
&lt;/div&gt;</pre></div></div>

</li>
</ul>
<h2>Style</h2>
<p>Voilà pour la partie purement technique, ouf! Mais maintenant, il va falloir mettre tout ça en forme! Le nouveau code  encadre chaque commentaire dans des balises &laquo;&nbsp;&lt;li&gt;&nbsp;&raquo; et y ajoute les classes suivantes :</p>
<ul>
<li>Les classes &laquo;&nbsp;<strong>comment</strong>&laquo;&nbsp;, &laquo;&nbsp;<strong>trackback</strong>&nbsp;&raquo; et &laquo;&nbsp;<strong>pingback</strong>&nbsp;&raquo; sont ajoutées en fonction du type de commentaires,</li>
<li>&laquo;&nbsp;<strong>byuser</strong>&nbsp;&raquo; est ajouté si le commentaire appartient à un utilisateur enregistré,</li>
<li>&laquo;&nbsp;<strong>comment-author-authorname</strong>&nbsp;&raquo; est ajouté pour des utilisateurs enregistrés spécifiques,</li>
<li>&laquo;&nbsp;<strong>bypostauthor</strong>&nbsp;&raquo;  est ajouté si le commentaire appartient à l&#8217;auteur de l&#8217;article,</li>
<li>&laquo;&nbsp;<strong>odd</strong>&nbsp;&raquo; et &laquo;&nbsp;<strong>even</strong>&nbsp;&raquo; sont ajoutés pour les commentaires paires et impaires,</li>
<li>&laquo;&nbsp;<strong>alt</strong>&nbsp;&raquo; est ajouté pour tous les autres commentaires,</li>
<li>&laquo;&nbsp;<strong>thread-odd</strong>&laquo;&nbsp;, &laquo;&nbsp;<strong>thread-even</strong>&laquo;&nbsp;, et &laquo;&nbsp;<strong>thread-alt</strong>&nbsp;&raquo; fonctionnent comme odd/even/alt classes, mais sont appliqués uniquement aux commentaires de plus haut-niveau dans l&#8217;imbrication des commentaires (donc pas aux replys),</li>
<li>&laquo;&nbsp;<strong>depth-X</strong>&nbsp;&raquo; est appliqué au niveau <strong>X</strong> de commentaires (commentaires imbriqués).</li>
</ul>
<h2>Séparation des Trackbacks et des commentaires</h2>
<p>Il existait <a href="http://weblogtoolscollection.com/archives/2008/03/08/managing-trackbacks-and-pingbacks-in-your-wordpress-theme/">plusieurs techniques pour pouvoir séparer les commentaires et les trackbacks</a> jusqu&#8217;à WordPress 2.6.<br />
La version 2.7 introduit quelques nouvelles fonctions qui peuvent faciliter ces modifications dans le thème.</p>
<p>Tout d&#8217;abord, partons de la nouvelle boucle des commentaires qui doit ressembler à ça :</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> have_comments<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;h3 id=&quot;comments&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> comments_number<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'No Responses'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'One Response'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'% Responses'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> to &amp;#8220;<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>&amp;#8220;&lt;/h3&gt;
&nbsp;
	&lt;ol class=&quot;commentlist&quot;&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<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;/ol&gt;
	&lt;div class=&quot;navigation&quot;&gt;
		&lt;div class=&quot;alignleft&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> previous_comments_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;
		&lt;div class=&quot;alignright&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> next_comments_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;
	&lt;/div&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// this is displayed if there are no comments so far ?&gt;</span>
&nbsp;
	<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: #0000ff;">'open'</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_status</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		&lt;!-- If comments are open, but there are no comments. --&gt;
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// comments are closed ?&gt;</span>
		&lt;!-- If comments are closed. --&gt;
		&lt;p class=&quot;nocomments&quot;&gt;Comments are closed.&lt;/p&gt;
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</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> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>La première modification à faire se situe dans le fichier &laquo;&nbsp;single.php&nbsp;&raquo;, où vous devrez remplacer cette ligne:</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> comments_template<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>Par celle-ci :</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> comments_template<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Cette fonction &laquo;&nbsp;<strong>comments_template</strong>&nbsp;&raquo; permet de créer une variable globale &laquo;&nbsp;<strong>$comments_by_type</strong>&nbsp;&raquo; qui sera utilisée par la suite.</p>
<p>Il faut ensuite modifier &laquo;&nbsp;<strong>comments.php</strong>&nbsp;&raquo; pour qu&#8217;il ressemble à ça :</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> have_comments<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	<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: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$comments_by_type</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'comment'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;h3 id=&quot;comments&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> comments_number<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'No Responses'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'One Response'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'% Responses'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> to &amp;#8220;<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>&amp;#8221;&lt;/h3&gt;
&nbsp;
	&lt;ol class=&quot;commentlist&quot;&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type=comment'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;/ol&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
	<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: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$comments_by_type</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pings'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;h3 id=&quot;pings&quot;&gt;Trackbacks/Pingbacks&lt;/h3&gt;
&nbsp;
	&lt;ol class=&quot;commentlist&quot;&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type=pings'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;/ol&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
	&lt;div class=&quot;navigation&quot;&gt;
		&lt;div class=&quot;alignleft&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> previous_comments_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;
		&lt;div class=&quot;alignright&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> next_comments_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;
	&lt;/div&gt;
 <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// this is displayed if there are no comments so far ?&gt;</span>
&nbsp;
	<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: #0000ff;">'open'</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_status</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		&lt;!-- If comments are open, but there are no comments. --&gt;
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// comments are closed ?&gt;</span>
		&lt;!-- If comments are closed. --&gt;
		&lt;p class=&quot;nocomments&quot;&gt;Comments are closed.&lt;/p&gt;
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</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> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Les trackbacks seront alors affichés séparement mais comme de vrais commentaires. Pour les afficher simplement sous forme de liste, vous pouvez utiliser la technique qui suit :<br />
Commencez par modifier votre fichier &laquo;&nbsp;<strong>functions.php</strong>&nbsp;&raquo; pour y ajouter la fonction suivante :</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: #000000; font-weight: bold;">function</span> list_pings<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">,</span> <span style="color: #000088;">$args</span><span style="color: #339933;">,</span> <span style="color: #000088;">$depth</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
       <span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'comment'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$comment</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
        &lt;li id=&quot;comment-<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_ID<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> comment_author_link<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>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>La boucle des commentaires doit être adaptée comme ceci :</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> have_comments<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	<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: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$comments_by_type</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'comment'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;h3 id=&quot;comments&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> comments_number<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'No Responses'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'One Response'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'% Responses'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> to &amp;#8220;<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>&amp;#8221;&lt;/h3&gt;
&nbsp;
	&lt;ol class=&quot;commentlist&quot;&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type=comment'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;/ol&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
	<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: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$comments_by_type</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pings'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;h3 id=&quot;pings&quot;&gt;Trackbacks/Pingbacks&lt;/h3&gt;
&nbsp;
	&lt;ol class=&quot;pinglist&quot;&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type=pings&amp;callback=list_pings'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;/ol&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
	&lt;div class=&quot;navigation&quot;&gt;
		&lt;div class=&quot;alignleft&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> previous_comments_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;
		&lt;div class=&quot;alignright&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> next_comments_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;
	&lt;/div&gt;
 <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// this is displayed if there are no comments so far ?&gt;</span>
&nbsp;
	<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: #0000ff;">'open'</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_status</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		&lt;!-- If comments are open, but there are no comments. --&gt;
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// comments are closed ?&gt;</span>
		&lt;!-- If comments are closed. --&gt;
		&lt;p class=&quot;nocomments&quot;&gt;Comments are closed.&lt;/p&gt;
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</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> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Dernière chose, si vous voulez modifier le compteur des commentaires pour ne pas compter les pings, il faut ajouter le code suivant dans &laquo;&nbsp;<strong>functions.php</strong>&nbsp;&raquo; :</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>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'get_comments_number'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'comment_count'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> comment_count<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$count</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;">$id</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$comments_by_type</span> <span style="color: #339933;">=</span> <span style="color: #339933;">&amp;</span>separate_comments<span style="color: #009900;">&#40;</span>get_comments<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'post_id='</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$comments_by_type</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'comment'</span><span style="color: #009900;">&#93;</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>Si le fichier &laquo;&nbsp;functions.php&nbsp;&raquo; n&#8217;existe pas dans votre thème, il suffit de le créer!</p>
<p>Voilà, vous avez je pense largement de quoi bidouiller votre WordPress et ainsi avoir une excuse supplémentaire pour perdre du temps et ne pas blogguer! (Au moins je ne serai pas seul <img src='http://www.papygeek.com/wp-includes/images/smilies/wink.png' alt=';)' class='wp-smiley' title="WordPress 2.7 de A à Z" />  )</p>
<p>Personnellement, je pense que les &laquo;&nbsp;<strong>threaded comments</strong>&nbsp;&raquo; ne sont pas indispensables pour un blog où le nombre relativement faible de commentaires permet largement de suivre la conversation. Sans compter que visuellement les commentaires imbriqués réduisent à peau de chagrin la largeur des commentaires.<br />
Pour la pagination des commentaires, je suis pour l&#8217;instant satisfait de <a href="http://www.keyvan.net/code/paged-comments/">Paged Comments</a> que j&#8217;ai légèrement modifié et dont le rendu est très correct.<br />
<div id="attachment_2628" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.papygeek.com/wp-content/uploads/2008/10/pagination-des-commentaires.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/10/pagination-des-commentaires-500x97.png" alt="Pagination des commentaires avec Paged Comments" title="pagination-des-commentaires" width="500" height="97" class="size-medium wp-image-2628" /></a><p class="wp-caption-text">Pagination des commentaires avec Paged Comments</p></div></p>
<p>Même si le <strong>duplicate content</strong> est censé être une histoire ancienne, j&#8217;ai préféré ne pas répéter n fois l&#8217;article sur chaque page de commentaires (<a href="http://www.papygeek.com/insolite/copieurs-et-voleurs-darticles-prenez-garde/comment-page-1/">Voir exemple ici</a>). En espérant que la fonction intégrée de WordPress 2.7 sache gérer ça.<br />
 <div id="attachment_2629" class="wp-caption aligncenter" style="width: 509px"><a href="http://www.papygeek.com/wp-content/uploads/2008/10/paged-comments-page-de-commentaires-1.png"><img src="http://www.papygeek.com/wp-content/uploads/2008/10/paged-comments-page-de-commentaires-1-499x128.png" alt="L\&#039;article est caché sur une page de commentaires pour éviter le Duplicate Content." title="paged-comments-page-de-commentaires-1" width="499" height="128" class="size-medium wp-image-2629" /></a><p class="wp-caption-text">L'article est caché sur une page de commentaires pour éviter le Duplicate Content.</p></div></p>
<p>Voilà donc <strong>une version 2.7 qui promet énormément</strong>, rien que pour <a href="http://wordpress.org/development/2008/10/the-visual-design-of-27/">la nouvelle interface d&#8217;administration</a> au design beaucoup plus élégant et pratique. Et puis je préfère les couleurs plus sombres au bleu &laquo;&nbsp;Windows&nbsp;&raquo; flashy <img src='http://www.papygeek.com/wp-includes/images/smilies/wink.png' alt=';)' class='wp-smiley' title="WordPress 2.7 de A à Z" /> </p>
<p>Au passage, si vous voulez un peu d&#8217;aide avec WordPress, vous pouvez vous procurer le <strong><a href="http://www.fran6art.com/wordpress/dvd-de-formation-a-wordpress-en-francais/"><acronym title="Digital Versatile Disc">DVD</acronym> de formation WordPress</a></strong> auquel Fran6art a contribué.</p>
<p>Bonne chance!</p>
<p><small>Sources : <a href="http://ottodestruct.com/blog/2008/09/29/wordpress-27-comments-enhancements/">Otto Destruct</a>, <a href="http://sivel.net/2008/10/wp-27-comment-separation/">Sivel.net</a>, <a href="http://boren.nu/archives/2008/09/04/stalking-the-wild-27/">Ryan</a>, <a href="http://codex.wordpress.org/Version_2.7">Version 2.7</a>.</small></p>
<p>Dans la série de A à Z : <a href="http://www.papygeek.com/software/google-chrome-de-a-a-z/">Google Chrome</a>, <a href="http://www.papygeek.com/outils/tester-un-site-web-de-a-a-z/">Tester un site Web</a>.</p>
<!-- google_ad_section_end -->
    <hr noshade style="margin:0;height:1px" />
    <p style="font-size: 78%;">&copy;<a href="http://www.papygeek.com">PapyGeek</a>, 2008. <a href="http://www.papygeek.com/wordpress/wordpress-27-de-a-a-z/#comments">Voir les commentaires</a> de <a href="http://www.papygeek.com/wordpress/wordpress-27-de-a-a-z/"><strong>"WordPress 2.7 de A à Z"</strong></a>.<br />
    Voir les autres articles class&eacute;s sous <a href="http://www.papygeek.com/category/wordpress/" title="Voir tous les articles dans WordPress" rel="category tag">WordPress</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.papygeek.com/wordpress/wordpress-27-de-a-a-z/feed/</wfw:commentRss>
		<slash:comments>80</slash:comments>
	
	<enclosure url="http://www.papygeek.com/wp-content/uploads/pth/thumb_digg-threaded-comments.png" length="" type="image/jpeg" />
	<media:content url="http://www.papygeek.com/wp-content/uploads/pth/thumb_digg-threaded-comments.png" medium="image" />
	<media:thumbnail url="http://www.papygeek.com/wp-content/uploads/pth/thumb_digg-threaded-comments.png"  />
	<media:title type="html">WordPress 2.7 de A à Z</media:title>	</item>
		<item>
		<title>WordPress achète PollDaddy : des sondages dans votre blog</title>
		<link>http://www.papygeek.com/wordpress/wordpress-achete-polldaddy-des-sondages-dans-votre-blog/</link>
		<comments>http://www.papygeek.com/wordpress/wordpress-achete-polldaddy-des-sondages-dans-votre-blog/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 10:13:35 +0000</pubDate>
		<dc:creator>Papy</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Acquisition]]></category>
		<category><![CDATA[gravatar]]></category>
		<category><![CDATA[IntenseDebate]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[PollDaddy]]></category>
		<category><![CDATA[Sondage]]></category>
		<category><![CDATA[Sondages]]></category>
		<category><![CDATA[Sondages en ligne]]></category>
		<category><![CDATA[WordPress.com]]></category>

		<guid isPermaLink="false">http://www.papygeek.com/?p=2569</guid>
		<description><![CDATA[Automattic, la boîte derrière WordPress.com vient d&#8217;acquérir PollDaddy leader du marché des services de sondage en ligne. Vous avez sûrement déjà croisé les widgets de PollDaddy ici où là sur la blogosphère, et bien vous risquez de les voir bien plus souvent maintenant. Un bouton vient en effet d&#8217;être ajouté dans l&#8217;éditeur d&#8217;article de tous [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p><a title="Automattic" href="http://automattic.com/">Automattic</a>, la boîte derrière <a title="Wordpress.com" href="http://wordpress.com/">WordPress.com</a> vient d&#8217;acquérir <a title="PollDaddy" href="http://polldaddy.com/">PollDaddy</a> leader du marché des <strong>services de sondage en ligne</strong>.</p>
<p><a href="http://www.papygeek.com/wp-content/uploads/2008/10/polldaddy.png"><img class="aligncenter size-medium wp-image-2571" title="polldaddy" src="http://www.papygeek.com/wp-content/uploads/2008/10/polldaddy-500x357.png" alt="polldaddy 500x357 WordPress achète PollDaddy : des sondages dans votre blog" width="500" height="357" /></a></p>
<p>Vous avez sûrement déjà croisé les widgets de PollDaddy ici où là sur la blogosphère, et bien vous risquez de les voir bien plus souvent maintenant. <strong>Un bouton vient en effet d&#8217;être ajouté dans l&#8217;éditeur d&#8217;article de tous les blogs WordPress.com</strong> permettant de créer facilement un sondage PollDaddy.</p>
<div id="attachment_2572" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.papygeek.com/wp-content/uploads/2008/10/papy-geek-creer-un-nouvel-article-wordpress.png"><img class="size-medium wp-image-2572" title="papy-geek-creer-un-nouvel-article-wordpress" src="http://www.papygeek.com/wp-content/uploads/2008/10/papy-geek-creer-un-nouvel-article-wordpress-500x98.png" alt="Le nouveau bouton apparaît en rouge, l'intégration n'est donc pas formidable." width="500" height="98" /></a><p class="wp-caption-text">Le nouveau bouton apparaît en rouge, l&#39;intégration n&#39;est donc pas formidable.</p></div>
<p><a href="http://wordpress.org/extend/plugins/polldaddy/">Un plugin pour les blogs WordPress</a> est également disponible, mais ne sautez pas dessus, <a href="http://wordpress.org/support/topic/210707">pour l&#8217;instant c&#8217;est plutôt buggué</a>.</p>
<p>Voici une petite démonstration en vidéo, montrant que l&#8217;intégration avec WordPress est plutôt réussie :</p>
<div style="text-align:center;"><embed src="http://v.wordpress.com/im5ATfZQ" type="application/x-shockwave-flash" width="600" height="336" allowfullscreen="true"></embed></div>
<p>Bon allez, pour voir ce que donne le plugin, voici un petit test :</p>
<script type='text/javascript' language='javascript' charset='utf-8' src='http://s3.polldaddy.com/p/1002443.js'></script><noscript> <a href='http://answers.polldaddy.com/poll/1002443/'>View Poll</a></noscript>
<p>(Quand je vous dis que pour l&#8217;instant c&#8217;est buggué&#8230; )</p>
<p>Le code inséré dans l&#8217;article est de ce type :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009900;">&#91;</span>polldaddy poll<span style="color: #339933;">=</span><span style="color: #cc66cc;">1002443</span><span style="color: #009900;">&#93;</span></pre></div></div>

<p>Après <a href="http://blog.gravatar.com/2007/10/18/automattic-gravatar/">Gravatar</a> et <a href="http://blog.intensedebate.com/2008/09/23/automattic-acquires-intensedebate/">IntenseDebate</a>, voici donc <a href="http://www.google.com/search?hl=en&#038;q=automattic+acquires&#038;btnG=Google+Search&#038;meta=&#038;aq=f&#038;oq=">une acquisition de plus</a> qui donne certaines informations quant à l&#8217;avenir de WordPress, mais ça <a href="http://www.google.com/search?hl=en&#038;q=wordpress+bloatware&#038;btnG=Google+Search&#038;aq=f&#038;oq=">nous en reparlerons dans un prochain article</a> <img src='http://www.papygeek.com/wp-includes/images/smilies/wink.png' alt=';)' class='wp-smiley' title="WordPress achète PollDaddy : des sondages dans votre blog" /> </p>
<!-- google_ad_section_end -->
    <hr noshade style="margin:0;height:1px" />
    <p style="font-size: 78%;">&copy;<a href="http://www.papygeek.com">PapyGeek</a>, 2008. <a href="http://www.papygeek.com/wordpress/wordpress-achete-polldaddy-des-sondages-dans-votre-blog/#comments">Voir les commentaires</a> de <a href="http://www.papygeek.com/wordpress/wordpress-achete-polldaddy-des-sondages-dans-votre-blog/"><strong>"WordPress achète PollDaddy : des sondages dans votre blog"</strong></a>.<br />
    Voir les autres articles class&eacute;s sous <a href="http://www.papygeek.com/category/wordpress/" title="Voir tous les articles dans WordPress" rel="category tag">WordPress</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.papygeek.com/wordpress/wordpress-achete-polldaddy-des-sondages-dans-votre-blog/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
	
	<enclosure url="http://www.papygeek.com/wp-content/uploads/pth/thumb_polldaddy.png" length="" type="image/jpeg" />
	<media:content url="http://www.papygeek.com/wp-content/uploads/pth/thumb_polldaddy.png" medium="image" />
	<media:thumbnail url="http://www.papygeek.com/wp-content/uploads/pth/thumb_polldaddy.png"  />
	<media:title type="html">WordPress achète PollDaddy : des sondages dans votre blog</media:title>	</item>
		<item>
		<title>WordPress : ajouter un menu d&#8217;administration dans votre navigateur</title>
		<link>http://www.papygeek.com/wordpress/wordpress-ajouter-un-menu-dadministration-dans-votre-navigateur/</link>
		<comments>http://www.papygeek.com/wordpress/wordpress-ajouter-un-menu-dadministration-dans-votre-navigateur/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 06:34:42 +0000</pubDate>
		<dc:creator>Papy</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Bookmarks]]></category>
		<category><![CDATA[favoris]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[Liens]]></category>
		<category><![CDATA[Wordpress Bookmark Folder Generator]]></category>

		<guid isPermaLink="false">http://www.papygeek.com/?p=2082</guid>
		<description><![CDATA[Le plugin &#171;&#160;WordPress Bookmark Folder Generator&#160;&#187; est tout simple : il permet de générer un fichier &#171;&#160;bookmarks.html&#160;&#187; à importer dans votre navigateur. Vous aurez alors dans vos favoris des liens vers toutes les fonctions d&#8217;administration de votre blog. Le plugin prend en compte les liens supplémentaires installées dans l&#8217;administration WordPress par les plugins. Après avoir [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Le plugin &laquo;&nbsp;<a href="http://wordpress.org/extend/plugins/wordpress-bookmark-folder-generator/">WordPress Bookmark Folder Generator</a>&nbsp;&raquo; est tout simple : il permet de générer un fichier &laquo;&nbsp;<strong>bookmarks.html</strong>&nbsp;&raquo; à importer dans votre navigateur.</p>
<p style="text-align: center;"><a title="wordpress-bookmark-folder-generator" href="http://www.papygeek.com/wp-content/uploads/2008/09/wordpress-bookmark-folder-generator.png"><img class="attachment wp-att-2084 centered" src="http://www.papygeek.com/wp-content/uploads/2008/09/wordpress-bookmark-folder-generator.thumbnail.png" alt="wordpress-bookmark-folder-generator" width="500" height="153" title="WordPress : ajouter un menu dadministration dans votre navigateur" /></a></p>
<p>Vous aurez alors dans vos <strong>favoris des liens vers toutes les fonctions d&#8217;administration de votre blog.</strong><br />
Le plugin prend en compte les liens supplémentaires installées dans l&#8217;administration WordPress par les plugins. Après avoir activé le plugin, la génération du fichier s&#8217;effectue dans le menu &laquo;&nbsp;<strong>Réglages</strong>&laquo;&nbsp;.</p>
<p style="text-align: center;"><a title="papy-geek-bookmark-generator-wordpress" href="http://www.papygeek.com/wp-content/uploads/2008/09/papy-geek-bookmark-generator-wordpress.png"><img class="attachment wp-att-2083 centered" src="http://www.papygeek.com/wp-content/uploads/2008/09/papy-geek-bookmark-generator-wordpress.thumbnail.png" alt="papy-geek-bookmark-generator-wordpress" width="500" height="162" title="WordPress : ajouter un menu dadministration dans votre navigateur" /></a></p>
<p>Une fois le fichier importé dans votre navigateur, vous pouvez bien sûr désinstaller ou désactiver <a title="WordPress Bookmarks" href="http://wordpress.org/extend/plugins/wordpress-bookmark-folder-generator/">WordPress Bookmark Folder Generator</a>.</p>
<!-- google_ad_section_end -->
    <hr noshade style="margin:0;height:1px" />
    <p style="font-size: 78%;">&copy;<a href="http://www.papygeek.com">PapyGeek</a>, 2008. <a href="http://www.papygeek.com/wordpress/wordpress-ajouter-un-menu-dadministration-dans-votre-navigateur/#comments">Voir les commentaires</a> de <a href="http://www.papygeek.com/wordpress/wordpress-ajouter-un-menu-dadministration-dans-votre-navigateur/"><strong>"WordPress : ajouter un menu d&#8217;administration dans votre navigateur"</strong></a>.<br />
    Voir les autres articles class&eacute;s sous <a href="http://www.papygeek.com/category/wordpress/" title="Voir tous les articles dans WordPress" rel="category tag">WordPress</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.papygeek.com/wordpress/wordpress-ajouter-un-menu-dadministration-dans-votre-navigateur/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
	<enclosure url="http://www.papygeek.com/wp-content/uploads/pth/thumb_wordpress-bookmark-folder-generator.png" length="" type="image/jpeg" />
	<media:content url="http://www.papygeek.com/wp-content/uploads/pth/thumb_wordpress-bookmark-folder-generator.png" medium="image" />
	<media:thumbnail url="http://www.papygeek.com/wp-content/uploads/pth/thumb_wordpress-bookmark-folder-generator.png"  />
	<media:title type="html">WordPress : ajouter un menu d&#8217;administration dans votre navigateur</media:title>	</item>
		<item>
		<title>WordPress : intégrer facilement des favicons dans vos commentaires</title>
		<link>http://www.papygeek.com/wordpress/wordpress-integrer-facilement-des-favicons-dans-vos-commentaires/</link>
		<comments>http://www.papygeek.com/wordpress/wordpress-integrer-facilement-des-favicons-dans-vos-commentaires/#comments</comments>
		<pubDate>Sat, 06 Sep 2008 15:19:50 +0000</pubDate>
		<dc:creator>Papy</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Commentaires]]></category>
		<category><![CDATA[Favicon]]></category>
		<category><![CDATA[Icône]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Site Web]]></category>

		<guid isPermaLink="false">http://www.papygeek.com/?p=1944</guid>
		<description><![CDATA[Google dispose d&#8217;un service permettant de récupérer la favicon de n&#8217;importe quel site via une simple URL. En effet, Google Shared Stuff (S2) permet de retourner une image PNG (et non un .ico) à partir d&#8217;une URL cachée : http://www.google.com/s2/favicons?domain=www.papygeek.com L&#8217;intérêt est qu&#8217;il est alors possible d&#8217;intégrer facilement cette image sur n&#8217;importe quel site Web [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p><a href="http://www.google.fr/">Google</a> dispose d&#8217;un service permettant de <strong>récupérer la favicon de n&#8217;importe quel site via une simple <acronym title="Uniform Resource Locator">URL</acronym></strong>. En effet, <strong><a href="http://www.google.com/s2/sharing/stuff">Google Shared Stuff</a></strong> (S2) permet de retourner <strong>une image <acronym title="Portable Network Graphics">PNG</acronym></strong> (et non un .ico) à partir d&#8217;une <acronym title="Uniform Resource Locator">URL</acronym> cachée :</p>
<p><a href="http://www.google.com/s2/favicons?domain=www.papygeek.com"></p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">http://www.google.com/s2/favicons?domain=www.papygeek.com</pre></div></div>

<p></a></p>
<p style="text-align: center;"><a href="http://www.papygeek.com/wp-content/uploads/2008/09/favicon.png" title="favicon"><img src="http://www.papygeek.com/wp-content/uploads/2008/09/favicon.png" alt="favicon" width="426" height="32" class="attachment wp-att-1947 centered" title="WordPress : intégrer facilement des favicons dans vos commentaires" /></a></p>
<p>L&#8217;intérêt est qu&#8217;il est alors possible d&#8217;intégrer facilement cette image sur n&#8217;importe quel site Web dans une balise de type &lt;img&gt;, donc sans la moindre ligne de code. Google s&#8217;occupera tout seul de trouver la favicon.</p>
<p>Il existe en fait plusieurs façons d&#8217;intégrer une favicon sur un site en fonction des navigateurs :</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;shortcut icon&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;image/x-icon&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;/favicon.ico&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;icon&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;image/png&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;/favicon.png&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></div></div>

<p>Ou même simplement un fichier &laquo;&nbsp;<strong>favicon.ico</strong>&nbsp;&raquo; à la racine du site&#8230;<br />
Ici, le service de Google ne semble trouver la favicon correctement que si celle-ci se situe à la racine. Ce n&#8217;est pas dramatique puisque c&#8217;est quand même en général la bonne pratique à adopter pour que la favicon soit compatible avec un maximum de navigateurs.</p>
<p>Sous WordPress, pour pouvoir intégrer la favicon du site de ceux qui laissent un commentaire, il suffit d&#8217;éditer le fichier &laquo;&nbsp;<strong>comments.php</strong>&nbsp;&raquo; et d&#8217;y ajouter une ligne de ce type :</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: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_author_url</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/^http:\/\//'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_author_url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>   <span style="color: #000088;">$imgurl</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://www.google.com/s2/favicons?domain=&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$url</span><span style="color: #339933;">;</span>    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;img src=&quot;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$imgurl</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot; width=&quot;16&quot; height=&quot;16&quot; /&gt;'</span><span style="color: #339933;">;</span>	  <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Bien sûr, la technique est facilement adaptable à DotClear ou autre. Les commentaires sont là pour partager vos solutions.</p>
<p style="text-align: center;"><a href="http://www.papygeek.com/wp-content/uploads/2008/09/favicon-comments.png" title="favicon-comments"><img src="http://www.papygeek.com/wp-content/uploads/2008/09/favicon-comments.png" alt="favicon-comments" width="387" height="62" class="attachment wp-att-1946 centered" title="WordPress : intégrer facilement des favicons dans vos commentaires" /></a></p>
<p>Et évidemment, puisque l&#8217;image est hébergée sur les serveurs de Google, ça devrait rouler niveau charge&#8230; et ne pas ralentir votre site ou blog.</p>
<p><small><a href="http://www.labnol.org/internet/get-favicon-image-of-websites-with-google/4404/">Via</a>.</small></p>
<!-- google_ad_section_end -->
    <hr noshade style="margin:0;height:1px" />
    <p style="font-size: 78%;">&copy;<a href="http://www.papygeek.com">PapyGeek</a>, 2008. <a href="http://www.papygeek.com/wordpress/wordpress-integrer-facilement-des-favicons-dans-vos-commentaires/#comments">Voir les commentaires</a> de <a href="http://www.papygeek.com/wordpress/wordpress-integrer-facilement-des-favicons-dans-vos-commentaires/"><strong>"WordPress : intégrer facilement des favicons dans vos commentaires"</strong></a>.<br />
    Voir les autres articles class&eacute;s sous <a href="http://www.papygeek.com/category/wordpress/" title="Voir tous les articles dans WordPress" rel="category tag">WordPress</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.papygeek.com/wordpress/wordpress-integrer-facilement-des-favicons-dans-vos-commentaires/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
	<enclosure url="http://www.papygeek.com/wp-content/uploads/pth/thumb_favicon.png" length="" type="image/jpeg" />
	<media:content url="http://www.papygeek.com/wp-content/uploads/pth/thumb_favicon.png" medium="image" />
	<media:thumbnail url="http://www.papygeek.com/wp-content/uploads/pth/thumb_favicon.png"  />
	<media:title type="html">WordPress : intégrer facilement des favicons dans vos commentaires</media:title>	</item>
		<item>
		<title>Plugin WordPress inutile donc indispensable : fortune</title>
		<link>http://www.papygeek.com/wordpress/plugin-wordpress-inutile-donc-indispensable-fortune/</link>
		<comments>http://www.papygeek.com/wordpress/plugin-wordpress-inutile-donc-indispensable-fortune/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 15:14:26 +0000</pubDate>
		<dc:creator>Papy</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[BashFR]]></category>
		<category><![CDATA[Chuck Norris Facts]]></category>
		<category><![CDATA[citations]]></category>
		<category><![CDATA[Fortunes]]></category>
		<category><![CDATA[Plugin Citations]]></category>
		<category><![CDATA[plugin WordPress]]></category>
		<category><![CDATA[WordPress Citations]]></category>
		<category><![CDATA[WordPress Fortunes]]></category>

		<guid isPermaLink="false">http://www.papygeek.com/?p=1546</guid>
		<description><![CDATA[En lisant les Chuck Norris Facts dernièrement, je me suis dit &#171;&#160;tiens ça serait sympa de les intégrer sur le blog&#160;&#187;. Aussitôt dit, aussitôt fait et voilà donc un petit plugin WordPress permettant d&#8217;intégrer des citations de type &#171;&#160;fortune&#160;&#187; dans votre blog. Mais fortune, c&#8217;est quoi ? fortune est un programme simple qui affiche un [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>En lisant les <a href="http://chucknorrisfacts.fr/">Chuck Norris Facts</a> dernièrement, je me suis dit &laquo;&nbsp;tiens ça serait sympa de les intégrer sur le blog&nbsp;&raquo;. Aussitôt dit, aussitôt fait et voilà donc un petit <strong>plugin WordPress permettant d&#8217;intégrer des citations</strong> de type &laquo;&nbsp;fortune&nbsp;&raquo; dans votre blog.</p>
<p style="text-align: center;"><a title="papy-geek-fortune" href="http://www.papygeek.com/wp-content/uploads/2008/06/papy-geek-fortune.png"><img class="attachment wp-att-1549 centered" src="http://www.papygeek.com/wp-content/uploads/2008/06/papy-geek-fortune.thumbnail.png" alt="papy-geek-fortune" width="500" height="185" title="Plugin WordPress inutile donc indispensable : fortune" /></a></p>
<p>Mais <strong>fortune</strong>, c&#8217;est quoi ?</p>
<blockquote><p>fortune est un programme simple qui affiche un message au hasard provenant d&#8217;une base de données de citations. La plupart des distributions de fortune comprennent des fichiers de citations de personnalités célèbres, de phrases telles que celles des fortune cookies (d&#8217;où le nom), et d&#8217;autres messages humoristiques. Fortune se trouve principalement sur les systèmes UNIX, mais des clients pour d&#8217;autres plateformes existent également. Souvent les utilisateurs de terminaux Unix en mode texte placent cette commande dans leurs fichiers .profile et/ou .logout pour les afficher à la connexion et à la déconnexion, respectivement.</p></blockquote>
<p>C&#8217;est donc un format très connu, et vous trouverez des tas de fichiers de fortunes à travers le Web comme sur <a href="http://www.fortunes-fr.org/">Fortunes-FR</a>.</p>
<p>Pour installer le plugin, il vous suffit de télécharger et décompresser l&#8217;archive ci-dessous dans <strong>wp-content/plugins</strong> :</p>
Note: There is a file embedded within this post, please visit this post to download the file.
Note: There is a file embedded within this post, please visit this post to download the file.
<p>Vous pouvez ensuite copier des fichiers fortune dans le dossier &laquo;&nbsp;<strong>wp-content/plugins/pg_fortune/fortunes</strong>&laquo;&nbsp;. Ces fichiers sont composés de citations séparés par des lignes comprenant le caractère &laquo;&nbsp;%&nbsp;&raquo;. Les citations des <a href="http://chucknorrisfacts.fr/">Chuck Norris Facts</a> et de <a href="http://www.bashfr.org/">BashFR</a> sont intégrées.</p>
<p>Rendez-vous ensuite dans <strong>les options du plugin</strong> où vous pourrez choisir le fichier de citations à utiliser.</p>
<p style="text-align: center;"><a title="papy-geek-papygeek-fortune-wordpress" href="http://www.papygeek.com/wp-content/uploads/2008/06/papy-geek-papygeek-fortune-wordpress.png"><img class="attachment wp-att-1548 centered" src="http://www.papygeek.com/wp-content/uploads/2008/06/papy-geek-papygeek-fortune-wordpress.thumbnail.png" alt="papy-geek-papygeek-fortune-wordpress" width="500" height="389" title="Plugin WordPress inutile donc indispensable : fortune" /></a></p>
<p>Au menu des options avancées, la possibilité de remplacer un mot dans les citations, pour par exemple transformer &laquo;&nbsp;<strong>Chuck Norris a déjà compté jusqu&#8217;à l&#8217;infini. Deux fois.</strong>&nbsp;&raquo; en &laquo;&nbsp;<strong>PapyGeek a déjà compté jusqu&#8217;à l&#8217;infini. Deux fois.</strong>&nbsp;&raquo;</p>
<p>Pas prétentieux.</p>
<p>Il existe également une option désactivée par défaut permettant d&#8217;<strong>afficher les citations via JavaScript</strong> pour que celles-ci changent à chaque rafraichissement de page même si <a href="http://www.papygeek.com/wordpress/wordpress-optimiser-son-blog-avec-un-systeme-de-cache/">les pages sont en cache</a> avec <strong><acronym title="WordPress">WP</acronym> Super Cache</strong> par exemple.</p>
<p>Si vous voulez que les citations soient en cache, activez votre plugin de cache et décochez cette case. Le plugin utilisera alors simplement du <acronym title="HyperText Markup Language">HTML</acronym>/<acronym title="Pre-Hypertext Processing">PHP</acronym>.</p>
<p>Pour intégrer les citations dans votre thème, il suffit d&#8217;utiliser le code suivant :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;!-- A ajouter dans votre thème--&gt;
    <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;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'PGfortune'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> PGfortune<span style="color: #009900;">&#40;</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>
&lt;!-- Fin --&gt;</pre></div></div>

<p>Vous pouvez voir dans les options du plugin si tout fonctionne bien dans la section &laquo;&nbsp;Exemple&nbsp;&raquo; comme sur la capture ci-dessus.</p>
<p>Au passage, si vous voulez un autre plugin hyper utile, vous pouvez tester celui de Defaite qui vous permettra de <a href="http://www.defaite.fr/2008/06/28/plugin-wordpress-def-sms/">recevoir des messages de vos visiteurs directement sur Twitter ou par SMS</a> via un petit formulaire à ajouter sur votre blog (pourquoi pas dans la page de contact).</p>
<p style="text-align: center;"><a title="plugin-wordpress-def-sms-defaitefr" href="http://www.papygeek.com/wp-content/uploads/2008/06/plugin-wordpress-def-sms-defaitefr.png"><img class="attachment wp-att-1547 centered" src="http://www.papygeek.com/wp-content/uploads/2008/06/plugin-wordpress-def-sms-defaitefr.png" alt="plugin-wordpress-def-sms-defaitefr" width="195" height="245" title="Plugin WordPress inutile donc indispensable : fortune" /></a></p>
<p>Bon allez, je vous laisse bricoler votre WordPress <img src='http://www.papygeek.com/wp-includes/images/smilies/wink.png' alt=';)' class='wp-smiley' title="Plugin WordPress inutile donc indispensable : fortune" /> </p>
<!-- google_ad_section_end -->
    <hr noshade style="margin:0;height:1px" />
    <p style="font-size: 78%;">&copy;<a href="http://www.papygeek.com">PapyGeek</a>, 2008. <a href="http://www.papygeek.com/wordpress/plugin-wordpress-inutile-donc-indispensable-fortune/#comments">Voir les commentaires</a> de <a href="http://www.papygeek.com/wordpress/plugin-wordpress-inutile-donc-indispensable-fortune/"><strong>"Plugin WordPress inutile donc indispensable : fortune"</strong></a>.<br />
    Voir les autres articles class&eacute;s sous <a href="http://www.papygeek.com/category/wordpress/" title="Voir tous les articles dans WordPress" rel="category tag">WordPress</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.papygeek.com/wordpress/plugin-wordpress-inutile-donc-indispensable-fortune/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
	
	<enclosure url="http://www.papygeek.com/wp-content/uploads/pth/thumb_papy-geek-fortune.png" length="" type="image/jpeg" />
	<media:content url="http://www.papygeek.com/wp-content/uploads/pth/thumb_papy-geek-fortune.png" medium="image" />
	<media:thumbnail url="http://www.papygeek.com/wp-content/uploads/pth/thumb_papy-geek-fortune.png"  />
	<media:title type="html">Plugin WordPress inutile donc indispensable : fortune</media:title>	</item>
		<item>
		<title>WordPress 2.6 : les nouveautés à venir</title>
		<link>http://www.papygeek.com/wordpress/wordpress-26-les-nouveautes-a-venir/</link>
		<comments>http://www.papygeek.com/wordpress/wordpress-26-les-nouveautes-a-venir/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 16:09:25 +0000</pubDate>
		<dc:creator>Papy</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[fonctionnalités]]></category>
		<category><![CDATA[Télécharger WordPress 2.6]]></category>
		<category><![CDATA[WordPress 2.6]]></category>
		<category><![CDATA[WordPress Beta]]></category>

		<guid isPermaLink="false">http://www.papygeek.com/?p=1525</guid>
		<description><![CDATA[WordPress 2.6 vient d&#8217;être publié dans sa version beta 1 que vous pouvez télécharger ici. A première vue, vous ne remarquerez peut-être pas beaucoup de changements entre la version 2.5.1 et la version 2.6. Il y a tout de même deux nouvelles fonctionnalités importantes : le suivi des modifications pour les articles et l&#8217;utilisation de [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p><strong>WordPress 2.6</strong> vient d&#8217;être publié dans sa <a href="http://wordpress.org/download/beta/">version beta 1</a> que vous pouvez <a href="http://wordpress.org/wordpress-2.6-beta1.zip">télécharger ici</a>.</p>
<p style="text-align: center;"><a href="http://www.papygeek.com/wp-content/uploads/2008/06/wordpress-gears.png" title="wordpress-gears"><img src="http://www.papygeek.com/wp-content/uploads/2008/06/wordpress-gears.png" alt="wordpress-gears" width="214" height="59" class="attachment wp-att-1527 centered" title="WordPress 2.6 : les nouveautés à venir" /></a></p>
<p>A première vue, vous ne remarquerez peut-être pas beaucoup de changements entre la version 2.5.1 et la version 2.6. Il y a tout de même deux nouvelles fonctionnalités importantes : <a href="http://mdawaffe.wordpress.com/2008/05/22/post-revisions-in-wordpress-26/">le suivi des modifications pour les articles</a> et l&#8217;utilisation de <a href="http://gears.google.com/">Google Gears</a> pour les pages d&#8217;administration.</p>
<p style="text-align: center;"><a href="http://www.papygeek.com/wp-content/uploads/2008/06/post-revisions.png" title="post-revisions"><img src="http://www.papygeek.com/wp-content/uploads/2008/06/post-revisions.thumbnail.png" alt="post-revisions" width="500" height="461" class="attachment wp-att-1526 centered" title="WordPress 2.6 : les nouveautés à venir" /></a></p>
<p>Voici le détail des nouveautés attendues :</p>
<ul>
<li><strong>Mise en cache des fichiers statiques avec Google Gears</strong> pour accélérer le chargement des pages d&#8217;administration,</li>
<li>Une boîte de dialogue nouvelle et améliorée pour la manipulation des images dans les articles offrant beaucoup de possibilités,</li>
<li>Un <strong>aperçu des thèmes</strong> à la WordPress.com,</li>
<li>L&#8217;affichage du nombre de mots dans l&#8217;éditeur,</li>
<li>La possibilité de désactiver la publication à distance pour la sécurité,</li>
<li>Utilisation de l&#8217;<acronym title="Application Programming Interface">API</acronym> <acronym title="eXtensible Markup Language">XML</acronym>-<acronym title="Remote Procedure Call">RPC</acronym> pour changer les options du blog,</li>
<li>Un meilleur support du <acronym title="Secure Sockets Layer">SSL</acronym> pour l&#8217;administration,</li>
<li>Une vision hiérarchique dans la section &laquo;&nbsp;Gérer&nbsp;&raquo; des pages et des catégories,</li>
<li>La possibilité de déplacer le répertoire de votre contenu,</li>
<li>La possibilité de déplacer le fichier wp-config.php en dehors de la racine de vos pages Web,</li>
<li>Des galeries triables par drag-and-drop,</li>
<li><strong>La personnalisation de l&#8217;avatar par défaut</strong> qui supporte désormais <a href="http://en.blog.wordpress.com/2008/05/04/default-avatars/">MonsterID, Wavatar et Identicon</a>,</li>
<li><strong>L&#8217;activation, la désactivation et la suppression des plugins par lot</strong>. Les plugins actifs et inactifs étant maintenant séparés,</li>
<li>Les sélections multiples dans les menus avec des cases à cocher en maintenant la touche Shift pour sélectionner un intervalle,</li>
<li><strong>TinyMCE 3.1.0.1</strong> avec de nombreuses corrections de bugs,</li>
<li><strong>jQuery 1.2.6</strong> avec des performances améliorées,</li>
<li><strong>jQuery UI 1.5</strong>,</li>
<li>De nombreux bugs corrigés ainsi qu&#8217;une amélioration des performances.</li>
</ul>
<p style="text-align: center;"><a href="http://www.papygeek.com/wp-content/uploads/2008/06/avatar-options.jpg" title="avatar-options"><img src="http://www.papygeek.com/wp-content/uploads/2008/06/avatar-options.thumbnail.jpg" alt="avatar-options" width="499" height="500" class="attachment wp-att-1528 centered" title="WordPress 2.6 : les nouveautés à venir" /></a></p>
<p>Pour tester cette version sans provoquer trop de dommages sur votre blog, vous pouvez vous rendre sur <a href="http://wp.chrisjohnston.org/wp-admin/">cette page de démo</a> avec l&#8217;utilisateur &laquo;&nbsp;<strong>admin</strong>&nbsp;&raquo; et le mot de passe &laquo;&nbsp;<strong>demo</strong>&laquo;&nbsp;.</p>
<p>Vous pouvez également jeter un coup d&#8217;oeil à Trac pour <a href="http://trac.wordpress.org/query?status=closed&#038;milestone=2.6&#038;order=type&#038;desc=1">les tickets fermés</a> et<a href="http://trac.wordpress.org/query?status=new&#038;status=assigned&#038;status=reopened&#038;milestone=2.6&#038;order=type&#038;desc=1"> ceux encore ouverts</a> et planifiés pour la version 2.6.</p>
<!-- google_ad_section_end -->
    <hr noshade style="margin:0;height:1px" />
    <p style="font-size: 78%;">&copy;<a href="http://www.papygeek.com">PapyGeek</a>, 2008. <a href="http://www.papygeek.com/wordpress/wordpress-26-les-nouveautes-a-venir/#comments">Voir les commentaires</a> de <a href="http://www.papygeek.com/wordpress/wordpress-26-les-nouveautes-a-venir/"><strong>"WordPress 2.6 : les nouveautés à venir"</strong></a>.<br />
    Voir les autres articles class&eacute;s sous <a href="http://www.papygeek.com/category/wordpress/" title="Voir tous les articles dans WordPress" rel="category tag">WordPress</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.papygeek.com/wordpress/wordpress-26-les-nouveautes-a-venir/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	<enclosure url="http://www.papygeek.com/wp-content/uploads/pth/thumb_wordpress-gears.png" length="" type="image/jpeg" />
	<media:content url="http://www.papygeek.com/wp-content/uploads/pth/thumb_wordpress-gears.png" medium="image" />
	<media:thumbnail url="http://www.papygeek.com/wp-content/uploads/pth/thumb_wordpress-gears.png"  />
	<media:title type="html">WordPress 2.6 : les nouveautés à venir</media:title>	</item>
		<item>
		<title>WordPress : optimiser son blog avec un système de cache</title>
		<link>http://www.papygeek.com/wordpress/wordpress-optimiser-son-blog-avec-un-systeme-de-cache/</link>
		<comments>http://www.papygeek.com/wordpress/wordpress-optimiser-son-blog-avec-un-systeme-de-cache/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 06:05:53 +0000</pubDate>
		<dc:creator>Papy</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Accélérateur]]></category>
		<category><![CDATA[Accélérateur PHP]]></category>
		<category><![CDATA[APC]]></category>
		<category><![CDATA[BatCache]]></category>
		<category><![CDATA[cache d'objets]]></category>
		<category><![CDATA[Cache d'opcode]]></category>
		<category><![CDATA[cache sur disque]]></category>
		<category><![CDATA[digg]]></category>
		<category><![CDATA[Digg Effect]]></category>
		<category><![CDATA[DotClear]]></category>
		<category><![CDATA[eAccelerator]]></category>
		<category><![CDATA[Lighttpd]]></category>
		<category><![CDATA[Lock Down]]></category>
		<category><![CDATA[Memcache]]></category>
		<category><![CDATA[MemCached]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Opcode]]></category>
		<category><![CDATA[optimisation]]></category>
		<category><![CDATA[Performance WordPress]]></category>
		<category><![CDATA[performances]]></category>
		<category><![CDATA[Plugin APC]]></category>
		<category><![CDATA[Plugin BatCache]]></category>
		<category><![CDATA[Plugin Memcached]]></category>
		<category><![CDATA[Plugin Xcache]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[plugins Wordpress]]></category>
		<category><![CDATA[Rewrite]]></category>
		<category><![CDATA[super cache]]></category>
		<category><![CDATA[Systèmes de cache]]></category>
		<category><![CDATA[trafic]]></category>
		<category><![CDATA[WP Super Cache]]></category>
		<category><![CDATA[WP SuperCache]]></category>
		<category><![CDATA[WP-Cache 2]]></category>
		<category><![CDATA[XCache]]></category>

		<guid isPermaLink="false">http://www.papygeek.com/?p=1520</guid>
		<description><![CDATA[WordPress est souvent au coeur du débat en ce qui concerne ses performances. En tant que lecteur, vous avez sûrement rencontré quelques pages affichant des erreurs 500 ou MySQL sur un blog WordPress. En tant que blogueur, vous étiez enfin parvenu à obtenir un lien depuis Digg ou Presse Citron, et manque de chance, votre [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p><a title="WordPress" href="http://fr.wordpress.org/">WordPress</a> est souvent au coeur du débat en ce qui concerne ses <strong>performances</strong>.<br />
En tant que lecteur, vous avez sûrement rencontré quelques pages affichant des erreurs 500 ou MySQL sur un blog WordPress.</p>
<p>En tant que blogueur, vous étiez enfin parvenu à obtenir un lien depuis <a title="Digg" href="http://digg.com">Digg</a> ou <a title="Presse Citron" href="http://www.presse-citron.net/">Presse Citron</a>, et manque de chance, votre blog s&#8217;effondre à ce moment là.</p>
<p>Pire encore, vous êtes devenu un hardcore-blogueur et trustez depuis peu les classements <a href="http://www.wikio.fr/blogs/top">Wikio</a> et <a href="http://trends.google.com/websites?q=presse-citron.net%2C+fredcavazza.net%2C+maitre-eolas.fr%2C+papygeek.com%2C+2803.com&#038;geo=all&#038;date=all&#038;sort=0">Google Trends</a>, mais votre site affiche une page blanche une fois sur deux.</p>
<p>Alors que faire ? Vous pouvez toujours pester sur &laquo;&nbsp;le-code-dégueulasse-de-WordPress, DotClear-c&#8217;est-vachement-plus-propre-et-écolo&nbsp;&raquo; ou chercher une solution.<br />
Ca tombe bien, il en existe un certain nombre.</p>
<p style="text-align: center;"><a href="http://www.papygeek.com/wp-content/uploads/2008/06/wordpress.jpg" title="wordpress"><img src="http://www.papygeek.com/wp-content/uploads/2008/06/wordpress.thumbnail.jpg" alt="wordpress" width="300" height="300" class="attachment wp-att-1524 centered" title="WordPress : optimiser son blog avec un système de cache" /></a></p>
<p>Premièrement, et avant d&#8217;aller plus loin, pas la peine d&#8217;espérer absorber un trafic &laquo;&nbsp;monstre&nbsp;&raquo; sur un hébergement mutualisé. Un moment ou à un autre, les problèmes vont arriver et vous ne pourrez que faire durer un peu le plaisir en optimisant votre blog. Mais puisque vous êtes gentils, on va tout de même en parler un peu.</p>
<h2>Les systèmes de cache sur disque</h2>
<h3>Cache fichier simple</h3>
<p>Vous ne le savez peut-être pas, mais WordPress intégrait un système de cache sur disque depuis sa version 2.0. Ce cache s&#8217;activait en ajoutant dans son fichier <strong>wp-config.php</strong> la ligne suivante :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'ENABLE_CACHE'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Enable the WordPress Object Cache</span></pre></div></div>

<p>Les performances de ce cache étant plutôt décevantes, il fut désactivé dans la version 2.1 de WordPress pour finalement être supprimé dans la version 2.5. Pas la peine de courir sur votre fichier <strong>wp-config.php</strong> donc.</p>
<p>Pour ceux désireux de retrouver cette option de cache sur disque, les petits gars de chez <a href="http://neosmart.net/dl.php?id=14">NeoSmart ont développé un plugin réintrégrant cette fonctionnalité</a>.</p>
<p>L&#8217;avantage d&#8217;un tel système de cache est qu&#8217;il est compatible a priori sur tous les environnements : aucune extension particulière n&#8217;est nécessaire, ce qui en fait donc un candidat intéressant pour les hébergements mutualisés.</p>
<p>Pour le téléchargement, <a href="http://neosmart.net/downloads/software/WordPress/Plugins/object-cache/file-object-cache_1.0.zip">ça se passe ici</a>. Décompressez ensuite le fichier et transférez le sur votre hébergement dans <strong>wp-content</strong>.<br />
Ce qui donne directement depuis le serveur pour ceux ayant une connexion <acronym title="Secure Shell">SSH</acronym> :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>votresuperblog<span style="color: #000000; font-weight: bold;">/</span>wp-content
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>neosmart.net<span style="color: #000000; font-weight: bold;">/</span>downloads<span style="color: #000000; font-weight: bold;">/</span>software<span style="color: #000000; font-weight: bold;">/</span>WordPress<span style="color: #000000; font-weight: bold;">/</span>Plugins<span style="color: #000000; font-weight: bold;">/</span>object-cache<span style="color: #000000; font-weight: bold;">/</span>file-object-cache_1.0.zip
<span style="color: #c20cb9; font-weight: bold;">unzip</span> <span style="color: #660033;">-p</span> file-object-cache_1.0.zip <span style="color: #000000; font-weight: bold;">&gt;</span> object-cache.php.filebased</pre></div></div>

<p>N&#8217;oubliez pas de donner les bons droits au fichier (à personnaliser évidemment) :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chown</span> www-data:www-data object-cache.php.filebased</pre></div></div>

<p>Puis, pour activer le cache, il suffira de faire :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-p</span> object-cache.php.filebased object-cache.php</pre></div></div>

<h3>Le super cache : <acronym title="WordPress">WP</acronym> Super Cache</h3>
<p>C&#8217;est le système de cache le plus connu pour les blogs sous WordPress.<br />
Il est une amélioration du plugin <strong><acronym title="WordPress">WP</acronym>-Cache 2</strong> qui s&#8217;occupait déjà de créer des fichiers de cache des objets du blog.</p>
<p><a href="http://ocaoimh.ie/wp-super-cache/"><acronym title="WordPress">WP</acronym> Super Cache</a> va plus loin : il crée pour chaque page appelée un fichier <acronym title="HyperText Markup Language">HTML</acronym> (ou même html.gz) de la page. Vous aurez donc une copie complète de votre blog au format <acronym title="HyperText Markup Language">HTML</acronym> sous <strong>wp-content/cache/supercache</strong>. Au niveau performances, elles seront excellentes puisque seul apache sera utilisé pour transférer les pages à vos visiteurs, et <acronym title="Pre-Hypertext Processing">PHP</acronym>/MySQL périodiquement pour rafraichir les pages.</p>
<p>Il existe même une fonction permettant de résister à la plupart des Digg Effect : le &laquo;&nbsp;<strong>Lock Down</strong>&nbsp;&raquo; qui permet de verrouiller les fichiers de cache et donc de ne pas les régénérer quand un nouveau commentaire est publié.</p>
<p>Pour utiliser <strong><acronym title="WordPress">WP</acronym> Super cache</strong>, il faudra que votre hébergement supporte la réécriture d&#8217;<acronym title="Uniform Resource Locator">URL</acronym> via le fichier <strong>htaccess</strong> présent à la racine du blog. C&#8217;est un facteur qui peut être bloquant sur certains hébergements mutualisés.</p>
<p>Pour ceux en hébergement dédié, c&#8217;est le module <strong>rewrite</strong> qui est utilisé, et qui peut s&#8217;activer sous Apache 2 facilement avec un :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">a2enmod rewrite</pre></div></div>

<p>Vous devrez également utiliser une structure d&#8217;<acronym title="Uniform Resource Locator">URL</acronym> autre que celle par défaut (<strong>Réglages->Permaliens</strong> dans l&#8217;administration de WordPress).</p>
<p>Pour le reste, je vous laisse <a href="http://wordpress.org/extend/plugins/wp-super-cache/installation/">suivre la procédure d&#8217;installation</a>.</p>
<h2>Cache mémoire ou accélérateur <acronym title="Pre-Hypertext Processing">PHP</acronym></h2>
<p>Il existe plusieurs extensions WordPress permettant d&#8217;utiliser un système de cache mémoire ou certains accélérateurs <acronym title="Pre-Hypertext Processing">PHP</acronym>.</p>
<p>Ils nécessiteront tous une configuration particulière de <acronym title="Pre-Hypertext Processing">PHP</acronym> et/ou l&#8217;installation de binaires supplémentaires sur le système, ce qui en fait une solution réservée aux hébergement dédiés ou privés.</p>
<p>Dans tous les cas, l&#8217;installation sera la même : il suffira de copier un fichier <strong>object-cache.php</strong> dans <strong>wp-content</strong>.</p>
<h3>XCache</h3>
<p><a href="http://xcache.lighttpd.net/">XCache</a> est <a href="http://www.journaldunet.com/developpeur/tutoriel/php/040209php_systemes_cache1a.shtml">un cache d&#8217;opcode</a>, c&#8217;est à dire un cache permettant de stocker les fichiers générés par <acronym title="Pre-Hypertext Processing">PHP</acronym> juste avant leur exécution.<br />
<strong>XCache</strong> est développé par le créateur de <a href="http://www.lighttpd.net/">lighttpd</a> (lighty), un serveur Web très performant <a href="http://trac.lighttpd.net/trac/wiki/PoweredByLighttpd">utilisé par exemple par YouTube, Wikipedia et Mininova</a>. Il est souvent utilisé pour distribuer le contenu statique (images, vidéos, <acronym title="Cascading Style Sheets">CSS</acronym>&#8230;).</p>
<p>Avant d&#8217;installer le plugin XCache pour WordPress, il vous faudra installer XCache pour <acronym title="Pre-Hypertext Processing">PHP</acronym>.<br />
Si votre système ne date pas de la guerre (vous n&#8217;utilisez plus Firefox 1 n&#8217;est-ce pas ?), la commande suivante devrait faire l&#8217;affaire :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> php5-xcache</pre></div></div>

<p>Il faudra ensuite légèrement modifier la configuration d&#8217;XCache dans <strong>/etc/php5/conf.d/xcache.ini</strong> en modifiant certaines variables comme ci-dessous :</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">; to disable: xcache.size=0</span>
<span style="color: #666666; font-style: italic;">; to enable : xcache.size=64M etc (any size &gt; 0) and your system mmap allows</span>
xcache.size  <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">                64M</span>
&nbsp;
...
&nbsp;
<span style="color: #666666; font-style: italic;">; same as aboves but for variable cache</span>
xcache.var_size  <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">            16M</span></pre></div></div>

<p>Les valeurs sont données à titre indicatif, elles doivent seulement être non nulles.</p>
<p>N&#8217;oubliez pas de rédémarrer apache :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart</pre></div></div>

<p>Pour vérifier le bon chargement d&#8217;XCache, il suffit de créer un fichier phpinfo.php avec le contenu :</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>En accédant à cette page via le navigateur, une section XCache devrait apparaître :</p>
<p style="text-align: center;"><a href="http://www.papygeek.com/wp-content/uploads/2008/06/phpinfo-xcache.png" title="phpinfo-xcache"><img src="http://www.papygeek.com/wp-content/uploads/2008/06/phpinfo-xcache.thumbnail.png" alt="phpinfo-xcache" width="433" height="500" class="attachment wp-att-1523 centered" title="WordPress : optimiser son blog avec un système de cache" /></a></p>
<p>Il ne vous restera plus qu&#8217;à télécharger le <a href="http://neosmart.net/dl.php?id=12">plugin XCache pour WordPress disponible sur cette page</a>.</p>
<p>Ou directement depuis votre serveur :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>votresuperblog<span style="color: #000000; font-weight: bold;">/</span>wp-content
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>neosmart.net<span style="color: #000000; font-weight: bold;">/</span>downloads<span style="color: #000000; font-weight: bold;">/</span>software<span style="color: #000000; font-weight: bold;">/</span>WordPress<span style="color: #000000; font-weight: bold;">/</span>Plugins<span style="color: #000000; font-weight: bold;">/</span>object-cache<span style="color: #000000; font-weight: bold;">/</span>xcache-object-cache_0.6.zip
<span style="color: #c20cb9; font-weight: bold;">unzip</span> <span style="color: #660033;">-p</span> xcache-object-cache_0.6.zip <span style="color: #000000; font-weight: bold;">&gt;</span> object-cache.php.xcache</pre></div></div>

<p>On donne les bons droits au fichier :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chown</span> www-data:www-data object-cache.php.xcache</pre></div></div>

<p>Et une petite copie pour activer le cache :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-p</span> object-cache.php.xcache object-cache.php</pre></div></div>

<p>Pour surveiller le travail d&#8217;XCache, il faut paramétrer l&#8217;accès à la page d&#8217;administration. Pour cela, dans <strong>/etc/php5/conf.d/xcache.ini</strong>, paramétrez les variables &laquo;&nbsp;<strong>xcache.admin.user</strong>&nbsp;&raquo; et &laquo;&nbsp;<strong>xcache.admin.pass</strong>&laquo;&nbsp;.</p>
<p>Pour la variable <strong>xcache.admin.pass</strong>, il faut donner le md5 de votre mot de passe, vous pouvez l&#8217;obtenir en tapant :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;montmotdepasse&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> md5sum</pre></div></div>

<p>Modifiez ensuite la configuration d&#8217;apache en ajoutant la ligne :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">Alias <span style="color: #339933;">/</span>xcache<span style="color: #339933;">-</span>admin<span style="color: #339933;">/</span> <span style="color: #339933;">/</span>usr<span style="color: #339933;">/</span>share<span style="color: #339933;">/</span>xcache<span style="color: #339933;">/</span>admin<span style="color: #339933;">/</span></pre></div></div>

<p>(En supposant que les pages d&#8217;admin d&#8217;XCache se situent dans <strong>/usr/share/xcache/admin/</strong>. La commande &laquo;&nbsp;<strong>locate xcache</strong>&nbsp;&raquo; devrait vous aider à trouver le bon répertoire.)</p>
<p>Visitez la page <strong>/xcache-admin/</strong> dans votre navigateur pour observer l&#8217;activité d&#8217;XCache :</p>
<p style="text-align: center;"><a href="http://www.papygeek.com/wp-content/uploads/2008/06/xcache-122-administration.png" title="xcache-122-administration"><img src="http://www.papygeek.com/wp-content/uploads/2008/06/xcache-122-administration.thumbnail.png" alt="xcache-122-administration" width="500" height="292" class="attachment wp-att-1521 centered" title="WordPress : optimiser son blog avec un système de cache" /></a></p>
<h3>MemCached</h3>
<p><a href="http://www.danga.com/memcached/">MemCached</a> est <strong>un système distribué de cache d&#8217;objets en mémoire</strong>. Vous pouvez donc très bien installer le système de cache mémoire sur une autre machine que celle hébergeant votre site, et même multiplier les machines de cache.<br />
Pour information, <a href="http://www.facebook.com">Facebook</a> utilise plus de 800 serveurs Memcache. <a href="http://twitter.com/">Twitter</a> les utilise massivement aussi.</p>
<p>Pour installer memcached, il faudra donc deux choses : le service en lui-même ainsi que les modules et librairies nécessaires. Ce qui donne :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> memcached php5-memcache
a2enmod mem_cache</pre></div></div>

<p>Puis, rajouter à la fin de la configuration de <acronym title="Pre-Hypertext Processing">PHP</acronym> (<strong>/etc/php5/apache2/php.ini</strong> et/ou <strong>/etc/php5/cli/php.ini</strong> ) :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">extension</span>=memcache.so</pre></div></div>

<p>Un petit démarrage de memcached et un redémarrage d&#8217;Apache et tout devrait fonctionner :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>memcached start
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart</pre></div></div>

<p>Pour vérifier tout ça, jetez un coup d&#8217;oeil à phpinfo comme au dessus qui devrait afficher une section memcache :</p>
<p style="text-align: center;"><a href="http://www.papygeek.com/wp-content/uploads/2008/06/phpinfo-memcache.png" title="phpinfo-memcache"><img src="http://www.papygeek.com/wp-content/uploads/2008/06/phpinfo-memcache.thumbnail.png" alt="phpinfo-memcache" width="500" height="266" class="attachment wp-att-1522 centered" title="WordPress : optimiser son blog avec un système de cache" /></a></p>
<p>Il faut enfin installer <a href="http://dev.wp-plugins.org/browser/memcached">le plugin memcached pour WordPress téléchargeable ici</a>.<br />
Soit en ligne de commande :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>votresuperblog<span style="color: #000000; font-weight: bold;">/</span>wp-content
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>dev.wp-plugins.org<span style="color: #000000; font-weight: bold;">/</span>browser<span style="color: #000000; font-weight: bold;">/</span>memcached<span style="color: #000000; font-weight: bold;">/</span>branches<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.0</span><span style="color: #000000; font-weight: bold;">/</span>memcached-client.php?<span style="color: #007800;">format</span>=raw <span style="color: #660033;">-O</span> memcached-client.php
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>dev.wp-plugins.org<span style="color: #000000; font-weight: bold;">/</span>browser<span style="color: #000000; font-weight: bold;">/</span>memcached<span style="color: #000000; font-weight: bold;">/</span>trunk<span style="color: #000000; font-weight: bold;">/</span>object-cache.php?<span style="color: #007800;">format</span>=raw <span style="color: #660033;">-O</span> object-cache.php.ryan</pre></div></div>

<p>On donne les bons droits aux fichiers :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chown</span> www-data:www-data memcached-client.php object-cache.php.ryan</pre></div></div>

<p>Et une petite copie pour activer le cache :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-p</span> object-cache.php.ryan object-cache.php</pre></div></div>

<p>Et voilà!</p>
<h3>MemCached + BatCache</h3>
<p><a href="http://wordpress.org/extend/plugins/batcache/">BatCache</a> est un nouveau venu dans le monde des plugins de cache WordPress. Son nom était &laquo;&nbsp;supercache&nbsp;&raquo; pendant le développement mais comme &laquo;&nbsp;Super&nbsp;&raquo; était déjà pris, il a fallu trouver autre chose à la sortie du plugin. Je vous laisse imaginer d&#8217;où vient le &laquo;&nbsp;Bat&nbsp;&raquo;&#8230;</p>
<p>Le plugin utilise MemCached en backend pour sauvegarder les pages qui sont accédées plus de X fois en Y secondes et les stocke pendant Z secondes. X, Y et Z sont bien sûr paramétrables.</p>
<p>Vous ne pourrez pas utiliser <acronym title="WordPress">WP</acronym> Super Cache et BatCache en même temps, à vous donc de choisir entre un cache mémoire et un cache sur disque comme <acronym title="WordPress">WP</acronym> Super Cache.</p>
<p>Le créateur du plugin BatCache prétend que son activation réduit de 40 fois le temps de génération des pages de WordPress.</p>
<p><a href="http://wordpress.org/extend/plugins/batcache/installation/">L&#8217;installation est détaillée sur cette page</a>, le plugin étant tout jeune, il évoluera certainement dans les mois qui viennent. A suivre donc.</p>
<h3>APC</h3>
<p><a href="http://fr3.php.net/manual/fr/book.apc.php">APC</a> est un cache d&#8217;opcode au même titre qu&#8217;XCache.</p>
<p>L&#8217;installation est très proche de celle d&#8217;XCache, soit à peu de choses près :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> php-apc
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'
extension=apc.so'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>php.ini
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart</pre></div></div>

<p>Le <a href="http://txfx.net/files/wordpress/apc-object-cache.phps">plugin WordPress APC</a> doit lui être copié dans <strong>wp-content</strong> sous le nom <strong>object-cache.php</strong>.</p>
<h3>eAccelerator</h3>
<p>C&#8217;est exactement la même chose avec eAccelerator qui est encore un autre cache d&#8217;opcode.</p>
<p>Pour l&#8217;installation, je vous laisse chercher sur Google pour <a href="http://wiki.gandi.net/fr/hosting/using-linux/tutorials/debian/install-eaccelerator">quelques documentations</a>. C&#8217;est relativement simple et rapide.</p>
<p>Le plugin s&#8217;installe ensuite comme les autres :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>votresuperblog<span style="color: #000000; font-weight: bold;">/</span>wp-content
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>neosmart.net<span style="color: #000000; font-weight: bold;">/</span>downloads<span style="color: #000000; font-weight: bold;">/</span>software<span style="color: #000000; font-weight: bold;">/</span>WordPress<span style="color: #000000; font-weight: bold;">/</span>Plugins<span style="color: #000000; font-weight: bold;">/</span>object-cache<span style="color: #000000; font-weight: bold;">/</span>eaccelerator-object-cache_0.6.zip
<span style="color: #c20cb9; font-weight: bold;">unzip</span> <span style="color: #660033;">-p</span> http:<span style="color: #000000; font-weight: bold;">//</span>neosmart.net<span style="color: #000000; font-weight: bold;">/</span>downloads<span style="color: #000000; font-weight: bold;">/</span>software<span style="color: #000000; font-weight: bold;">/</span>WordPress<span style="color: #000000; font-weight: bold;">/</span>Plugins<span style="color: #000000; font-weight: bold;">/</span>object-cache<span style="color: #000000; font-weight: bold;">/</span>eaccelerator-object-cache_0.6.zip <span style="color: #000000; font-weight: bold;">&gt;</span> object-cache.php.eaccelerator
<span style="color: #c20cb9; font-weight: bold;">chown</span> www-data:www-data object-cache.php.eaccelerator
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-p</span> object-cache.php.eaccelerator object-cache.php</pre></div></div>

<h2>Quelle solution choisir ?</h2>
<p>En termes de performances, les caches d&#8217;opcode se valent. Certains donnent tout de même à XCache une légère longueur d&#8217;avance.</p>
<p>Si vous avez déjà un système de cache tel qu&#8217;<strong>XCache</strong>, <strong>Memcache</strong>, <strong>APC</strong> ou <strong>eAccelerator</strong> installé sur votre hébergement, le plus simple est certainement d&#8217;utiliser le plugin WordPress correspondant.</p>
<p>Quant à <acronym title="WordPress">WP</acronym> Super Cache, il permettra d&#8217;éviter la plupart des traitements coûteux, allégeant largement le serveur. La charge répercutée sur les disques (<a href="http://fr.wikipedia.org/wiki/Entr%C3%A9es-sorties">I/O</a>) sera souvent insignifiante vu les volumes échangés. Attention tout de même sur les hébergements mutualisés : vous ne pourrez pas monopoliser les ressources disques du serveur sans vous attirer des problèmes.</p>
<p><strong><acronym title="WordPress">WP</acronym> Super Cache est donc de loin la solution de cache la plus efficace pour un blog WordPress</strong>. </p>
<p>Seuls les problèmes d&#8217;installation ou les inconvénients de son activation peuvent être bloquants. On peut citer l&#8217;incompatibilité avec les plugins générant du contenu dynamique sur une page (par exemple en fonction du <a href="http://fr.wikipedia.org/wiki/R%C3%A9f%C3%A9rant">referer</a> comme avec landing sites), ou les problèmes avec certains compteurs ou plugins de statistiques.</p>
<p>Je conseillerai personnellement <strong>l&#8217;utilisation combinée de <acronym title="WordPress">WP</acronym> Super Cache + XCache</strong>, les deux solutions étant compatibles. <acronym title="WordPress">WP</acronym> Super Cache pourra être activé en permanence ou au besoin.</p>
<p>N&#8217;hésitez pas à apporter vos retours quant à la solution qui pour vous paraît la plus efficace.</p>
<h2>Allez plus loin ?</h2>
<p>L&#8217;utilisation d&#8217;un plugin de cache n&#8217;est qu&#8217;un moyen parmi d&#8217;autres d&#8217;optimiser son blog WordPress. Si vous avez entièrement la main sur votre hébergement, <strong>optimiser Apache/<acronym title="Pre-Hypertext Processing">PHP</acronym> et MySQL est tout aussi important</strong> (et laborieux). Voici quelques pistes souvent évoquées dans ce cadre.</p>
<h3>MySQL</h3>
<p>Parfois controversée, <strong>le cache sur les requêtes <acronym title="Structured Query Language">SQL</acronym></strong> peut aider à <strong>réduire la charge sur votre base de données</strong>. Dans <strong>/etc/mysql/my.cnf</strong> :</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;">#
# * Query Cache Configuration
#
<span style="color: #000099;">query_cache_type</span>        <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 1</span></pre></div></div>

<p>Pour alléger MySQL, la meilleure solution reste de réduire le nombre de plugins utilisés et surtout d&#8217;éviter ceux très gourmands pour la base : compteurs de visites, <a href="http://wordpress.org/extend/plugins/wp-stats/"><acronym title="WordPress">WP</acronym>-Stats</a> et autres plugins générant une ou plusieurs requêtes par visiteur. Il est préférable d&#8217;utiliser des équivalents externes en JavaScript : Google Analytics, <a href="http://wordpress.org/extend/plugins/stats/">WordPress.com Stats</a>, etc. Autant alourdir les bases de Google ou de WordPress.com plutôt que la votre.</p>
<h3>Apache</h3>
<p>La configuration d&#8217;Apache est plutôt compliquée et dépend fortement de votre matériel.<br />
Extrait d&#8217;un fichier <strong>/etc/apache2/apache2.conf</strong> :</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;">#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout <span style="">30</span>
&nbsp;
#
# KeepAlive: Whether or not to allow persistent connections <span style="">&#40;</span>more than
# one request per connection<span style="">&#41;</span>. Set to <span style="color: #933;">&quot;Off&quot;</span> to deactivate.
#
KeepAlive On
&nbsp;
#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to <span style="">0</span> to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests <span style="">100</span>
&nbsp;
#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout <span style="">8</span>
&nbsp;
##
## Server-Pool Size Regulation <span style="">&#40;</span>MPM specific<span style="">&#41;</span>
##
&nbsp;
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
&lt;IfModule mpm_prefork_module&gt;
    StartServers          <span style="">5</span>
    MinSpareServers       <span style="">8</span>
    MaxSpareServers      <span style="">50</span>
    MaxClients          <span style="">250</span>
    MaxRequestsPerChild   <span style="">500</span>
&lt;/IfModule&gt;
&nbsp;
# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
&lt;IfModule mpm_worker_module&gt;
    StartServers          <span style="">15</span>
    MaxClients          <span style="">250</span>
    MinSpareThreads      <span style="">10</span>
    MaxSpareThreads      <span style="">100</span>
    ThreadsPerChild      <span style="">100</span>
    MaxRequestsPerChild   <span style="">1000</span>
&lt;/IfModule&gt;</pre></div></div>

<p>A vous de tester et de rechercher la meilleure configuration pour votre machine. Les forums d&#8217;OVH ou de Dedibox ne manquent pas de discussions sur le sujet.</p>
<p>Si votre site est encore peu utilisé, vous pouvez faire quelques modifications puis les tester en utilisant Apache Bench :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> apache2-utils
ab <span style="color: #660033;">-n</span> <span style="color: #000000;">1000</span> <span style="color: #660033;">-c</span> <span style="color: #000000;">10</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.monserveur.com<span style="color: #000000; font-weight: bold;">/</span>mapagedetest.php</pre></div></div>

<p>La variable &laquo;&nbsp;<strong>Requests per second</strong>&nbsp;&raquo; vous indiquera le nombre de requêtes auxquelles votre serveur pourra répondre chaque seconde (pour la page testée).</p>
<h3><acronym title="Pre-Hypertext Processing">PHP</acronym></h3>
<p>Pour <acronym title="Pre-Hypertext Processing">PHP</acronym>, pensez à désactiver certaines fonctionnalités parfois pénalisantes en terme de performances (et surtout très mauvaises pour la sécurité) :</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;"><span style="color: #000099;">register_globals</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Off</span>
<span style="color: #000099;">register_long_arrays</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Off</span>
<span style="color: #000099;">register_argc_argv</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Off</span>
&nbsp;
&nbsp;
<span style="color: #000099;">magic_quotes_gpc</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Off</span>
<span style="color: #000099;">magic_quotes_runtime</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Off</span>
<span style="color: #000099;">magic_quotes_sybase</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Off</span></pre></div></div>

<p>Vous pouvez également modifier les limitations en termes de ressources :</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">;;;;;;;;;;;;;;;;;;;</span>
<span style="color: #666666; font-style: italic;">; Resource Limits ;</span>
<span style="color: #666666; font-style: italic;">;;;;;;;;;;;;;;;;;;;</span>
&nbsp;
<span style="color: #000099;">max_execution_time</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> <span style="">60</span>     </span><span style="color: #666666; font-style: italic;">; Maximum execution time of each script, in seconds</span>
<span style="color: #000099;">max_input_time</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> <span style="">30</span> </span><span style="color: #666666; font-style: italic;">; Maximum amount of time each script may spend parsing request data</span>
<span style="color: #666666; font-style: italic;">;max_input_nesting_level = 64 ; Maximum input variable nesting level</span>
<span style="color: #000099;">memory_limit</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 128M      </span><span style="color: #666666; font-style: italic;">; Maximum amount of memory a script may consume (128MB)</span>
...
<span style="color: #666666; font-style: italic;">; Maximum allowed size for uploaded files.</span>
<span style="color: #000099;">upload_max_filesize</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 6M</span></pre></div></div>

<p>Voilà quelques pistes qui j&#8217;espère vous aiderons à optimiser votre blog et donc à économiser quelques euros pour votre hébergement. Maintenant la page blanche ne devrait plus venir de votre serveur mais seulement de vous, alors au boulot <img src='http://www.papygeek.com/wp-includes/images/smilies/wink.png' alt=';)' class='wp-smiley' title="WordPress : optimiser son blog avec un système de cache" /> </p>
<!-- google_ad_section_end -->
    <hr noshade style="margin:0;height:1px" />
    <p style="font-size: 78%;">&copy;<a href="http://www.papygeek.com">PapyGeek</a>, 2008. <a href="http://www.papygeek.com/wordpress/wordpress-optimiser-son-blog-avec-un-systeme-de-cache/#comments">Voir les commentaires</a> de <a href="http://www.papygeek.com/wordpress/wordpress-optimiser-son-blog-avec-un-systeme-de-cache/"><strong>"WordPress : optimiser son blog avec un système de cache"</strong></a>.<br />
    Voir les autres articles class&eacute;s sous <a href="http://www.papygeek.com/category/wordpress/" title="Voir tous les articles dans WordPress" rel="category tag">WordPress</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.papygeek.com/wordpress/wordpress-optimiser-son-blog-avec-un-systeme-de-cache/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
	
	<enclosure url="http://www.papygeek.com/wp-content/uploads/pth/thumb_wordpress.jpg" length="" type="image/jpeg" />
	<media:content url="http://www.papygeek.com/wp-content/uploads/pth/thumb_wordpress.jpg" medium="image" />
	<media:thumbnail url="http://www.papygeek.com/wp-content/uploads/pth/thumb_wordpress.jpg"  />
	<media:title type="html">WordPress : optimiser son blog avec un système de cache</media:title>	</item>
		<item>
		<title>Fluency : un thème pour l&#8217;administration de WordPress 2.5</title>
		<link>http://www.papygeek.com/wordpress/fluency-un-theme-pour-ladministration-de-wordpress-25/</link>
		<comments>http://www.papygeek.com/wordpress/fluency-un-theme-pour-ladministration-de-wordpress-25/#comments</comments>
		<pubDate>Fri, 14 Mar 2008 16:45:43 +0000</pubDate>
		<dc:creator>Papy</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[thème]]></category>
		<category><![CDATA[WordPress 2.5]]></category>

		<guid isPermaLink="false">http://www.papygeek.com/wordpress/fluency-un-theme-pour-ladministration-de-wordpress-25/</guid>
		<description><![CDATA[L&#8217;interface d&#8217;administration de WordPress 2.5 (qui devrait sortir la semaine prochaine) ne plait pas forcément à tout le monde, tout comme l&#8217;ancienne interface de WordPress. Certains s&#8217;étaient habitués à l&#8217;utilisation de thèmes alternatifs comme WP Tiger. Seulement, celui-ci ne fonctionne plus avec la version 2.5 de WordPress, d&#8217;où l&#8217;arrivée du thème Fluency. Le thème s&#8217;installe [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>L&#8217;interface d&#8217;administration de <a href="http://codex.wordpress.org/Version_2.5">WordPress 2.5</a> (qui devrait sortir la semaine prochaine) ne plait pas forcément à tout le monde, tout comme l&#8217;ancienne interface de WordPress. Certains s&#8217;étaient habitués à l&#8217;utilisation de thèmes alternatifs comme <a href="http://orderedlist.com/wordpress-plugins/wp-tiger-administration/"><acronym title="WordPress">WP</acronym> Tiger</a>. Seulement, celui-ci ne fonctionne plus avec la version 2.5 de WordPress, d&#8217;où l&#8217;arrivée du thème <strong><a href="http://www.deanjrobinson.com/projects/fluency-admin/">Fluency</a></strong>.</p>
<p>Le thème s&#8217;installe facilement (comme un plugin) et donne le résultat suivant :</p>
<p><strong>Tableau de Bord</strong> :</p>
<p style="text-align: center;"><a href="http://www.papygeek.com/wp-content/uploads/2008/03/fluency-dashboard.jpg" title="Fluency Dashboard"><img src="http://www.papygeek.com/wp-content/uploads/2008/03/fluency-dashboard.thumbnail.jpg" width="500" height="312" alt="Fluency Dashboard" class="imageframe imgaligncenter" title="Fluency : un thème pour ladministration de WordPress 2.5" /></a></p>
<p><strong>Écrire un Article</strong> :</p>
<p style="text-align: center;"><a href="http://www.papygeek.com/wp-content/uploads/2008/03/fluency-ecrire.jpg" title="Fluency Ecrire"><img src="http://www.papygeek.com/wp-content/uploads/2008/03/fluency-ecrire.thumbnail.jpg" width="500" height="312" alt="Fluency Ecrire" class="imageframe imgaligncenter" title="Fluency : un thème pour ladministration de WordPress 2.5" /></a></p>
<p><strong>Plugins</strong> :</p>
<p style="text-align: center;"><a href="http://www.papygeek.com/wp-content/uploads/2008/03/fluency-plugins.jpg" title="Fluency Plugins"><img src="http://www.papygeek.com/wp-content/uploads/2008/03/fluency-plugins.thumbnail.jpg" width="500" height="311" alt="Fluency Plugins" class="imageframe imgaligncenter" title="Fluency : un thème pour ladministration de WordPress 2.5" /></a></p>
<p>Pas de doute, c&#8217;est plus sobre que l&#8217;original. Si le style vous plait, le téléchargement se passe ici :</p>
<p class="download"><a href="http://www.deanjrobinson.com/download/wp-admin-fluency-1.0.zip">Fluency Admin 1.0</a></p>
<!-- google_ad_section_end -->
    <hr noshade style="margin:0;height:1px" />
    <p style="font-size: 78%;">&copy;<a href="http://www.papygeek.com">PapyGeek</a>, 2008. <a href="http://www.papygeek.com/wordpress/fluency-un-theme-pour-ladministration-de-wordpress-25/#comments">Voir les commentaires</a> de <a href="http://www.papygeek.com/wordpress/fluency-un-theme-pour-ladministration-de-wordpress-25/"><strong>"Fluency : un thème pour l&#8217;administration de WordPress 2.5"</strong></a>.<br />
    Voir les autres articles class&eacute;s sous <a href="http://www.papygeek.com/category/wordpress/" title="Voir tous les articles dans WordPress" rel="category tag">WordPress</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.papygeek.com/wordpress/fluency-un-theme-pour-ladministration-de-wordpress-25/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
	<enclosure url="http://www.papygeek.com/wp-content/uploads/pth/thumb_fluency-dashboard.jpg" length="" type="image/jpeg" />
	<media:content url="http://www.papygeek.com/wp-content/uploads/pth/thumb_fluency-dashboard.jpg" medium="image" />
	<media:thumbnail url="http://www.papygeek.com/wp-content/uploads/pth/thumb_fluency-dashboard.jpg"  />
	<media:title type="html">Fluency : un thème pour l&#8217;administration de WordPress 2.5</media:title>	</item>
	</channel>
</rss>
