<?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>Amicalement Web - Astuces et Bons plans dans le développement web &#187; plugin</title>
	<atom:link href="http://www.amicalement-web.net/tag/plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.amicalement-web.net</link>
	<description>Astuces et bons plans d&#039;un web developpeur</description>
	<lastBuildDate>Wed, 04 Jan 2012 14:54:26 +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>Symfony: Move ta Debug Bar</title>
		<link>http://www.amicalement-web.net/symfony-move-ta-debug-bar/2009/12/23/</link>
		<comments>http://www.amicalement-web.net/symfony-move-ta-debug-bar/2009/12/23/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 10:00:36 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://www.amicalement-web.net/?p=1049</guid>
		<description><![CDATA[Trivial, mais depuis le temps que ca me démangeait! Et peut-être que je ne suis pas le seul, d&#8217;où ce petit billet. Quand je développe sous Symfony, régulièrement, je dois fermer ma précieuse debug bar pour accéder à un lien en dessous. Du coup je suis obligé de recharger la page pour m&#8217;en servir de [...]]]></description>
			<content:encoded><![CDATA[<p><a  href="http://www.amicalement-web.net/symfony-move-ta-debug-bar/2009/12/23/"><img src="http://www.amicalement-web.net/wp-content/uploads/speed.png" alt="speed" title="speed" width="614" height="100" class="alignnone size-full wp-image-1061" /></a> Trivial, mais depuis le temps que ca me démangeait! Et peut-être que je ne suis pas le seul, d&#8217;où ce petit billet.<br />
Quand je développe sous Symfony, régulièrement, je dois fermer ma précieuse debug bar pour accéder à un lien en dessous. Du coup je suis obligé de recharger la page pour m&#8217;en servir de nouveau et depuis la 1.3, je m&#8217;en passe plus moi de ma debug bar.</p>
<p>J&#8217;ai donc pris 5min de mon temps pour faire rapido presto, un petit coup de jquery pour pouvoir bouger ma debug bar!<br />
<span id="more-1049"></span><br />
Tout simplement, j&#8217;ai juste utilisé un <a  href="http://blog.threedubmedia.com/2008/08/eventspecialdrag.html">script jquery</a> qui permet d&#8217;ajouter un event de type &laquo;&nbsp;drag&nbsp;&raquo; à un élément du DOM. Un petit coup de jquery pour l&#8217;utiliser sur la debug bar:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">jQuery<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#sfWebDebugBar&quot;</span><span style="color: #009900;">&#41;</span>
    .<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;dragstart&quot;</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> event <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
      $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;right&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;auto&quot;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>
    .<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;drag&quot;</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> event <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
      $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
        top<span style="color: #339933;">:</span> event.<span style="color: #660066;">offsetY</span><span style="color: #339933;">,</span>
        left<span style="color: #339933;">:</span> event.<span style="color: #660066;">offsetX</span>
      <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Il ne reste plus qu&#8217;à faire un petit filtre pour inclure ces 2 scripts automatiquement à la volée en environnement de dev. J&#8217;ai tout mis dans un petit plugin disponible plus bas mais je vous détaille le code ici pour ceux qui voudraient juste jeter un œil:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> moveWebDebugBarFilter <span style="color: #000000; font-weight: bold;">extends</span> sfFilter
<span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> execute<span style="color: #009900;">&#40;</span><span style="color: #000088;">$filterChain</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'dev'</span> <span style="color: #339933;">==</span> sfConfig<span style="color: #339933;">::</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sf_environment'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$response</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getContext</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getResponse</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #000088;">$response</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addJavascript</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/moveDebugBarPlugin/js/jquery.event.drag-1.5.min.js'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'last'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$response</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addJavascript</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/moveDebugBarPlugin/js/moveDebugBar.js'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'last'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000088;">$filterChain</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">execute</span><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: #009900;">&#125;</span></pre></div></div>

<p>que l&#8217;on rajoute dans notre <code>filters.yml</code></p>

<div class="wp_syntax"><div class="code"><pre class="yml" style="font-family:monospace;">rendering: ~
security:  ~
&nbsp;
# insert your own filters here
moveDebugBar:
  class: moveWebDebugBarFilter
&nbsp;
cache:     ~
execution: ~</pre></div></div>

<p>Il ne reste plus qu&#8217;à télécharger:<br />
<a  href="http://www.amicalement-web.net/symfony-move-ta-debug-bar/2009/12/23/movedebugbarplugin/" rel="attachment wp-att-1050">moveDebugBarPlugin</a><br />
et à lancer un petit:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">php symfony plugin:publish-asset</pre></div></div>

<p>Le plugin est très basique et rudimentaire évidemment, il ne sera pas encore sur le site de Symfony du coup. Mais si vous avez des idées d&#8217;améliorations ou d&#8217;enrichissements hésitez pas, sait-on jamais.</p>
<p>Voilà le rendu en vidéo, a noter que je l&#8217;ai testé avec Symfony 1.2 et 1.3:<br />
<object id='stUE1TSkxIR19eRFVdW1NcU19R' width='425' height='344' type='application/x-shockwave-flash' data='http://www.screentoaster.com/swf/STPlayer.swf'  codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0'><param name='movie' value='http://www.screentoaster.com/swf/STPlayer.swf'/><param name='allowFullScreen' value='true'/><param name='allowScriptAccess' value='always'/><param name='flashvars' value='video=stUE1TSkxIR19eRFVdW1NcU19R'/></object>
<div style='width: 425px; text-align: right;'><a  href="http://www.screentoaster.com/">Capture your screen in seconds</a></div>
<p><small>Crédit photo: http://www.flickr.com/photos/kaidohmaru/453263320/</small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.amicalement-web.net/symfony-move-ta-debug-bar/2009/12/23/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Développement Web: les bons plans de la semaine #26</title>
		<link>http://www.amicalement-web.net/developpement-web-les-bons-plans-de-la-semaine-26/2009/12/07/</link>
		<comments>http://www.amicalement-web.net/developpement-web-les-bons-plans-de-la-semaine-26/2009/12/07/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 10:00:40 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Bons plans]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[icone]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[service]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://www.amicalement-web.net/?p=1002</guid>
		<description><![CDATA[Premier billet hors bon plans de la semaine jeudi dernier depuis quelques temps, on est sur la bonne voie pour reprendre les choses en mains. Même si ce sont des billets pas vraiment techniques encore, j&#8217;ai bon espoir d&#8217;arriver à reprendre un rythme un peu plus régulier. Celui de mercredi est même déjà programmé, c&#8217;est [...]]]></description>
			<content:encoded><![CDATA[<p><a  href="http://www.amicalement-web.net/developpement-web-les-bons-plans-de-la-semaine-26/2009/12/07"><img src="http://www.amicalement-web.net/wp-content/uploads/christmas.png" alt="christmas" title="christmas" width="614" height="100" class="alignnone size-full wp-image-1006" /></a> Premier billet hors bon plans de la semaine jeudi dernier depuis quelques temps, on est sur la bonne voie pour reprendre les choses en mains. Même si ce sont des billets pas vraiment techniques encore, j&#8217;ai bon espoir d&#8217;arriver à reprendre un rythme un peu plus régulier. Celui de mercredi est même déjà programmé, c&#8217;est pour dire!</p>
<p>C&#8217;était pour vous tenir au courant un peu. Mais voici ce que vous êtes venu chercher, les bons plans de la semaine.<br />
<span id="more-1002"></span></p>
<ul>
<li><a  href="http://www.highcharts.com/">Des graphs en jQuery qu&#8217;ils sont beaux</a><br />
Le flash, j&#8217;aime pas trop, mais son utilisation pour des graphiques m&#8217;a toujours semblé adapté. Mais petit à petit jQuery grignote ce secteur, en voici une nouvelle illustration très réussie.</li>
<li><a  href="http://techportal.ibuildings.com/2009/12/01/profiling-with-xhprof/">Profiler vos script PHP</a><br />
Une alternative à xdebug très bien introduite par ce billet</li>
<li><a  href="http://www.sitepoint.com/blogs/2009/11/30/online-presentation-tools/">12 sites pour vos présentations en lignes</a><br />
Parce que c&#8217;est devenu un peu une grosse source de connaissance, les présentations exposées en conférence puis mise en ligne, les outils ne manquent donc pas.</li>
<li><a  href="http://webworkerdaily.com/2009/12/05/twittering-causes-blindness-busting-social-media-myths/">Les myths des réseaux sociaux</a><br />
Très bon article sur un sujet d&#8217;actualité</li>
<li><a  href="http://www.webdesignerdepot.com/2009/12/25-funny-t-shirts-for-designers-and-developers/">Des Tshirt pour graphistes et développeurs</a><br />
C&#8217;est bientôt noël, peut-être une idée de cadeaux se cache dans ce billet. Ils ne sont pas tous en vente, mais ils sont tous bien pensés.</li>
<li><a  href="http://designreviver.com/articles/better-drop-shadows-in-photoshop/">Une jolie ombre portée en photoshop</a><br />
Toujours dans la rubrique &laquo;&nbsp;passons nous des graphistes&nbsp;&raquo;, voici un petit tutorial pour une ombre portée très réussie.</li>
<li><a  href="http://redotheoffice.com/?p=120">Plugin symfony sfCodeReview</a><br />
Je ne le connaissais pas, mais je le trouve parfaitement bien pensé. ce plugin vous permettra de balayer le code source de Symfony directement depuis la debug bar</li>
<li><a  href="http://davidwalsh.name/javascrip-reflection">Reflet d&#8217;image en jquery</a><br />
Ca reste toujours sympa, surtout quand c&#8217;est bien codé.</li>
<li><a  href="http://www.webiconset.com/cute-blogging-icon-set/">Encore un set d&#8217;icone pour blog très bien fichu</a><br />
Très travaillé et coloré, tous les icônes indispensables pour réussir son thème de blog</li>
<li><a  href="http://www.jaervelae.com/mollify/index.php">Un explorateur de fichier en PHP</a><br />
Très belle réalisation, ce script pour permettra de vous balader dans l&#8217;arborescence de votre serveur web avec un certain style. Ajax et graphisme sont aussi au rendez-vous.</li>
</ul>
<p><small>crédit photo: http://www.flickr.com/photos/besimo/4094334183/</small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.amicalement-web.net/developpement-web-les-bons-plans-de-la-semaine-26/2009/12/07/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Développement Web: les bons plans de la semaine #14</title>
		<link>http://www.amicalement-web.net/developpement-web-les-bons-plans-de-la-semaine-14/2009/09/07/</link>
		<comments>http://www.amicalement-web.net/developpement-web-les-bons-plans-de-la-semaine-14/2009/09/07/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 09:00:27 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Bons plans]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[doctrine]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.amicalement-web.net/?p=720</guid>
		<description><![CDATA[Malgré une grosse semaine passée et à venir, je ne pouvais pas vous priver de la sélection des liens de la semaine! Une sélection qui pour une fois, touche un peu à tous les domaines que je me plait à aborder, on va essayer de garder cet esprit à l&#8217;avenir. Et c&#8217;est parti: Retirer les [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.amicalement-web.net/wp-content/uploads/css-javascript.png" alt="css-javascript" title="css-javascript" width="614" height="100" class="alignnone size-full wp-image-722" /> Malgré une grosse semaine passée et à venir, je ne pouvais pas vous priver de la sélection des liens de la semaine! Une sélection qui pour une fois, touche un peu à tous les domaines que je me plait à aborder, on va essayer de garder cet esprit à l&#8217;avenir.<br />
<span id="more-720"></span></p>
<p>Et c&#8217;est parti:</p>
<ul>
<li><a  href="http://papermashup.com/remove-the-dotted-border-around-links-in-firefox/">Retirer les bordures autour des liens cliqués sous Firefox.</a><br />
Il y a pas mal de temps, un ami graphiste m&#8217;avait demandé &laquo;&nbsp;C&#8217;est vraiment moche ces bordures quand on clic&nbsp;&raquo; (oui vous savez ces graphistes et le souci du détail ;)). Et je ne pensais pas (et encore aujourd&#8217;hui) qu&#8217;on pouvait les retirer. Et pourtant c&#8217;est tout simple. (Oui oui Gi, je parle de toi, souvenir :) </li>
<li><a  href="http://www.mattvarone.com/web-design/uitotop-jquery-plugin/">Plugin jquery pour revenir en haut de la page</a><br />
Il sait se faire discret et rempli parfaitement son rôle. Une fois qu&#8217;on scroll un peu dans la page, un charmant petit module vient apparaître permettant de remonter en haut de la page.</li>
<li><a  href="http://www.slideshare.net/jwage/symfony-13-doctrine-12">Slides Symfony 1.3 et Doctrine 1.2</a><br />
Pour ceux qui auraient loupé le lien! Je suis d&#8217;ailleurs ravi des nouveautés, en particulier pour doctrine, qui nous permettra enfin d&#8217;étendre Doctrine, facilement.</li>
<li><a  href="http://www.catchmyfame.com/2009/06/25/jquery-beforeafter-plugin/">Jquery Plugin Avant/Après</a><br />
Le genre de plugin qui m&#8217;emballe. Ceux dont on ne sait pas trop à quoi il pourrait servir, jusqu&#8217;à l&#8217;illumination!</li>
<li><a  href="http://www.recessframework.org/page/php-callables-is-callable-call-user-func-array-reflection">PHP 5.3, les appels dynamiques</a><br />
Et oui, c&#8217;est une des principales nouveautés de la 5.3 et ca méritait bien un petit tuto très bien ficelé comparé à ceux que j&#8217;ai pu croiser jusque là</li>
<li><a  href="http://www.ixedit.com/">Créer simplement des animations avec jquery</a> (via <a  href="http://www.dator.fr/ixedit-creer-des-animations-et-des-interactions-avec-jquery-sans-une-ligne-de-code/">dator</a>)<br />
En voilà une idée quelle est bonne. Une interface permettant de créer rapidement et simplement des animations et des interactions avec jquery. Un bel outil.</li>
<li><a  href="http://www.queness.com/post/620/create-a-stunning-sliding-door-effect-with-jquery">Effet pour légende d&#8217;image avec jQuery</a><br />
La semaine dernière, je vous présentais un petit effect &laquo;&nbsp;ouverture de porte&nbsp;&raquo;, voilà son petit frère avec un effet encore plus recherché (et réussi à mon goût)</li>
<li><a  href="http://www.adminer.org/en/">Contrôler votre base de donnée avec un seul fichier PHP</a><br />
Sans être exceptionnel, il mérite de remplir parfaitement son rôle. Un seul fichier PHP à uploader (ou à poser en local) et vous pouvez alors contrôler vos bases de données. Un phpmyadmin light, mais efficace.
</li>
<li><a  href="http://tutorialzine.com/2009/09/making-our-own-twitter-timeline/">Créer un twitter like tout simplement</a><br />
Certes, le code est très basique, mais c&#8217;était surtout pour montrer qu&#8217;une bonne idée, ca reste une idée menée au bout (et je parle pour moi le premier ;p). Et que le concept de twitter se résume en ces quelques lignes.</li>
<li><a  href="http://www.cherrysave.com/web-design/simple-css-tricks-to-greatly-improve-site-typography/">Petites astuces CSS pour améliorer le rendu typographique</a><br />
C&#8217;est simple, mais ce sont les règles élémentaires à toujours garder à l&#8217;esprit à mon goût</li>
</ul>
<p>On essaye de diversifier mais je me rend compte qu&#8217;un peu de structure dans cette liste des fois, ça ferait pas de mal! Ou alors, je pourrais faire des compils best-of! Vous en pensez-quoi?</p>
<p><small>crédit photo: http://www.flickr.com/photos/lilit/</small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.amicalement-web.net/developpement-web-les-bons-plans-de-la-semaine-14/2009/09/07/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Développement Web: les bons plans de la semaine #8</title>
		<link>http://www.amicalement-web.net/developpement-web-les-bons-plans-de-la-semaine-8/2009/07/27/</link>
		<comments>http://www.amicalement-web.net/developpement-web-les-bons-plans-de-la-semaine-8/2009/07/27/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 09:00:51 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Bons plans]]></category>
		<category><![CDATA[ipod]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.amicalement-web.net/?p=474</guid>
		<description><![CDATA[Quelques changements dans notre rubrique hebdomadaire. Ceux qui suivent auront deviner de quoi il s&#8217;agit. Première modification, on passe du vendredi au lundi. Pourquoi? Ca me laissera le week end pour faire quelque chose de moins à l&#8217;arrache et essayer de voir si c&#8217;est parce que ces billets sortent le vendredi qu&#8217;ils sont moins lus [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.amicalement-web.net/wp-content/uploads/system-search.png" alt="system-search" title="system-search" width="48" height="48" class="alignleft size-full wp-image-39" /> Quelques changements dans notre rubrique hebdomadaire. Ceux qui suivent auront deviner de quoi il s&#8217;agit.<br />
Première modification, on passe du vendredi au lundi. Pourquoi? Ca me laissera le week end pour faire quelque chose de moins à l&#8217;arrache et essayer de voir si c&#8217;est parce que ces billets sortent le vendredi qu&#8217;ils sont moins lus ou juste moins intéressants.</p>
<p>La deuxième découle de la première, finalement, on aura un lien &laquo;&nbsp;lire la suite&nbsp;&raquo; histoire d&#8217;être sûr de mesurer toutes les lectures. Bref, des détails, rien de bien grave et voici la sélection de la semaine!<br />
<span id="more-474"></span></p>
<ul>
<li><a  href="http://lab.berkerpeksag.com/jGrow">jGrow</a><br />
C&#8217;est une des fonctionnalités des RTE assez populaires, pouvoir agrandir la hauteur d&#8217;un textarea en fonction de la taille de son contenu, le tout dans un petit plugin jquery</li>
<li><a  href="http://www.sitepoint.com/blogs/2009/07/22/how-to-develop-a-jquery-plugin/">Comment développer un plugin jquery</a><br />
Un très bon tutorial sur les bases de la création de plugin jquery. En anglais certes, mais réaliser par la fine équipe de Sitepoint.com, une très bonne référence</li>
<li><a  href="http://finnrudolph.de/ImageFlow">ImageFlow</a><br />
De toute les galeries jquery, en voici une très aboutie qui reproduit l&#8217;effet coverflow d&#8217;itunes. Très réussie!
</li>
<li><a  href="http://www.datejs.com/">DateJS</a><br />
Voici une librairie javascript très intéressante qui permet de transformer une date texte en une &laquo;&nbsp;vrai&nbsp;&raquo; date, un peu à la manière de strtotime en PHP.
</li>
<li><a  href="http://www.filamentgroup.com/lab/jquery_ipod_style_drilldown_menu/">Select box ipod style</a><br />
Un énième plugin jquery sur la customisation d&#8217;un selectbox qui s&#8217;inspire lui du menu de sélection d&#8217;un ipod. Plutôt bien pensé niveau ergonomie.</li>
<li><a  href="http://armeda.com/how-to-create-a-jquery-carousel-with-wordpress-posts/">Créer un carousel jquery de billets wordpress</a><br />
Tout est dans le titre, un tutorial en anglais qui indique comme créer simplement un carousel avec les billets de son blog que l&#8217;on souhaite mettre en avant</li>
<li><a  href="http://www.csslab.cl/2009/07/22/jquery-browsersizr/">Une classe CSS selon la taille du navigateur</a><br />
Avec l&#8217;avènement des grandes résolutions et du mobile, il devient parfois délicat de contenter tout le monde sur le rendu visuel d&#8217;un site. Voici un petit plugin qui va pouvoir aider, en donnant une class CSS au body de notre page html selon les dimensions de notre navigateur.</li>
<li><a  href="http://www.filamentgroup.com/lab/jquery_ui_selectmenu_an_aria_accessible_plugin_for_styling_a_html_select/">Une select box sexy</a><br />
Et voici encore une customisation de selectbox qui cette fois-ci, mise sur le look et l&#8217;effet est très réussi.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.amicalement-web.net/developpement-web-les-bons-plans-de-la-semaine-8/2009/07/27/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to: Créer un plugin fckeditor</title>
		<link>http://www.amicalement-web.net/how-to-creer-un-plugin-fckeditor/2009/07/23/</link>
		<comments>http://www.amicalement-web.net/how-to-creer-un-plugin-fckeditor/2009/07/23/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 12:00:22 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[fckeditor]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.amicalement-web.net/?p=458</guid>
		<description><![CDATA[Dans le monde du développement web, il y a un domaine où je n&#8217;ai pas encore trouvé une recette miracle: La publication de contenu avec un éditeur WYSIWYG. En même temps, la problématique est costaud, faire éditer du HTML à des gens qui ont déjà du mal avec Word, sans qu&#8217;ils sachent qu&#8217;ils éditent du [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.amicalement-web.net/wp-content/uploads/applications-system.png" alt="applications-system" title="applications-system" width="48" height="48" class="alignleft size-full wp-image-31" /> Dans le monde du développement web, il y a un domaine où je n&#8217;ai pas encore trouvé une recette miracle: La publication de contenu avec un éditeur <acronym title="What You See Is What You Get">WYSIWYG</acronym>. En même temps, la problématique est costaud, faire éditer du HTML à des gens qui ont déjà du mal avec Word, sans qu&#8217;ils sachent qu&#8217;ils éditent du HTML.</p>
<p>Après avoir définitivement abandonné <a  href="http://tinymce.moxiecode.com/" class="extern">TinyMCE</a>, car trop usine à gaz et n&#8217;en faisant qu&#8217;à sa tête, j&#8217;ai essayé <a  href="http://nicedit.com/" class="extern">nicedit</a> comme je vous l&#8217;avais signalé dans <a  href="/developpement-web-les-bons-plans-de-la-semaine-3/2009/06/19/">un bon plan de la semaine</a>. Malheureusement, il reste un peu juste pour certains besoins.<br />
Sur les conseils de <a  href="http://blog.samuel-trocme.fr/12-07-2009/fckeditor-peut-etre-le-meilleur-rte.html" class="extern">Sam</a>, je me suis donc relancé dans une vieille connaissance, <a  href="http://www.fckeditor.net/" class="extern">FCKEditor</a>, un des plus vieux <acronym title="Rich Text Editor">RTE</acronym> avec TinyMCE.<br />
<span id="more-458"></span><br />
S&#8217;il est a noté de nets progrès, il fait encore un peu usine à gaz (mais moins que TinyMCE quand même) et je le trouve particulièrement moche, mais c&#8217;est un détail qui peut se modifier, donc on va le mettre de côté pour l&#8217;instant ;)</p>
<p>Un des impératifs par contre, c&#8217;est la personnalisation et donc la création de plugin permettant de rajouter des boutons avec des fonctionnalités que l&#8217;on aura déterminer nous même. Et vu les difficultés que j&#8217;ai pu rencontrer pour créer mon premier, je me suis dis que ca valait bien quelques explications. Dans un souci de clarté, je ne détaillerai pas l&#8217;installation de fck, je vous invite à faire un tour sur leur site pour ça.</p>
<p>Première chose quand on veut créer un plugin fck, créer son arborescence, dans <code>editor/plugins</code>. Ici, on va créer un plugin qui nous permettra de rajouter un bouton à notre toolbar qui lancera une fenêtre nous permettant de faire un peu ce qu&#8217;on veut, en l&#8217;occurrence dans notre cas, afficher une liste des pages de notre gestionnaire de contenus symfony afin de pouvoir insérer des liens internes entre elle.  </p>
<p>Dans notre nouveau dossier, vous créez donc un fichier plugin.js avec à l&#8217;intérieur:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// Ici je crée une action FCK qui s'appelle Internlink, et qui chargera le fichier test.html (qui sera au même niveau que ce fichier) lors de son appel</span>
FCKCommands.<span style="color: #660066;">RegisterCommand</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Internlink'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">new</span> FCKDialogCommand<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Internlink'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'Ajout lien interne'</span><span style="color: #339933;">,</span>FCKConfig.<span style="color: #660066;">PluginsPath</span><span style="color: #339933;">+</span><span style="color: #3366CC;">'internlink/test.html'</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">300</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">300</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Ici je crée un bouton pour la toolbar auquel j'associe l'action précédemment définie</span>
FCKToolbarItems.<span style="color: #660066;">RegisterItem</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'Internlink'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">new</span> FCKToolbarButton<span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'Internlink'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'Lien interne'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">,</span> FCK_TOOLBARITEM_ICONTEXT<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">;</span></pre></div></div>

<p>Ensuite on enchaine avec le template de notre popup qu&#8217;on a appelé test.html plus haut (on le met bien où on veut mais j&#8217;ai définis au-dessus de le mettre au même niveau):</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;html<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;meta</span> <span style="color: #000066;">http-equiv</span>=<span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span>=<span style="color: #ff0000;">&quot;text/html; charset=UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/javascript&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    // Cette partie est nécessaire pour pouvoir utiliser les fonctions de fck à l'intérieur de notre popup 
    var oEditor = window.parent.InnerDialogLoaded();
    var FCKConfig = oEditor.FCKConfig;
    var dialog = window.parent;
    document.write('<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;script</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;' + FCKConfig.BasePath + 'dialog/common/fck_dialog_common.js&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/javascript&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>&lt;\/script<span style="color: #000000; font-weight: bold;">&gt;</span></span>');
    dialog.SetOkButton(true); // Par défaut, seul le bouton annuler est affiché, on rajoute le bouton ok	
&nbsp;
    // Maintenant on fait bien ce qu'on veux, ici j'ai décidé de récupérer en AJAX, une liste en JSON de toutes mes pages et d'alimenter ma selectbox avec
    jQuery(document).ready(function(){
      $.getJSON(&quot;/content/selectJson&quot;,{}, function(j){
        var options = '';
        for (var i = 0; i <span style="color: #009900;">&lt; j.length; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #009900;">          options += <span style="color: #ff0000;">'&lt;option value=&quot;'</span> + j<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.optionValue + <span style="color: #ff0000;">'&quot;&gt;</span></span>' + j[i].optionDisplay + '<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>';
        }
        $(&quot;select#intern-link&quot;).html(options);
      })
    });
&nbsp;
    // Puis on surdéfinit une fonction Ok qui est appelé par fck quand on appuye sur le bouton ... ok
    function Ok()
    {
      // Maintenant on utilise fck pour rajouter du contenu à notre RTE. Ici je rajoute simplement les valeurs de mes 2 champs définis dans mon HTML ci-dessous
      oEditor.FCK.InsertHtml( '<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;'+ jQuery('#intern-link').val() +'&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;extern&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>'+ jQuery('#intern-label').val() +'<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>' );
      return true; // Il faut renvoyer true pour fermer la popup
    }
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;add-intern-link&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>		
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">for</span>=<span style="color: #ff0000;">&quot;intern-link&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Lien interne<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;select</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;intern-link&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;intern-link&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/select<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>						
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">for</span>=<span style="color: #ff0000;">&quot;intern-label&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Label<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;input</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;intern-label&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;intern-label&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>						
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Il ne reste plus qu&#8217;à charger notre plugin dans notre conf:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">FCKConfig.<span style="color: #660066;">Plugins</span>.<span style="color: #660066;">Add</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'internlink'</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">;</span></pre></div></div>

<p>et ajouter le bouton à notre toolbar comme par exemple:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">FCKConfig.<span style="color: #660066;">ToolbarSets</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;nice&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'Internlink'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></div></div>

<p> et on obtient:<br />
<a  href="http://www.amicalement-web.net/wp-content/uploads/Image-67.png"><img src="http://www.amicalement-web.net/wp-content/uploads/Image-67-300x37.png" alt="Image 67" title="Image 67" width="300" height="37" class="alignnone size-medium wp-image-461" /></a></p>
<p><a  href="http://www.amicalement-web.net/wp-content/uploads/Image-68.png"><img src="http://www.amicalement-web.net/wp-content/uploads/Image-68.png" alt="Image 68" title="Image 68" width="287" height="298" class="alignnone size-full wp-image-460" /></a></p>
<p>On a maintenant accès à toutes nos pages, et un clic sur ok, nous rajoutera un lien dans notre contenu avec le label renseigné. </p>
<p>Il ne reste plus qu&#8217;à adapter à vos besoins ces petits bouts de codes!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.amicalement-web.net/how-to-creer-un-plugin-fckeditor/2009/07/23/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
