<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://www.code-web.org/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
  <title>Code-Web.org - plugin</title>
  <link>http://www.code-web.org/</link>
  <description>Développement Web en toute liberté!</description>
  <language>fr</language>
  <pubDate>Thu, 21 Aug 2008 18:05:39 +0200</pubDate>
  <copyright></copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>La dernière ligne droite pour Dotclear 2?</title>
    <link>http://www.code-web.org/post/2008/07/05/La-derniere-ligne-droit-pour-Dotclear-2</link>
    <guid isPermaLink="false">urn:md5:f6f5d2f45d8066c077351c14d9324a74</guid>
    <pubDate>Sat, 05 Jul 2008 17:23:00 +0200</pubDate>
    <dc:creator>Thierry Geindre</dc:creator>
        <category>Dotclear</category>
        <category>dotclear</category><category>plugin</category><category>release</category>    
    <description>    &lt;p&gt;&lt;a href=&quot;http://www.dotclear.net/download&quot; hreflang=&quot;fr&quot;&gt;Dotclear 2&lt;/a&gt; vient de sortir en version RC2.1 et offre quelques améliorations qui sont détaillées dans le &lt;a href=&quot;http://www.dotclear.net/blog/post/2008/06/21/Dotclear-20-RC2&quot; hreflang=&quot;fr&quot;&gt;billet&lt;/a&gt; annonçant sa sortie. On y apprend également qu'il s'agit très probablement de la dernière release avant la sortie de la version finale maintenue pour cet été.&lt;/p&gt;


&lt;p&gt;Pour ma part j'ai vérifié la compatibilité des plugins que je maintiens avec cette nouvelle version. J'annonce donc que &lt;a href=&quot;http://plugins.code-web.org/plugin/bashfrquote/&quot; hreflang=&quot;fr&quot;&gt;BashFr Quote&lt;/a&gt;, &lt;a href=&quot;http://plugins.code-web.org/plugin/wikitextwidget/&quot; hreflang=&quot;fr&quot;&gt;WikiText&lt;/a&gt;, &lt;a href=&quot;http://plugins.code-web.org/plugin/syntaxehl/&quot; hreflang=&quot;fr&quot;&gt;SyntaxeHl&lt;/a&gt; et &lt;a href=&quot;http://plugins.code-web.org/plugin/dotpoll/&quot; hreflang=&quot;fr&quot;&gt;DotPoll&lt;/a&gt; fonctionnent très bien sur le &lt;a href=&quot;http://test.code-web.org/&quot; hreflang=&quot;fr&quot;&gt;blog de test&lt;/a&gt; de &lt;a href=&quot;http://www.code-web.org/&quot;&gt;Code-web.org&lt;/a&gt;.&lt;/p&gt;


&lt;p&gt;En revanche, l'interface de &lt;a href=&quot;http://plugins.code-web.org/plugin/langOmatic/&quot; hreflang=&quot;fr&quot;&gt;Langomatic&lt;/a&gt; disparaît lorsque l'on essais de créer une traduction d'un plugin. Je me suis proposé pour assurer la mise en conformité de ce plugin avec le futures versions de Dotclear et je vais donc étudier le problème... A suivre.&lt;/p&gt;


&lt;p&gt;Comme toujours, vous pouvez retrouver tous ces plugins sur le &lt;a href=&quot;http://plugins.code-web.org/&quot; hreflang=&quot;fr&quot;&gt;dépôt de Code-web.org&lt;/a&gt; ou sur &lt;a href=&quot;http://dotaddict.org/&quot; hreflang=&quot;fr&quot;&gt;Dotaddict&lt;/a&gt;. Si vous rencontrez des problèmes avec l'un de ces plugins, n'hésitez pas à me les remonter dans les billets appropriés ou même ici.&lt;/p&gt;</description>
    
    
    
          <comments>http://www.code-web.org/post/2008/07/05/La-derniere-ligne-droit-pour-Dotclear-2#comment-form</comments>
      <wfw:comment>http://www.code-web.org/post/2008/07/05/La-derniere-ligne-droit-pour-Dotclear-2#comment-form</wfw:comment>
      <wfw:commentRss>http://www.code-web.org/feed/rss2/comments/53</wfw:commentRss>
    						<h3>Abonnement aux commentaires</h3>
						<p>
							<a href="http://www.code-web.org/subscribetocomments?post_id=53">
								<!-- # If the subscriber is logged in -->
																<!-- # If the subscriber is not logged in -->
																	S'abonner pour recevoir les commentaires suivants par email															</a>
						</p>
					  </item>
    
  <item>
    <title>LangOmatic compatible Dotclear 2 RC1</title>
    <link>http://www.code-web.org/post/2008/05/20/LangOmatic-compatible-Dotclear-2-RC1</link>
    <guid isPermaLink="false">urn:md5:1b9adc12af4f94f35b98c71745e2cbd0</guid>
    <pubDate>Tue, 20 May 2008 22:56:00 +0200</pubDate>
    <dc:creator>Thierry Geindre</dc:creator>
        <category>Dotclear</category>
        <category>dotclear</category><category>langomatic</category><category>plugin</category>    
    <description>    &lt;p&gt;Voilà déjà un moment que certains d'entre nous, développeurs de plugin sous Dotclear, utilisent le plugin langOmatic pour la traduction de leur développements. Malheureusement, ce plugin n'était plus maintenu par son auteur original et la compatibilité avec les nouvelles versions de Dotclear 2 devenait de plus en plus mauvaise...&lt;/p&gt;


