<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ta vie on s'en fout! &#187; Lester Chan</title>
	<atom:link href="http://tavie.onsenfout.com/tag/lester-chan/feed/" rel="self" type="application/rss+xml" />
	<link>http://tavie.onsenfout.com</link>
	<description>Mon bazar techno-miam</description>
	<lastBuildDate>Tue, 22 Nov 2011 11:06:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Adieu WP-Print, bonjour la feuille de style print.css</title>
		<link>http://tavie.onsenfout.com/2009/10/07/adieu-wp-print-bonjour-la-feuille-de-style-print-css/</link>
		<comments>http://tavie.onsenfout.com/2009/10/07/adieu-wp-print-bonjour-la-feuille-de-style-print-css/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 14:39:05 +0000</pubDate>
		<dc:creator>François</dc:creator>
				<category><![CDATA[Bits]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[feuille de style]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[impression]]></category>
		<category><![CDATA[Lester Chan]]></category>
		<category><![CDATA[print.css]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[WP-Print]]></category>

		<guid isPermaLink="false">http://tavie.onsenfout.com/?p=192</guid>
		<description><![CDATA[J&#8217;ai longtemps utilisé l&#8217;excellent plugin WordPress de Lester Chan WP-Print , qui permet de supprimer les éléments indésirables à l&#8217;impression (barre de menu, pied de page, etc&#8230;). J&#8217;avais bien lu dans différentes doc que les feuilles de style CSS permettaient d&#8217;arriver au même résultat mais je n&#8217;avais pas pris le temps d&#8217;approfondir le sujet en [...]<br /><div><img src="http://tavie.onsenfout.com/wp-content/plugins/gd-star-rating/gfx.php?value=0.0" /></div><div>Rating: 0.0/<strong>5</strong> (0 votes cast)</div><br /><a target="_blank" href="http://www.gdstarrating.com/"><img src="http://tavie.onsenfout.com/wp-content/plugins/gd-star-rating/gfx/powered.png" border="0" width="80" height="15" /></a><br />]]></description>
			<content:encoded><![CDATA[<p>J&#8217;ai longtemps utilisé l&#8217;excellent plugin WordPress de Lester Chan <a href="http://wordpress.org/extend/plugins/wp-print/" target="_blank">WP-Print</a> , qui permet de supprimer les éléments indésirables à l&#8217;impression (barre de menu, pied de page, etc&#8230;). J&#8217;avais bien lu dans différentes doc que les feuilles de style CSS permettaient d&#8217;arriver au même résultat mais je n&#8217;avais pas pris le temps d&#8217;approfondir le sujet en me disant que ça allait être long et douloureux.</p>
<p>En fait c&#8217;est très simple et les impressions des billets de ce blog fonctionnent maintenant sur ce principe. Voici la marche à suivre :<span id="more-192"></span></p>
<p>Tout d&#8217;abord il faut créer dans le répertoire du thème une feuille de style <strong>print.css</strong> qui sera dédiée aux impressions. Ensuite, en reprenant les sections définies dans la feuille de style principale (<strong>style.css</strong> en général sous WordPress) on définit des instructions de formatage spécifiques à l&#8217;impression. Quelques exemples :</p>
<p>Pour exclure le menu latéral de l&#8217;impression (<strong>#sidebar</strong> ici, ça peut aussi être <strong>#menu</strong>) :</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#sidebar</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>C&#8217;est tout! On procède de la même façon pour tous les éléments à exclure, pour le pied de page ça sera :</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#footer</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Certains navigateurs basés sur Gecko ont du mal à imprimer les éléments flottants et les tronquent à la fin de la première page. Le remède est là (on en profite pour redéfinir les marges) :</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#content</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span> !important<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Pour supprimer les images et couleurs de l&#8217;arrière plan :</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">body <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">white</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Pour ajouter l&#8217;URL des liens à la suite de leur libellé :</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#content</span> a<span style="color: #3333ff;">:link</span><span style="color: #3333ff;">:after</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#content</span> a<span style="color: #3333ff;">:visited</span><span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot; (&quot;</span> attr<span style="color: #00AA00;">&#40;</span>href<span style="color: #00AA00;">&#41;</span> <span style="color: #ff0000;">&quot;) &quot;</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">90%</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>On peut améliorer à loisir cette feuille de style pour faire une mise en page &laquo;&nbsp;papier&nbsp;&raquo; aussi soignée que ce qu&#8217;on peut faire sur écran. Je n&#8217;ai écouté que mon courage, et je me suis arrêté là.</p>
<p>La dernière chose à faire (encore un effort!) est de charger cette nouvelle feuille de style. Avec WordPress, on édite le fichier header.php du thème et on ajoute la ligne suivante dans la section &lt;head&gt; :</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;print&quot; href=&quot;&lt;?php bloginfo('stylesheet_directory'); ?&gt;;/print.css&quot; /&gt;;</pre></div></div>

<p>Voici le fichier <a href="http://tavie.onsenfout.com/wp-content/themes/our-rights-fr/print.css" target="_blank">print.css</a> que j&#8217;utilise ici. Il est très basique mais si ça peut servir&#8230;</p>
<h3>Liens :</h3>
<p><a href="http://codex.wordpress.org/Styling_for_Print" target="_blank">WordPress Codex &#8211; Styling for print (en)</a></p>
<p><a href="http://www.pompage.net/pompe/impression/" target="_blank">Pompage &#8211; Faites bonne impression avec les CSS</a></p>
<br /><div><img src="http://tavie.onsenfout.com/wp-content/plugins/gd-star-rating/gfx.php?value=0.0" /></div><div>Rating: 0.0/<strong>5</strong> (0 votes cast)</div><br /><a target="_blank" href="http://www.gdstarrating.com/"><img src="http://tavie.onsenfout.com/wp-content/plugins/gd-star-rating/gfx/powered.png" border="0" width="80" height="15" /></a><br />]]></content:encoded>
			<wfw:commentRss>http://tavie.onsenfout.com/2009/10/07/adieu-wp-print-bonjour-la-feuille-de-style-print-css/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Traduction française du plugin WordPress WP-Print 2.3 beta 2</title>
		<link>http://tavie.onsenfout.com/2008/04/07/traduction-francaise-du-plugin-wordpress-wp-print-23-beta-2/</link>
		<comments>http://tavie.onsenfout.com/2008/04/07/traduction-francaise-du-plugin-wordpress-wp-print-23-beta-2/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 17:18:07 +0000</pubDate>
		<dc:creator>François</dc:creator>
				<category><![CDATA[Bits]]></category>
		<category><![CDATA[Lester Chan]]></category>
		<category><![CDATA[traduction]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress 2.5]]></category>
		<category><![CDATA[WP-Print]]></category>

		<guid isPermaLink="false">http://tavie.onsenfout.com/?p=46</guid>
		<description><![CDATA[Finalement comme il n&#8217;y avait pas grand-chose à faire j&#8217;ai traduit en français WP-Print 2.3 beta 2, compatible WordPress 2.5. J&#8217;attends quand même la version finale (prévue en juin) pour envoyer la traduction à Lester Chan et à WordPress Francophone. Télécharger WP-Print 2.3 beta 2 FR Edit du 19/05/2008 : La version 2.3 finale est [...]<br /><div><img src="http://tavie.onsenfout.com/wp-content/plugins/gd-star-rating/gfx.php?value=0.0" /></div><div>Rating: 0.0/<strong>5</strong> (0 votes cast)</div><br /><a target="_blank" href="http://www.gdstarrating.com/"><img src="http://tavie.onsenfout.com/wp-content/plugins/gd-star-rating/gfx/powered.png" border="0" width="80" height="15" /></a><br />]]></description>
			<content:encoded><![CDATA[<p>Finalement comme il n&#8217;y avait pas grand-chose à faire j&#8217;ai traduit en français WP-Print 2.3 beta 2, compatible WordPress 2.5. J&#8217;attends quand même la version finale (prévue en juin) pour envoyer la traduction à Lester Chan et à <a href="http://www.wordpress-fr.net/" target="_blank">WordPress Francophone</a>.</p>
<p><a href="http://tavie.onsenfout.com/wp-content/uploads/2008/04/wp-print23b2-fr.zip">Télécharger WP-Print 2.3 beta 2 FR</a></p>
<p>Edit du 19/05/2008 : La <a href="http://tavie.onsenfout.com/wp-content/uploads/2008/05/wp-print230.zip">version 2.3 finale</a> est en ligne.</p>
<p>Voir aussi ce <a href="/2008/06/13/installation-et-utilisation-du-plugin-wordpress-wp-print/">petit tuto d&#8217;installation</a></p>
<br /><div><img src="http://tavie.onsenfout.com/wp-content/plugins/gd-star-rating/gfx.php?value=0.0" /></div><div>Rating: 0.0/<strong>5</strong> (0 votes cast)</div><br /><a target="_blank" href="http://www.gdstarrating.com/"><img src="http://tavie.onsenfout.com/wp-content/plugins/gd-star-rating/gfx/powered.png" border="0" width="80" height="15" /></a><br />]]></content:encoded>
			<wfw:commentRss>http://tavie.onsenfout.com/2008/04/07/traduction-francaise-du-plugin-wordpress-wp-print-23-beta-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mise à jour vers WordPress 2.5</title>
		<link>http://tavie.onsenfout.com/2008/04/07/mise-a-jour-vers-wordpress-25/</link>
		<comments>http://tavie.onsenfout.com/2008/04/07/mise-a-jour-vers-wordpress-25/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 12:08:18 +0000</pubDate>
		<dc:creator>François</dc:creator>
				<category><![CDATA[Bits]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[Lester Chan]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[traduction]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress 2.5]]></category>
		<category><![CDATA[WP-Print]]></category>

		<guid isPermaLink="false">http://tavie.onsenfout.com/?p=45</guid>
		<description><![CDATA[J&#8217;ai mis à jour ce blog vers la version 2.5 de WordPress qui apporte un bon lot d&#8217;améliorations dans l&#8217;interface d&#8217;administration. La mise à jour s&#8217;est passée sans histoire (par svn), et tous les plugins installés fonctionnent avec la nouvelle version. WP-Print 2.2 était incompatible mais Lester Chan à développé de nouvelles versions de ses [...]<br /><div><img src="http://tavie.onsenfout.com/wp-content/plugins/gd-star-rating/gfx.php?value=0.0" /></div><div>Rating: 0.0/<strong>5</strong> (0 votes cast)</div><br /><a target="_blank" href="http://www.gdstarrating.com/"><img src="http://tavie.onsenfout.com/wp-content/plugins/gd-star-rating/gfx/powered.png" border="0" width="80" height="15" /></a><br />]]></description>
			<content:encoded><![CDATA[<p>J&#8217;ai mis à jour ce blog vers <a href="http://www.wordpress-fr.net/blog/wordpress/presentation-de-wordpress-25-par-matt" target="_blank">la version 2.5 de WordPress</a> qui apporte un bon lot d&#8217;améliorations dans l&#8217;interface d&#8217;administration. La mise à jour s&#8217;est passée sans histoire (par svn), et tous les plugins installés fonctionnent avec la nouvelle version.</p>
<p><span id="more-45"></span>WP-Print 2.2 était incompatible mais Lester Chan à développé de <a href="http://lesterchan.net/wordpress/2008/03/30/my-plugins-compatibility-with-wordpress-25/" target="_blank">nouvelles versions</a> de ses plugins compatibles avec WP 2.5. La version <a href="http://tavie.onsenfout.com/wp-content/uploads/2008/04/wp-print23b2-fr.zip">WP-Print 2.3 beta 2</a> semble bien fonctionner, à vous de le dire. J&#8217;attends la version finale pour faire la traduction, ça reste donc en anglais pour le moment. Pour les admins WordPress qui font la mise à jour WP-Print, pensez à mettre aussi à jour les permaliens sinon ça marche pas.</p>
<p>A l&#8217;usage j&#8217;ai eu quelques soucis avec la nouvelle interface de téléchargement de médias, Ajaxisée et Flashifiée à mort. Quand j&#8217;essayais d&#8217;uploader un fichier, rien ne se passait. Il y a <a href="http://wordpress.org/support/topic/164999" target="_blank">toute une page</a> (en anglais) qui recense les problèmes avec cette nouvelle interface. Pour ma part j&#8217;ai du faire les manips suivantes :</p>
<ul>
<li>Modifier le fichier .htaccess à la racine du blog et rajouter les lignes :</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">&lt;/<span style="color: #000000; font-weight:bold;">IfModule</span>&gt;
&lt;<span style="color: #000000; font-weight:bold;">IfModule</span> mod_security.c&gt;
&lt;<span style="color: #000000; font-weight:bold;">Files</span> async-upload.php&gt;
SecFilterEngine <span style="color: #0000ff;">Off</span>
SecFilterScanPOST <span style="color: #0000ff;">Off</span>
&lt;/<span style="color: #000000; font-weight:bold;">Files</span>&gt;
&lt;/<span style="color: #000000; font-weight:bold;">IfModule</span>&gt;</pre></div></div>

<ul>
<li>Mettre à jour le plugin Flash pour Firefox. Sous Ubuntu, c&#8217;est flashplugin-nonfree dans les dépots medibuntu.</li>
</ul>
<br /><div><img src="http://tavie.onsenfout.com/wp-content/plugins/gd-star-rating/gfx.php?value=0.0" /></div><div>Rating: 0.0/<strong>5</strong> (0 votes cast)</div><br /><a target="_blank" href="http://www.gdstarrating.com/"><img src="http://tavie.onsenfout.com/wp-content/plugins/gd-star-rating/gfx/powered.png" border="0" width="80" height="15" /></a><br />]]></content:encoded>
			<wfw:commentRss>http://tavie.onsenfout.com/2008/04/07/mise-a-jour-vers-wordpress-25/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Traduction française du plugin WordPress WP-Print 2.20</title>
		<link>http://tavie.onsenfout.com/2007/11/25/traduction-francaise-du-plugin-wordpress-wp-print-220/</link>
		<comments>http://tavie.onsenfout.com/2007/11/25/traduction-francaise-du-plugin-wordpress-wp-print-220/#comments</comments>
		<pubDate>Sat, 24 Nov 2007 23:51:53 +0000</pubDate>
		<dc:creator>François</dc:creator>
				<category><![CDATA[Bits]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[Lester Chan]]></category>
		<category><![CDATA[traduction]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress 2.5]]></category>
		<category><![CDATA[WP-Print]]></category>

		<guid isPermaLink="false">http://tavie.onsenfout.com/2007/11/25/traduction-francaise-du-plugin-wordpress-wp-print-220/</guid>
		<description><![CDATA[Grâce à l&#8217;excellent tuto de Marc Charvet j&#8217;ai traduit en français le non moins excellent plugin WP-Print de Lester Chan. On peut donc maintenant imprimer proprement et en français les excellents billets de ce blog en cliquant sur la petite imprimante en haut à gauche (il faut ouvrir le billet pour que la magie opère). [...]<br /><div><img src="http://tavie.onsenfout.com/wp-content/plugins/gd-star-rating/gfx.php?value=0.0" /></div><div>Rating: 0.0/<strong>5</strong> (0 votes cast)</div><br /><a target="_blank" href="http://www.gdstarrating.com/"><img src="http://tavie.onsenfout.com/wp-content/plugins/gd-star-rating/gfx/powered.png" border="0" width="80" height="15" /></a><br />]]></description>
			<content:encoded><![CDATA[<p>Grâce à l&#8217;excellent <a title="Tuto traduction thèmes et plugins wordpress" href="http://www.la57ieme.net/wordpress/articles/internationalisation-des-themesintroduction/">tuto de Marc Charvet</a> j&#8217;ai traduit en français le non moins excellent plugin WP-Print de <a title="Lester Chan programming" href="http://lesterchan.net/portfolio/programming.php">Lester Chan</a>. On peut donc maintenant imprimer proprement et en français les excellents <img src='http://tavie.onsenfout.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  billets de ce blog en cliquant sur la petite imprimante en haut à gauche (il faut ouvrir le billet pour que la magie opère).</p>
<p>Pour ceux que ça intéresse, en attendant que la traduction soit accessible sur le <a title="Traductions WP-Print" href="http://dev.wp-plugins.org/browser/wp-print/i18n">repository des plugins WordPress</a> on peut toujours la télécharger <a title="Traduction française WP-Print" href="/wp-content/uploads/2007/11/wp-print-fr_fr.zip">ici</a>. Pour l&#8217;installer il suffit de décompresser l&#8217;archive dans le répertoire wp-content/plugins/print. Il n&#8217;y a que les fichiers de localisation dans l&#8217;archive, le plugin doit déja être installé (version 2.20).</p>
<p>Edit du 26/11/2007 : j&#8217;ai mis en ligne une version complète francisée <a title="WP-Print 2.20 fr" href="/wp-content/uploads/2007/11/wp-print220-fr.zip">ici</a><br />
Edit du 28/11/2007 : Bravo à l&#8217;équipe de WordPress Francophone, le plugin francisé est aussi <a title="WP-Print Français" href="http://www.wordpress-fr.net/plugins?detail-file=wp-print">chez eux </a></p>
<p>Edit du 17/7/2008 : Attention, cette version n&#8217;est pas compatible avec WordPress 2.5. Téléchargez <a href="/wp-content/uploads/2008/05/wp-print230.zip">WP-Print 2.3</a>. Il y a aussi un <a href="/2008/06/13/installation-et-utilisation-du-plugin-wordpress-wp-print/">mini tuto  d&#8217;installation.</a></p>
<br /><div><img src="http://tavie.onsenfout.com/wp-content/plugins/gd-star-rating/gfx.php?value=0.0" /></div><div>Rating: 0.0/<strong>5</strong> (0 votes cast)</div><br /><a target="_blank" href="http://www.gdstarrating.com/"><img src="http://tavie.onsenfout.com/wp-content/plugins/gd-star-rating/gfx/powered.png" border="0" width="80" height="15" /></a><br />]]></content:encoded>
			<wfw:commentRss>http://tavie.onsenfout.com/2007/11/25/traduction-francaise-du-plugin-wordpress-wp-print-220/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