&lt;p&gt;C'est un problème de licence qui m'empêchait jusqu'alors de le mettre en conformité avec le nouveau Dotclear. En effet, et comme il me l'avait justement été signalé par Moe, l'absence de licence ne signifie pas libre selon le droit français. En principe donc, impossible de mettre à jour ce plugin légalement.&lt;/p&gt;


&lt;p&gt;J'ai donc pris la liberté de contacter son auteur, qui a accepté que je poursuive le développement de ce plugin et le publie sous licence GNU GPL. Son seul souhait est&amp;nbsp;: &lt;em&gt;...j'aimerais que tu gardes le nom &lt;img src=&quot;/dotclear/themes/default/smilies/smile.png&quot; alt=&quot;:-)&quot; class=&quot;smiley&quot; /&gt;&lt;/em&gt; Pas de soucis, c'est bien noté!&lt;/p&gt;


&lt;p&gt;Voici donc &lt;a href=&quot;http://plugins.code-web.org/plugin/langOmatic/&quot; hreflang=&quot;fr&quot;&gt;le plugin langOmatic enfin compatible avec Dotclear 2 RC 1&lt;/a&gt;. En cas de problème, n'hésitez pas à profiter des commentaires de ce billet pour me les signaler. Je précise en passant que je ne reprend que les mises à jour visant à rendre le plugin compatible avec les futures version de Dotclear. Pour de nouvelles fonctionnalités, il faudra voir avec quelqu'un d'autre.&lt;/p&gt;</description>
    
    
    
          <comments>http://www.code-web.org/post/2008/05/20/LangOmatic-compatible-Dotclear-2-RC1#comment-form</comments>
      <wfw:comment>http://www.code-web.org/post/2008/05/20/LangOmatic-compatible-Dotclear-2-RC1#comment-form</wfw:comment>
      <wfw:commentRss>http://www.code-web.org/feed/rss2/comments/51</wfw:commentRss>
    						<h3>Abonnement aux commentaires</h3>
						<p>
							<a href="http://www.code-web.org/subscribetocomments?post_id=51">
								<!-- # If the subscriber is logged in -->
																<!-- # If the subscriber is not logged in -->
																	S'abonner pour recevoir les commentaires suivants par email															</a>
						</p>
					  </item>
    
  <item>
    <title>Dotpoll : Plugin de sondage pour Dotclear 2</title>
    <link>http://www.code-web.org/post/2008/05/09/Dotpoll-%3A-Plugin-de-sondage-pour-Dotclear-2</link>
    <guid isPermaLink="false">urn:md5:90d33a87fad6d8f38bff47e941c639ca</guid>
    <pubDate>Fri, 09 May 2008 15:21:00 +0200</pubDate>
    <dc:creator>Thierry Geindre</dc:creator>
        <category>Dotclear</category>
        <category>dotclear</category><category>plugin</category><category>sondage</category><category>widget</category>    
    <description>&lt;p&gt;Après quelques heures de travail voici enfin la première version de Dotpoll, un plugin permettant de créer des sondages sur votre blog. Pour l'heure, ces sondages ne peuvent être affichés que dans des widget, autant que vous le souhaitez.&lt;/p&gt;


&lt;p&gt;Il reste quelques petites choses à faire en priorité&amp;nbsp;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ajouter des messages de confirmation lors de suppressions&lt;/li&gt;
&lt;li&gt;Permettre de choisir l'ordre d'affichage des différents choix d'un sondage&lt;/li&gt;
&lt;li&gt;Vérifier que toutes les éventuelles erreurs sont bien catchées&lt;/li&gt;
&lt;li&gt;Vérifier les traductions anglaises&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pour la suite&amp;nbsp;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Des barres de progression pour les résultats des sondages&lt;/li&gt;
&lt;li&gt;Pouvoir afficher les sondages n'importe où (billet, page dédiée, etc.)&lt;/li&gt;
&lt;li&gt;Si vous avez d'autres idées, n'hésitez pas...&lt;/li&gt;
&lt;/ul&gt;    &lt;h3&gt;Installer Dotpoll&lt;/h3&gt;


&lt;p&gt;Évidemment, ce plugin s'installe comme n'importe quel autre plugin pour Dotclear 2. Choisissez simplement &lt;a href=&quot;http://plugins.code-web.org/plugin/dotpoll/&quot; hreflang=&quot;fr&quot;&gt;le paquet qui vous convient&lt;/a&gt;.&lt;/p&gt;


&lt;p&gt;Il a été testé avec les version RC 1 et Beta 7 de Dotclear sans aucun problème.&lt;/p&gt;


&lt;h3&gt;Utiliser Dotpoll&lt;/h3&gt;


&lt;h4&gt;Créer / modifier un sondage&lt;/h4&gt;


&lt;p&gt;Il vous suffit de vous rendre sur l'onglet &lt;em&gt;Nouveau sondage&lt;/em&gt; de DotPoll. Vous pourrez alors choisir le titre (ou la question) de votre sondage. Validez. Vous arriverez ensuite dans l'interface de modification de votre sondage. Pour y ajouter des choix, rendez-vous sur l'onglet &lt;em&gt;Nouveau choix&lt;/em&gt;, entrez le texte de votre nouveau choix puis validez. Vous pourrez ainsi ajouter autant de choix que vous le souhaitez.&lt;/p&gt;


&lt;p&gt;Votre sondage est maintenant créé. Pour pouvoir l'afficher sur votre blog, vous devrez vous assurer qu'il est publié. Par défaut, les nouveaux sondages ne sont pas publiés. Pour publier un sondage, rendez vous dans la liste des sondages (onglet &lt;em&gt;Mes sondages&lt;/em&gt; sur l'interface de DotPoll) puis cochez la case correspondant au sondage que vous venez de créer. En bas de la liste, sélectionnez &lt;em&gt;Publier&lt;/em&gt; puis cliquez sur &lt;em&gt;Ok&lt;/em&gt;.&lt;/p&gt;


&lt;p&gt;Votre sondage est désormais opérationnel.&lt;/p&gt;


&lt;h4&gt;Afficher un sondage dans un widget&lt;/h4&gt;


&lt;p&gt;Rendez-vous sur l'interface de gestion de vos widget. Un nouveau widget est désormais disponible&amp;nbsp;: &lt;em&gt;DotPoll&lt;/em&gt;. Ajoutez ce widget à la liste de votre choix. Les options disponibles sont assez explicites pour ne pas mériter d'explications. Sachez simplement que la liste des sondages proposée ne contient que les sondages &lt;em&gt;publiés&lt;/em&gt;.&lt;/p&gt;


&lt;h4&gt;A propos de la configuration&lt;/h4&gt;


&lt;p&gt;La seule chose qu'il est possible de configurer dans DotPoll est la manière dont les votant seront identifiés. Soit par Cookie, soit par leur adresse IP. Les deux méthodes présentant toutes deux leurs avantages et leurs inconvénients, ce choix est laissé à l'utilisateur.&lt;/p&gt;


&lt;h3&gt;Un aperçu&amp;nbsp;?&lt;/h3&gt;

&lt;p&gt;Vous pouvez voir DotPoll en action sur cette page, et même sur l'ensemble du blog, dans la partie droite. Profitez-en pour répondre au sondage!&lt;/p&gt;


&lt;h3&gt;Licence&lt;/h3&gt;

&lt;p&gt;DotPoll est désormais sous licence &lt;em&gt;GNU GPL&lt;/em&gt;.&lt;/p&gt;</description>
    
    
    
          <comments>http://www.code-web.org/post/2008/05/09/Dotpoll-%3A-Plugin-de-sondage-pour-Dotclear-2#comment-form</comments>
      <wfw:comment>http://www.code-web.org/post/2008/05/09/Dotpoll-%3A-Plugin-de-sondage-pour-Dotclear-2#comment-form</wfw:comment>
      <wfw:commentRss>http://www.code-web.org/feed/rss2/comments/47</wfw:commentRss>
    						<h3>Abonnement aux commentaires</h3>
						<p>
							<a href="http://www.code-web.org/subscribetocomments?post_id=47">
								<!-- # If the subscriber is logged in -->
																<!-- # If the subscriber is not logged in -->
																	S'abonner pour recevoir les commentaires suivants par email															</a>
						</p>
					  </item>
    
  <item>
    <title>Dotclear 2 RC disponible</title>
    <link>http://www.code-web.org/post/2008/05/03/Dotclear-2-RC-disponible</link>
    <guid isPermaLink="false">urn:md5:ca773143432ff40eacabdf31f27dc361</guid>
    <pubDate>Sat, 03 May 2008 15:32:00 +0200</pubDate>
    <dc:creator>Thierry Geindre</dc:creator>
        <category>Dotclear</category>
        <category>dotclear</category><category>plugin</category><category>rc</category>    
    <description>    &lt;p&gt;C'est maintenant chose faite, la version RC de Dotclear 2 est disponible en téléchargement sur le &lt;a href=&quot;http://www.dotclear.net/&quot; hreflang=&quot;fr&quot;&gt;site officiel&lt;/a&gt;.&lt;/p&gt;


&lt;p&gt;Pour ma part, cela signifie quelques test des plugin que je maintiens pour vérifier leur compatibilité avec cette nouvelle version. N'hésitez pas à me remonter d'éventuels problèmes.&lt;/p&gt;


&lt;h3&gt;Résultat des courses&lt;/h3&gt;

&lt;p&gt;Les widgets &lt;a href=&quot;http://www.code-web.org/post/2008/04/07/Widget-Dotclear-%3A-BashFr-Quote&quot; hreflang=&quot;fr&quot;&gt;BashFr Quote&lt;/a&gt; et &lt;a href=&quot;http://www.code-web.org/post/2008/04/08/Widget-Dotclear-%3A-Wiki-Texte&quot; hreflang=&quot;fr&quot;&gt;WikiText&lt;/a&gt; semblent fonctionner à merveille. Rien à signaler de ce côté là.&lt;/p&gt;


&lt;p&gt;En revanche, l'archive zip de &lt;a href=&quot;http://www.code-web.org/post/2008/04/14/SyntaxeHl-11&quot; hreflang=&quot;fr&quot;&gt;SyntaxeHl&lt;/a&gt; semble ne pas fonctionner pour l'installation automatisée comme il me l'avait déjà été signalé dans un commentaire. Je vais essayer de trouver la source du problème. En attendant, pour installer ce plugin, vous pouvez décompresser l'archive zip du plugin et l'uploader via votre client FTP dans le répertoire plugin de votre dotclear.&lt;/p&gt;


&lt;p&gt;&lt;em&gt;Maj&lt;/em&gt;&lt;/p&gt;


&lt;p&gt;Le problème de l'archive de &lt;a href=&quot;http://www.code-web.org/post/2008/04/14/SyntaxeHl-11&quot; hreflang=&quot;fr&quot;&gt;SyntaxeHl&lt;/a&gt; est désormais réglé. Apparemment c'est un fichier vide contenu dans la liste des langages proposé par GeShi qui posait problème. J'avoue ne pas vraiment comprendre. Bref, j'ai mis à jour &lt;a href=&quot;http://www.nostalgeek.org/plugin-dc2/syntaxehl/1.1/plugin-syntaxehl-1.1.zip&quot; hreflang=&quot;fr&quot;&gt;la dernière archive zip disponible&lt;/a&gt; pour &lt;a href=&quot;http://www.code-web.org/post/2008/04/14/SyntaxeHl-11&quot; hreflang=&quot;fr&quot;&gt;SyntaxeHl&lt;/a&gt; donc tous les liens d'installation donnés jusque là sont bons.&lt;/p&gt;</description>
    
    
    
          <comments>http://www.code-web.org/post/2008/05/03/Dotclear-2-RC-disponible#comment-form</comments>
      <wfw:comment>http://www.code-web.org/post/2008/05/03/Dotclear-2-RC-disponible#comment-form</wfw:comment>
      <wfw:commentRss>http://www.code-web.org/feed/rss2/comments/46</wfw:commentRss>
    						<h3>Abonnement aux commentaires</h3>
						<p>
							<a href="http://www.code-web.org/subscribetocomments?post_id=46">
								<!-- # If the subscriber is logged in -->
																<!-- # If the subscriber is not logged in -->
																	S'abonner pour recevoir les commentaires suivants par email															</a>
						</p>
					  </item>
    
  <item>
    <title>SyntaxeHl 1.1</title>
    <link>http://www.code-web.org/post/2008/04/14/SyntaxeHl-11</link>
    <guid isPermaLink="false">urn:md5:87cbd7930068af35428e83a83bb62464</guid>
    <pubDate>Mon, 14 Apr 2008 10:08:00 +0200</pubDate>
    <dc:creator>Thierry Geindre</dc:creator>
        <category>Dotclear</category>
        <category>dotclear</category><category>plugin</category><category>syntaxehl</category>    
    <description>&lt;p&gt;Nouvelle version du plugin SyntaxeHl pour Dotclear 2. Il est désormais possible de le configurer via l'interface de configuration de votre blog. Par ailleurs, cette nouvelle version corrige une petite erreur de programmation qui pouvait lancer des &lt;em&gt;warning&lt;/em&gt; sous certaines installations.&lt;/p&gt;    &lt;h3&gt;Mise à jour &amp;amp; installation&lt;/h3&gt;

&lt;p&gt;SyntaxeHl s'installe comme n'importe quel autre plugin, voyez la documentation officielle. Pour la mise à jour, et bien qu'en principe l'installation d'une nouvelle version écrase l'ancienne, je préconise tout de même de désinstaller l'ancienne version avant d'installer la nouvelle.&lt;/p&gt;


&lt;h3&gt;Téléchargement&lt;/h3&gt;

&lt;p&gt;Vous trouverez sur le &lt;a href=&quot;http://plugins.code-web.org/plugin/syntaxe-hl/&quot; hreflang=&quot;fr&quot;&gt;dépôt de plugins de code-web.org&lt;/a&gt; la dernière version de SyntaxeHl en package &lt;em&gt;zip&lt;/em&gt;, &lt;em&gt;tar.gz&lt;/em&gt; et &lt;em&gt;pkg.gz&lt;/em&gt;.&lt;/p&gt;


&lt;h3&gt;Configuration du plugin&lt;/h3&gt;

&lt;p&gt;Rendez-vous sur le &lt;em&gt;tableau de bord&lt;/em&gt;, puis dans les &lt;em&gt;paramètres de votre blog&lt;/em&gt;. Vous trouverez, sur cette page, une partie dédiées à la configuration de SyntaxeHl. Les options disponibles sont les suivantes&amp;nbsp;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Class CSS commune&lt;/strong&gt;&amp;nbsp;: définit une class CSS qui sera appliquée à tous les bloc &amp;lt;pre&amp;gt; en plus de la class spécifique au langage.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Activer les liens sur les mots clés&lt;/strong&gt;&amp;nbsp;: active les liens sur les mots clés du langage mis en forme. Pour du PHP par exemple, les liens vers la documentation officielle seront placés sur les fonctions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Activer la numérotation des lignes&lt;/strong&gt;&amp;nbsp;: active la numérotation des lignes de codes qui seront mises en formes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Comme je l'ai déjà indiqué, ce plugin n'est pas rétro actif. Par conséquent, les modifications de configuration du plugin n'interviendront que sur les billets modifiés ou créés par la suite.&lt;/p&gt;


&lt;p&gt;Pour toute remarques, suggestions ou problèmes, n'hésitez pas à poser votre question dans les commentaires.&lt;/p&gt;


&lt;h3&gt;Licence&lt;/h3&gt;

&lt;p&gt;SyntaxeHl est désormais sous licence &lt;em&gt;GNU GPL&lt;/em&gt;.&lt;/p&gt;</description>
    
    
    
          <comments>http://www.code-web.org/post/2008/04/14/SyntaxeHl-11#comment-form</comments>
      <wfw:comment>http://www.code-web.org/post/2008/04/14/SyntaxeHl-11#comment-form</wfw:comment>
      <wfw:commentRss>http://www.code-web.org/feed/rss2/comments/44</wfw:commentRss>
    						<h3>Abonnement aux commentaires</h3>
						<p>
							<a href="http://www.code-web.org/subscribetocomments?post_id=44">
								<!-- # If the subscriber is logged in -->
																<!-- # If the subscriber is not logged in -->
																	S'abonner pour recevoir les commentaires suivants par email															</a>
						</p>
					  </item>
    
  <item>
    <title>Plugin de coloration syntaxique</title>
    <link>http://www.code-web.org/post/2008/03/28/Plugin-de-coloration-syntaxique</link>
    <guid isPermaLink="false">urn:md5:7fbc10fd147c9cf1b4fd07697cd3fc91</guid>
    <pubDate>Mon, 31 Mar 2008 14:14:00 +0000</pubDate>
    <dc:creator>Thierry Geindre</dc:creator>
        <category>Dotclear</category>
        <category>dotclear</category><category>php</category><category>plugin</category>    
    <description>&lt;p&gt;La coloration syntaxique manquait sur Dotclear 2, je me suis donc lancé dans la réalisation d'un plugin remplissant cette fonction. A travers cette article, je vous propose de découvrir la création de plugin pour Dotclear 2.&lt;/p&gt;


&lt;p&gt;Pour réaliser la coloration, nous utiliserons tout simplement &lt;a href=&quot;http://qbnz.com/highlighter/&quot; hreflang=&quot;fr&quot;&gt;GeShi&lt;/a&gt;, une classe qui remplit admirablement bien cette fonction. Il s'agit donc d'intégrer le travaille de cette classe à Dotclear sous la forme d'un plugin.&lt;/p&gt;    &lt;p&gt;J'ai choisi de reprendre le nom de l'ancien plugin qui fournissait la coloration syntaxique ,SyntaxeHl pour &lt;em&gt;syntaxe highlight&lt;/em&gt; je présume.&lt;/p&gt;


&lt;h3&gt;Un répertoire avec GeShi pour le plugin&lt;/h3&gt;

&lt;p&gt;La première étape, très simple, consiste à créer un répertoire pour accueillir les fichiers de votre plugin. Pour cela, il suffit de créer un sous répertoire dans le répertoire &lt;em&gt;plugins&lt;/em&gt; de votre Dotclear. Nommons le par exemple &lt;em&gt;syntaxehl&lt;/em&gt;. Il vous faudra ensuite &lt;a href=&quot;http://sourceforge.net/project/showfiles.php?group_id=114997&quot; hreflang=&quot;fr&quot;&gt;télécharger la dernière version de GeShi&lt;/a&gt;. Décompressez  l'archive que vous venez de récupérer dans le répertoire que vous venez de créer. Ainsi vous devez obtenir un nouveau répertoire &lt;em&gt;/plugins/syntaxehl/geshi/&lt;/em&gt;. Dans ce répertoire, vous pouvez supprimer les répertoires &lt;em&gt;contrib&lt;/em&gt; et &lt;em&gt;doc&lt;/em&gt; qui ne nous serons pas utile.&lt;/p&gt;


&lt;h3&gt;Informations relatives au plugin&lt;/h3&gt;

&lt;p&gt;Nous allons maintenant définir les différentes informations relatives à notre plugin. Pour cela, vous devez créer un fichier &lt;em&gt;_define.php&lt;/em&gt; dans le répertoire &lt;em&gt;/plugins/syntaxehl/&lt;/em&gt;. Le contenu de ce fichier sera le suivant&amp;nbsp;:&lt;/p&gt;
&lt;pre class=&quot;php&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span style=&quot;color: #ff0000&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;registerModule&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;
  &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* Name */&lt;/span&gt;          &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;SyntaxeHl&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;
  &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* Description*/&lt;/span&gt;    &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Plugin de coloration syntaxique&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;
  &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* Author */&lt;/span&gt;        &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Votre Nom&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;
  &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* Version */&lt;/span&gt;       &lt;span style=&quot;color: #ff0000;&quot;&gt;'1'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;
  &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* Permissions */&lt;/span&gt;   &lt;span style=&quot;color: #ff0000;&quot;&gt;'usage,contentadmin'&lt;/span&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Les commentaires accompagnant chacun des paramètres sont suffisamment clair pour comprendre de quoi il s'agit. Nous ne nous arrêterons que sur le champ concernant les permissions. Il s'agit ici de définir quel type d'utilisateur peut activer le plugin. Dans cet exemple, nous avons choisit d'autoriser tous les utilisateurs mais on aurait également pu se limiter aux administrateurs en indiquant seulement &lt;em&gt;admin&lt;/em&gt;.&lt;/p&gt;


&lt;p&gt;Enregistrez les modifications puis rendez vous sur la page listant les plugin installés sur votre blog. Vous constaterez avec joie que le plugin que vous venez de créer apparaît bien dans la liste. Pour l'instant, ce plugin est totalement inutile puisqu'il ne fait absolument rien. Nous allons donc lui ajouter ses fonctionnalités.&lt;/p&gt;


&lt;h3&gt;Intercepter le code à mettre en forme&lt;/h3&gt;

&lt;p&gt;Pour mettre en forme le code inséré dans un billet, j'ai choisi d'exploiter la classe wiki2xhtml qui est employée, comme son nom l'indique, pour transformer la syntaxe Wiki d'un billet en (X)HTML.Ce choix peut être discutable puisqu'il ne permet pas de mettre en forme du code inséré dans un billet écrit directement en HTML.Cela-dit, je part du principe qu'un billet écrit en HTML directement ne devrait pas faire l'objet de modifications par un plugin puisqu'en principe il est déjà écrit dans sa version finale.&lt;/p&gt;


&lt;p&gt;Pour mettre en forme les codes sources, nous allons exploiter une des fonctionnalités offertes par wiki2xhtml&amp;nbsp;: les macros. Pour cela, nous utiliserons la fonction registerFunction de wiki2xhtml qui attend deux paramètres&amp;nbsp;: le type de fonction que l'on souhaite enregistrer et la fonction en question. Pour le type, on indiquera simplement &lt;em&gt;macro:nom_de_la_macro&lt;/em&gt;. Le fait d'enregistrer une fonction en tant que macro va déclencher l'appel à notre fonction lorsque la classe rencontrera dans le contenu du billet le texte suivant&amp;nbsp;:&lt;/p&gt;

&lt;pre&gt;&amp;#47;&amp;#47;&amp;#47;nom_de_la_macro
du texte
&amp;#47;&amp;#47;&amp;#47;&lt;/pre&gt;



&lt;p&gt;Ici, notre fonction recevra &lt;em&gt;du texte&lt;/em&gt; en paramètre, il nous suffira alors d'effectuer toutes les modifications souhaitées puis de retourner la version modifié du texte pour qu'elle remplace l'originale.&lt;/p&gt;


&lt;h3&gt;Enregistrer notre macro pour wiki2xhtml&lt;/h3&gt;

&lt;p&gt;Nous n'avons pour le moment qu'un bout de la solution finale. En effet, même si on sait comment procéder pour obtenir le code à mettre en forme, on ne sait pas vraiment comment procéder pour enregistrer notre fonction auprès de la classe wiki2xhtml aux bons moments.&lt;/p&gt;


&lt;h4&gt;Le système des behavior&lt;/h4&gt;

&lt;p&gt;Depuis la version 2, Dotclear intègre un tout nouveau système&amp;nbsp;: les &lt;em&gt;behavior&lt;/em&gt;. Terme qui peut être traduit littéralement par &lt;em&gt;comportement&lt;/em&gt;. C'est un système très simple à utiliser qui propose une gestion événementielle. En fait, un plugin peut enregistrer une fonction pour tel ou tel événement. Lorsque cet événement se produit, Dotclear appel la  ou les fonctions qui ont été enregistrées pour cet événement. En plus, ces fonctions recevront un certain nombre de paramètres différents en fonction du behavior concerné.&lt;/p&gt;


&lt;p&gt;Parmi la &lt;a href=&quot;http://doc.dotclear.net/2.0/resources/plugins/behaviors&quot; hreflang=&quot;fr&quot;&gt;liste des behavior diponibles&lt;/a&gt;, on trouve &lt;em&gt;coreWikiPostInit&lt;/em&gt; qui est appelé lors de l'initialisation de la classe wiki2xhtml. La fonction qui sera enregistrée pour cette événement recevra une référence vers l'instance de wiki2xhtml en paramètre. Il sera donc très facile d'y enregistrer notre macro.&lt;/p&gt;


&lt;h3&gt;Quelques fichiers&lt;/h3&gt;

&lt;p&gt;Nous avons toutes les solutions en main pour la création de notre plugin. Nous allons maintenant pouvoir entamer le codage. Il faudra bien sur placer notre code dans certains fichiers. Comme vous pouvez l'imaginer, le fait de créer un fichier nommé n'importe comment ne sera pas forcément pris en compte par Dotclear. Le nommage est important pour le bon fonctionnement de notre plugin.&lt;/p&gt;


&lt;p&gt;Ce qui va déterminer le nom du fichier que nous allons utiliser, c'est la partie de Dotclear dans laquelle on souhaite agir, la partie publique ou la partie administration. Pour agir sur la partie publique, on créera un fichier nommé &lt;em&gt;_public.php&lt;/em&gt; ou alors un fichier &lt;em&gt;_admin.php&lt;/em&gt; pour agir dans la partie administration.&lt;/p&gt;


&lt;p&gt;Pour notre pugin, c'est dans la partie admin que nous voulons agir. En effet, les billets rédigés en syntaxe Wiki sont transformés en (X)HTML dans la partie administration. Nous allons donc créer un fichier &lt;em&gt;_admin.php&lt;/em&gt; dans le répertoire &lt;em&gt;/plugins/syntaxehl/&lt;/em&gt;.&lt;/p&gt;


&lt;h3&gt;Codage du plugin&lt;/h3&gt;

&lt;p&gt;Il ne nous reste maintenant plus qu'à coder notre plugin. Placez le code suivant dans le fichier &lt;em&gt;_admin.php&lt;/em&gt; que nous venons de créer.&lt;/p&gt;

&lt;pre class=&quot;php&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// Protège contre les accès directes au fichier&lt;/span&gt;
&lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;!&lt;/span&gt;&lt;span style=&quot;color: #000066;&quot;&gt;defined&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'DC_CONTEXT_ADMIN'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;exit&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// Require façon Dotclear&lt;/span&gt;
&lt;span style=&quot;color: #b1b100;&quot;&gt;require&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066;&quot;&gt;dirname&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;__FILE__&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'/geshi/geshi.php'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// On enregistre notre behavior&lt;/span&gt;
&lt;span style=&quot;color: #ff0000&quot;&gt;$core&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;addBehavior&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'coreInitWikiPost'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #000066;&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'syntaxeHl'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'registerFunc'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;class&lt;/span&gt; syntaxeHl
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// Fonction correspondant à notre behavior&lt;/span&gt;
        &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; registerFunc&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;$wiki2xhtml&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
                &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// On lit de répertoire de GeShi pour connaître&lt;/span&gt;
                &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// la liste des langages diponibles&lt;/span&gt;
                &lt;span style=&quot;color: #ff0000&quot;&gt;$dir&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;dirname&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;__FILE__&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'/geshi/geshi/'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
                &lt;span style=&quot;color: #ff0000&quot;&gt;$od&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;opendir&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;$dir&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
                &lt;span style=&quot;color: #b1b100;&quot;&gt;while&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;$f&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;readdir&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;$od&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
                &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
                        &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// Si c'est bien un fichier portant l'extension .php&lt;/span&gt;
                        &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066;&quot;&gt;is_file&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;$dir&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;$f&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;substr&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;$f&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;-4&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'.php'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
                        &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
                                &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// On enregistre une nouvelle macro pour ce langage&lt;/span&gt;
                                &lt;span style=&quot;color: #ff0000&quot;&gt;$lang&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;str_replace&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'.php'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;$f&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
                                &lt;span style=&quot;color: #ff0000&quot;&gt;$wiki2xhtml&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;registerFunction&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'macro:['&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;$lang&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;']'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #000066;&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'syntaxeHl'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'parse'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
                        &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
                &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
        &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// Fonction appelée par Wiki2Xhtml&lt;/span&gt;
        &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; parse&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;$text&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;$args&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
                &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// On supprime les caractères blancs en&lt;/span&gt;
                &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// en début et fin de chaîne (optionnel)&lt;/span&gt;
                &lt;span style=&quot;color: #ff0000&quot;&gt;$text&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;trim&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;$text&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
                &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// Création d'une instance de GeShi&lt;/span&gt;
                &lt;span style=&quot;color: #ff0000&quot;&gt;$geshi&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; GeSHi&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;$text&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;$args&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
                &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// On désactive les liens sur les mots clés (optionnel)&lt;/span&gt;
                &lt;span style=&quot;color: #ff0000&quot;&gt;$geshi&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;enable_keyword_links&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
                &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// On retourne le code mis en forme, coloré&lt;/span&gt;
                &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;$geshi&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;parse_code&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
        &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;Ayant déjà bien expliqué les solutions employées ci-dessus, je ne m'attarderais pas sur ce code. Vous pouvez consulter la documentation de Dotclear pour en savoir plus sur les méthodes utilisées.&lt;/p&gt;


&lt;p&gt;Notez simplement que l'on utilise pas directement le nom du langage pour nommer nos macro, mais qu'on le place entre crochets ([ et ]). Il y a deux raisons à cela, d'une part le plugin qui assurait la coloration syntaxique pour Dotclear 1 utilisait lui aussi les crochets (rétro compatibilité) et d'autre part cela permet de ne pas interférer avec d'autres macros comme &lt;em&gt;html&lt;/em&gt; par exemple qui permet d'insérer du code html dans un billet lorsqu'on est en syntaxe Wiki.&lt;/p&gt;


&lt;h3&gt;Un test&amp;nbsp;?&lt;/h3&gt;

&lt;p&gt;Si vous avez correctement suivit cet article, votre plugin est maintenant fonctionnel. Vous pouvez le tester en créant un nouveau billet et en insérant le code suivant (en syntaxe Wiki):&lt;/p&gt;
&lt;pre&gt;
&amp;#47;&amp;#47;&amp;#47;[php]
&amp;lt;?php
  echo 'Hello world!';
?&amp;gt;
&amp;#47;&amp;#47;&amp;#47;
&lt;/pre&gt;


&lt;p&gt;et vous obtiendrez normalement le résultat suivant&amp;nbsp;:&lt;/p&gt;
&lt;pre class=&quot;php&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;?php&lt;/span&gt;
  &lt;span style=&quot;color: #000066;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;'Hello world!'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Vous remarquerez peut-être que ce plugin n'est pas rétro actif, c'est à dire que les anciens billets contenant du code sources ne seront pas colorés. Pour chacun d'entre eux, il vous faudra les éditer et enregistrer les modifications.&lt;/p&gt;


&lt;h3&gt;Packager votre plugin&lt;/h3&gt;

&lt;p&gt;Maintenant que votre plugin fonctionne, il pourrait être intéressant de le distribuer. Le meilleur moyen pour cela est de créer un package. Le moyen le plus simple est d'utiliser le plugin &lt;a href=&quot;http://plugins.dotaddict.org/dc2/details/Packager&quot; hreflang=&quot;fr&quot;&gt;Packager&lt;/a&gt; dont c'est la seule et unique fonction.&lt;/p&gt;


&lt;h3&gt;Version finale&lt;/h3&gt;

&lt;p&gt;Pour ceux qui souhaitent simplement installer ce plugin sur leur blog, vous pouvez consulter &lt;a href=&quot;http://plugins.code-web.org/plugin/syntaxe-hl/&quot; hreflang=&quot;fr&quot;&gt;le dépôt de plugin de Code-Web.org&lt;/a&gt; où vous trouverez les paquets directement installables sur Dotclear. Si vous avez des questions qui concernent ce plugin, rendez-vous sur le &lt;a href=&quot;http://www.code-web.org/post/2008/04/14/SyntaxeHl-11&quot; hreflang=&quot;fr&quot;&gt;billet traitant de la dernière version disponible&lt;/a&gt;.&lt;/p&gt;</description>
    
    
    
    						<h3>Abonnement aux commentaires</h3>
						<p>
							<a href="http://www.code-web.org/subscribetocomments?post_id=39">
								<!-- # If the subscriber is logged in -->
																<!-- # If the subscriber is not logged in -->
																	S'abonner pour recevoir les commentaires suivants par email															</a>
						</p>
					  </item>
    
</channel>
</rss>