<?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>Grummfy&#039;s project &#187; jouons</title>
	<atom:link href="http://grummfy.be/blog/key/jouons/feed" rel="self" type="application/rss+xml" />
	<link>http://grummfy.be/blog</link>
	<description>Mes projets, mes rêves, mes envies, ...</description>
	<lastBuildDate>Mon, 02 Jan 2012 00:03:47 +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>ZF : génération automatique du fichier de navigation et ACL</title>
		<link>http://grummfy.be/blog/333#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://grummfy.be/blog/333#comments</comments>
		<pubDate>Mon, 16 Aug 2010 20:47:14 +0000</pubDate>
		<dc:creator>Grummfy</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[délire]]></category>
		<category><![CDATA[jouons]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programmation]]></category>
		<category><![CDATA[trucs et astuces]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[ZF]]></category>

		<guid isPermaLink="false">http://grummfy.be/blog/?p=333</guid>
		<description><![CDATA[Lors de l&#8217;utilisation du mécanisme d&#8217;ACL et de génération de menu dans Zend Framework, il est intéressant de limiter l&#8217;affichage de ce menu en utilisant les ressources et privilèges associer. Pour ma part, j&#8217;utilise un fichier XML pour construire mon menu, mon sitemap, &#8230; 1. Et comme beaucoup je génère mon projet ZF à l&#8217;aide [...]]]></description>
			<content:encoded><![CDATA[<p>Lors de l&#8217;utilisation du mécanisme d&#8217;ACL et de génération de menu dans Zend Framework, il est intéressant de limiter l&#8217;affichage de ce menu en utilisant les ressources et privilèges associer.</p>
<p>Pour ma part, j&#8217;utilise un fichier XML pour construire mon menu, mon sitemap, &#8230; <sup class='footnote'><a href='#fn-333-1' id='fnref-333-1'>1</a></sup>. Et comme beaucoup je génère mon projet ZF à l&#8217;aide de Zend_Tool. Je trouvais donc dommage de devoir réécrire pratiquement la même chose que ce que j&#8217;avais déclaré dans Zend_Tool pour reconstruire mon menu. J&#8217;ai donc décidé de <em>rapidement</em> écrire un petit script qui reprendrait le fichier XML du projet et le transformerait en menu &#8230;</p>
<p>À noter que le script devrait certainement être amélioré, mais que cela permet un gain de temps considérable &#8230;</p>
<p><a href="http://grummfy.com/download/PlusScript/zfProject2Navigation.phps" target="_blank">Téléchargement</a></p>
<div class='footnotes'>
<div class='footnotedivider'></div>
<ol>
<li id='fn-333-1'>Comme expliquer dans le manuel http://framework.zend.com/manual/fr/zend.navigation.html <span class='footnotereverse'><a href='#fnref-333-1'>&#8617;</a></span></li>
</ol>
</div>
<p><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F333&amp;linkname=ZF%20%3A%20g%C3%A9n%C3%A9ration%20automatique%20du%20fichier%20de%20navigation%20et%20ACL" title="Delicious" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F333&amp;linkname=ZF%20%3A%20g%C3%A9n%C3%A9ration%20automatique%20du%20fichier%20de%20navigation%20et%20ACL" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F333&amp;linkname=ZF%20%3A%20g%C3%A9n%C3%A9ration%20automatique%20du%20fichier%20de%20navigation%20et%20ACL" title="Twitter" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F333&amp;linkname=ZF%20%3A%20g%C3%A9n%C3%A9ration%20automatique%20du%20fichier%20de%20navigation%20et%20ACL" title="Facebook" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_google_bookmarks" href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F333&amp;linkname=ZF%20%3A%20g%C3%A9n%C3%A9ration%20automatique%20du%20fichier%20de%20navigation%20et%20ACL" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a><a class="a2a_button_netvibes_share" href="http://www.addtoany.com/add_to/netvibes_share?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F333&amp;linkname=ZF%20%3A%20g%C3%A9n%C3%A9ration%20automatique%20du%20fichier%20de%20navigation%20et%20ACL" title="Netvibes Share" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/netvibes.png" width="16" height="16" alt="Netvibes Share"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgrummfy.be%2Fblog%2F333&amp;title=ZF%20%3A%20g%C3%A9n%C3%A9ration%20automatique%20du%20fichier%20de%20navigation%20et%20ACL" id="wpa2a_2"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://grummfy.be/blog/333/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wampserver : quick switch xdebug menu</title>
		<link>http://grummfy.be/blog/250#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://grummfy.be/blog/250#comments</comments>
		<pubDate>Wed, 24 Mar 2010 22:22:42 +0000</pubDate>
		<dc:creator>Grummfy</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[deboguage]]></category>
		<category><![CDATA[découverte]]></category>
		<category><![CDATA[jouons]]></category>
		<category><![CDATA[programmation]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[trucs et astuces]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[XDebug]]></category>

		<guid isPermaLink="false">http://grummfy.be/blog/?p=250</guid>
		<description><![CDATA[Activer et désactiver XDebug sur Wampserver à souhait! Ceci via un menu supplémentaire.]]></description>
			<content:encoded><![CDATA[<p>Pour une fois, un article sous Ms Windows. Stage oblige, je passe du temps sous celui-ci (XP <img src='http://grummfy.be/blog/wp/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  ). Afin d&#8217;optimiser son travail, il y a parfois des petites choses bien pratiques, telles que ce que je vais vous présenter.</p>
<p>XDebug est un outil merveilleux, parfois capricieux, certes, mais très utile. Il permet, notamment<sup class='footnote'><a href='#fn-250-1' id='fnref-250-1'>1</a></sup> :</p>
<ul>
<li>Affichage de tracé d&#8217;erreur</li>
<li>Meilleures lectures des exceptions</li>
<li>Débogage pas-à-pas</li>
<li>Profiling d&#8217;application</li>
<li>&#8230;</li>
</ul>
<p>Bref, des choses essentielles en développement. Et, contrairement à ce que certains IDE<sup class='footnote'><a href='#fn-250-2' id='fnref-250-2'>2</a></sup> font, il permet surtout de le faire sur un serveur &laquo;&nbsp;réel&nbsp;&raquo;, donc avec une utilisation &laquo;&nbsp;réel&nbsp;&raquo;.</p>
<p>Le but de ce billet n&#8217;est pas de présenter XDebug, d&#8217;autres le font mieux que moi <sup class='footnote'><a href='#fn-250-3' id='fnref-250-3'>3</a></sup>, mais bien de vous présenter un petit script vous permettant d&#8217;activer et désactiver XDebug sur wampserver.</p>
<h2>Installation</h2>
<ol>
<li>Téléchargez le fichier <sup class='footnote'><a href='#fn-250-4' id='fnref-250-4'>4</a></sup> et décompressez-le.</li>
<li>Suivez les instructions d&#8217;installation décrite dans le fichier installe. Il y a seulement 1 fichier à modifier + 1 fichier par version de PHP installée.</li>
<li>Relancer wampserver et tester!</li>
</ol>
<p>Si vous avez des questions, n&#8217;hésitez pas.</p>
<h2>Plus d&#8217;informations</h2>
<ul>
<li><a href="http://blog.pascal-martin.fr/post/xdebug-installation-premiers-pas" target="_blank">Xdebug : Installation et premier pas</a></li>
<li><a href="http://blog.wampserver.com/index.php/2009/08/28/debugger-avec-wampserver-xdebug-et-pdt/" target="_self" class="broken_link">Débugger avec WampServer, Xdebug et PDT</a></li>
<li><a href="http://evoilliot.u7n.org/2010/02/installer-xdebug-avec-xampp/" target="_blank" class="broken_link">Installer Xdebug avec XAMPP</a></li>
<li><a href="http://www.wampserver.com" target="_blank">Wampserver</a></li>
<li><a href="http://xdebug.com/" target="_blank">XDebug</a></li>
<li>Pièce jointe : <a href="http://grummfy.be/blog/250/xdebug-tar">XDebug quick switch menu for wampserver</a></li>
</ul>
<div class='footnotes'>
<div class='footnotedivider'></div>
<ol>
<li id='fn-250-1'>On parle de serveur web avec PHP &#8230; <span class='footnotereverse'><a href='#fnref-250-1'>&#8617;</a></span></li>
<li id='fn-250-2'>Par exemple, Zend Studio permet un débogage pas à pas mais en interne donc réduit &#8230;  <span class='footnotereverse'><a href='#fnref-250-2'>&#8617;</a></span></li>
<li id='fn-250-3'>cf. plus d&#8217;informations <span class='footnotereverse'><a href='#fnref-250-3'>&#8617;</a></span></li>
<li id='fn-250-4'><a href="http://grummfy.be/blog/250/xdebug-tar">XDebug quick switch menu for wampserver</a> <span class='footnotereverse'><a href='#fnref-250-4'>&#8617;</a></span></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://grummfy.be/blog/250/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Python, l&#8217;héritage en quelques lignes</title>
		<link>http://grummfy.be/blog/87#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://grummfy.be/blog/87#comments</comments>
		<pubDate>Thu, 06 Sep 2007 01:37:00 +0000</pubDate>
		<dc:creator>Grummfy</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[jouons]]></category>
		<category><![CDATA[programmation]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[trucs et astuces]]></category>

		<guid isPermaLink="false">http://grummfy.be/blog/?p=87</guid>
		<description><![CDATA[Python, l&#8217;héritage en quelques lignes # !/usr/bin/python # -*- coding: UTF-8 -*- class A(): def A(self): print self.C() + '.A' def B(self): print self.C() + '.B' def C(self): return 'A' class B(A): def B(self): self.A() A.A(self) A.B(self) def C(self): return 'B' print 'test de A' a = A() a.B() print ' test de B' b [...]]]></description>
			<content:encoded><![CDATA[<p>Python, l&#8217;héritage en quelques lignes</p>
<pre> # !/usr/bin/python # -*- coding: UTF-8 -*- class A():     def A(self):         print self.C() + '.A'     def B(self):         print self.C() + '.B'     def C(self):         return 'A' class B(A):     def B(self):         self.A()         A.A(self)         A.B(self)     def C(self):         return 'B' print 'test de A' a = A() a.B() print ' test de B' b = B() b.B() </pre>
<p>résultat affiché&nbsp;:</p>
<blockquote><p>test de A A.B</p>
<p> test de B B.A B.A B.B</p>
</blockquote>
<p><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F87&amp;linkname=Python%2C%20l%26%238217%3Bh%C3%A9ritage%20en%20quelques%20lignes" title="Delicious" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F87&amp;linkname=Python%2C%20l%26%238217%3Bh%C3%A9ritage%20en%20quelques%20lignes" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F87&amp;linkname=Python%2C%20l%26%238217%3Bh%C3%A9ritage%20en%20quelques%20lignes" title="Twitter" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F87&amp;linkname=Python%2C%20l%26%238217%3Bh%C3%A9ritage%20en%20quelques%20lignes" title="Facebook" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_google_bookmarks" href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F87&amp;linkname=Python%2C%20l%26%238217%3Bh%C3%A9ritage%20en%20quelques%20lignes" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a><a class="a2a_button_netvibes_share" href="http://www.addtoany.com/add_to/netvibes_share?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F87&amp;linkname=Python%2C%20l%26%238217%3Bh%C3%A9ritage%20en%20quelques%20lignes" title="Netvibes Share" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/netvibes.png" width="16" height="16" alt="Netvibes Share"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgrummfy.be%2Fblog%2F87&amp;title=Python%2C%20l%26%238217%3Bh%C3%A9ritage%20en%20quelques%20lignes" id="wpa2a_4"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://grummfy.be/blog/87/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP : fonction callback et méthode</title>
		<link>http://grummfy.be/blog/72#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://grummfy.be/blog/72#comments</comments>
		<pubDate>Mon, 20 Aug 2007 01:15:00 +0000</pubDate>
		<dc:creator>Grummfy</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[découverte]]></category>
		<category><![CDATA[jouons]]></category>
		<category><![CDATA[programmation]]></category>
		<category><![CDATA[trucs et astuces]]></category>

		<guid isPermaLink="false">http://grummfy.be/blog/?p=72</guid>
		<description><![CDATA[PHP permet bien des choses, notamment l&#8217;utilisation de fonction de callback. Les fonction de callback sont des fonctions qui seront appeler durant l&#8217;exécution d&#8217;une autre fonction, et ce de manière automatique. C&#8217;est bien souvent le cas lors d&#8217;expression régulière ou encore lors d&#8217;une session php passant par ses propres fonctions (via session_set_save_handler() )! Les fonctions [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/blog/index.php?tag/PHP#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">PHP</a> permet bien des choses, notamment l&#8217;utilisation de fonction de callback. Les fonction de callback sont des fonctions qui seront appeler durant l&#8217;exécution d&#8217;une autre fonction, et ce de manière automatique.</p>
<p>C&#8217;est bien souvent le cas lors d&#8217;expression régulière ou encore lors d&#8217;une session php passant par ses propres fonctions (via session_set_save_handler() )!</p>
<p>Les fonctions de callback peuvent être rpésente sous différentes forme&nbsp;:</p>
<ul>
<li>Fonction de PHP</li>
<li>Fonction que vous avez définie</li>
<li>Méthode static</li>
<li>Méthode non-static</li>
</ul>
<p>Dans le cas de fonctions, il suffit de mettre le nom de la fonction entre guillemet. </p>
<p></p>
<p></p>
<p>Mais dans le cas de méthode, il vous faut utiliser un array</p>
<p>Pour les méthodes static, ce sera&nbsp;: <code>array('NOMDELACLASS', 'NOMDELAMETHODE')</code></p>
<p>Pour les méthodes non-static, ce sera&nbsp;: <code>array(INSTANCEDELACLASS, 'NOMDELAMETHODE')</code></p>
<p>Exemple&nbsp;:</p>
<pre> class maClass {     static function toto()     {         echo 'on a appellé toto';     }     public function totor()     {         echo 'on a appellé totor';     } } //cas static call_user_func(array('maClass', 'toto')); //on a appellé toto //cas non-static $maClass = new maClass(); call_user_func(array($maClass, 'totor')); //on a appellé totor </pre>
<p>J&#8217;espère que ce petit truc vous sera utile.</p>
<p><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F72&amp;linkname=PHP%20%3A%20fonction%20callback%20et%20m%C3%A9thode" title="Delicious" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F72&amp;linkname=PHP%20%3A%20fonction%20callback%20et%20m%C3%A9thode" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F72&amp;linkname=PHP%20%3A%20fonction%20callback%20et%20m%C3%A9thode" title="Twitter" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F72&amp;linkname=PHP%20%3A%20fonction%20callback%20et%20m%C3%A9thode" title="Facebook" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_google_bookmarks" href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F72&amp;linkname=PHP%20%3A%20fonction%20callback%20et%20m%C3%A9thode" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a><a class="a2a_button_netvibes_share" href="http://www.addtoany.com/add_to/netvibes_share?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F72&amp;linkname=PHP%20%3A%20fonction%20callback%20et%20m%C3%A9thode" title="Netvibes Share" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/netvibes.png" width="16" height="16" alt="Netvibes Share"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgrummfy.be%2Fblog%2F72&amp;title=PHP%20%3A%20fonction%20callback%20et%20m%C3%A9thode" id="wpa2a_6"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://grummfy.be/blog/72/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Zend Framework (ZF) : un livre d&#8217;or,  sixième étapes : Conclusions</title>
		<link>http://grummfy.be/blog/65#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://grummfy.be/blog/65#comments</comments>
		<pubDate>Mon, 06 Aug 2007 02:38:00 +0000</pubDate>
		<dc:creator>Grummfy</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[jouons]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programmation]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[tutoriel]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[ZF]]></category>

		<guid isPermaLink="false">http://grummfy.be/blog/?p=65</guid>
		<description><![CDATA[Créations d&#8217;un livre d&#8217;or en 6 étapes Définition Créations des tables sql et des répertoires Bases des fichiers Affichages et ajout de messages Modification et suppression des messages Conclusions Conclusions Avant de faire la conclusion finale, je vais ajouter deux trois trucs au script : Dans la base de donnée ajouter trois champs : ip(varchar de 15), [...]]]></description>
			<content:encoded><![CDATA[<h2>Créations d&#8217;un livre d&#8217;or en 6 étapes</h2>
<ol>
<li><a href="?p=58#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Définition</a></li>
<li><a href="?p=59#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Créations des tables sql et des répertoires</a></li>
<li><a href="?p=60#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Bases des fichiers</a></li>
<li><a href="?p=63#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Affichages et ajout de messages</a></li>
<li><a href="?p=64#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Modification et suppression des messages</a></li>
<li><a href="?p=65#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Conclusions</a></li>
</ol>
<h3>Conclusions</h3>
<p>Avant de faire la conclusion finale, je vais ajouter deux trois trucs au script : Dans la base de donnée ajouter trois champs : ip(varchar de 15), email(varchar de 60) et site(varchar de 60) et modifier en conséquence le fichier contrôleur</p>
<p>On pourrait ajouter un système de validation des messages&#8230; et encore d&#8217;autre choses.</p>
<p>On peux ajouter un système de cache (voir archive)</p>
<p>Afin de terminer en plus joli voici une feuille de style à ajouter : <strong>/public/style/site.css</strong></p>
<pre> body,html { 	margin: 0px; 	font-family: Verdana,Arial,Helvetica,sans-serif; 	color: #000000; 	background-color: #ffffff; 	text-align: justify; } h1 { 	font-size: 1.4em; 	color: #800000; } #content { 	margin: 0px auto 0px auto; 	width: 500px; } .livre_block_message { 	border: 1px dotted #aaaaaa; 	margin-bottom: 1.5em; 	padding: 0.5em; } a { 	color: #800000; }</pre>
<p>et pour qu&#8217;elle soit pris en compte on modifie header.phtml :</p>
<pre> ... 	&lt;link rel="stylesheet" type="text/css" media="screen" href="&lt;?php echo $this-&gt;baseUrl;?&gt;/public/style/site.css" /&gt; &lt;/head&gt; ...</pre>
<h3>Conclusion</h3>
<p>Dans ce tutoriel on a :</p>
<ul>
<li>Utiliser Zend_View</li>
<li>Utiliser Zend_View_Helper</li>
<li>Utiliser Zend_Db_Table</li>
<li>Utiliser Zend_Config_Ini</li>
<li>Utiliser Zend_Controller_Front</li>
</ul>
<p>Maintenant essayer de modifier et de bien comprendre tout cela, lisez le manuel de Zend Framework et vous irez rapidement vers de plus grosses application!</p>
<p><a href="/blog/media/tuto/zf_goldbook.tar.bz2#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Télécharger</a></p>
<p><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F65&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20%20sixi%C3%A8me%20%C3%A9tapes%20%3A%20Conclusions" title="Delicious" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F65&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20%20sixi%C3%A8me%20%C3%A9tapes%20%3A%20Conclusions" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F65&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20%20sixi%C3%A8me%20%C3%A9tapes%20%3A%20Conclusions" title="Twitter" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F65&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20%20sixi%C3%A8me%20%C3%A9tapes%20%3A%20Conclusions" title="Facebook" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_google_bookmarks" href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F65&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20%20sixi%C3%A8me%20%C3%A9tapes%20%3A%20Conclusions" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a><a class="a2a_button_netvibes_share" href="http://www.addtoany.com/add_to/netvibes_share?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F65&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20%20sixi%C3%A8me%20%C3%A9tapes%20%3A%20Conclusions" title="Netvibes Share" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/netvibes.png" width="16" height="16" alt="Netvibes Share"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgrummfy.be%2Fblog%2F65&amp;title=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20%20sixi%C3%A8me%20%C3%A9tapes%20%3A%20Conclusions" id="wpa2a_8"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://grummfy.be/blog/65/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Framework (ZF) : un livre d&#8217;or, cinquième étapes : Modification et suppression des messages</title>
		<link>http://grummfy.be/blog/64#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://grummfy.be/blog/64#comments</comments>
		<pubDate>Mon, 06 Aug 2007 02:36:00 +0000</pubDate>
		<dc:creator>Grummfy</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[jouons]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programmation]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[tutoriel]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[ZF]]></category>

		<guid isPermaLink="false">http://grummfy.be/blog/?p=64</guid>
		<description><![CDATA[Créations d&#8217;un livre d&#8217;or en 6 étapes Définition Créations des tables sql et des répertoires Bases des fichiers Affichages et ajout de messages Modification et suppression des messages Conclusions Modification et suppression des messages Modifions notre contrôleur : &#60;?php /** Zend_Controller_Action */ require_once 'Zend/Controller/Action.php'; class LivreController extends Zend_Controller_Action { public function indexAction() { $livre = new [...]]]></description>
			<content:encoded><![CDATA[<h2>Créations d&#8217;un livre d&#8217;or en 6 étapes</h2>
<ol>
<li><a href="?p=58#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Définition</a></li>
<li><a href="?p=59#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Créations des tables sql et des répertoires</a></li>
<li><a href="?p=60#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Bases des fichiers</a></li>
<li><a href="?p=63#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Affichages et ajout de messages</a></li>
<li><a href="?p=64#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Modification et suppression des messages</a></li>
<li><a href="?p=65#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Conclusions</a></li>
</ol>
<h3>Modification et suppression des messages</h3>
<p>Modifions notre contrôleur :</p>
<pre> &lt;?php /** Zend_Controller_Action */ require_once 'Zend/Controller/Action.php'; class LivreController extends Zend_Controller_Action { 	public function indexAction() 	{ 		$livre = new livre(); 		$this-&gt;view-&gt;livres = $livre-&gt;fetchAll(); 	} 	public function ajouterAction() 	{ 		$this-&gt;view-&gt;title .= ' .: Ajout d\'un message'; 		if ($this-&gt;getRequest()-&gt;isPost()) 		{ 			Zend_Loader::loadClass('Zend_Filter_StripTags'); 			$filter = new Zend_Filter_StripTags(); 			$livre = $this-&gt;_getEmptyMsg(); 			$livre-&gt;id = null; 			$livre-&gt;nom = trim($filter-&gt;filter($this-&gt;getRequest()-&gt;getPost('nom'))); 			$livre-&gt;message = trim($filter-&gt;filter($this-&gt;getRequest()-&gt;getPost('message'))); 			if ($livre-&gt;nom != htmlspecialchars('Pseudo')) 			{ 				$livre_ = new Livre(); 				$livre_-&gt;insertObject($livre); 				$this-&gt;_redirect('/livre'); 				return; 			} 			else 			{ 				$this-&gt;view-&gt;message = 'Merci de donner votre pseudo!'; 			} 		} 		//création d'un message vide 		$this-&gt;view-&gt;livre = $this-&gt;_getEmptyMsg(); 	} 	public function modifierAction() 	{ 		//si on est aps connecter -&gt;redirection sur le logeur 		if (!$_SESSION['connecter']) 			$this-&gt;getResponse()-&gt;setRedirect($this-&gt;view-&gt;baseUrl . '/livre/admin/'); 		$this-&gt;view-&gt;title .= ' .: Modification d\'un message'; 		//récupération du message correspondant au paramètre id 		$livreTable = new Livre(); 		$where  = $livreTable-&gt;getAdapter()-&gt;quoteInto('id = ?', intval($this-&gt;getRequest()-&gt;getParam('id'))); 		$livre = $livreTable-&gt;fetchRow($where); 		if ($this-&gt;getRequest()-&gt;isPost()) 		{ 			Zend_Loader::loadClass('Zend_Filter_StripTags'); 			$filter = new Zend_Filter_StripTags(); 			$livre-&gt;nom = trim($filter-&gt;filter($this-&gt;getRequest()-&gt;getPost('nom'))); 			$livre-&gt;message = trim($filter-&gt;filter($this-&gt;getRequest()-&gt;getPost('message'))); 			if ($livre-&gt;nom != htmlspecialchars('Pseudo')) 			{ 				$livre_ = new Livre(); 				$livre_-&gt;updateObject($livre, $livre_-&gt;getAdapter()-&gt;quoteInto('id = ?', $livre-&gt;id)); 				$this-&gt;_redirect('/livre/'); 				return; 			} 		} 		$this-&gt;view-&gt;livre = $livre; 		$this-&gt;view-&gt;action .= '/id/' . $livre-&gt;id; 		$this-&gt;render('ajouter'); 	} 	public function adminAction() 	{ 		$this-&gt;view-&gt;title .= ' .: Administration'; 		if ($this-&gt;getRequest()-&gt;isPost() &amp;&amp; !$_SESSION['connecter']) 		{ 			if ($this-&gt;getRequest()-&gt;getPost('login') == 'admin' &amp;&amp; $this-&gt;getRequest()-&gt;getPost('pass') == '1234') 			{ 				//bon password et bon login 				$_SESSION['connecter'] = true; 			} 		} 		elseif (!$_SESSION['connecter']) 		{ 			$this-&gt;render(); 			return; 		} 		$this-&gt;getResponse()-&gt;setRedirect($this-&gt;view-&gt;baseUrl . '/livre/'); 	} 	public function disadminAction() 	{ 		$this-&gt;view-&gt;title .= ' .: Déconnection'; 		if ($_SESSION['connecter']) 		{ 			$_SESSION['connecter'] = false; 		} 		$this-&gt;getResponse()-&gt;setRedirect($this-&gt;view-&gt;baseUrl . '/livre/'); 	} 	public function supprimerAction() 	{ 		//si on est aps connecter -&gt;redirection sur le logeur 		if (!$_SESSION['connecter']) 			$this-&gt;getResponse()-&gt;setRedirect($this-&gt;view-&gt;baseUrl . '/livre/admin/'); 		$this-&gt;view-&gt;title .= ' .: Suppretion d\'un message'; 		$livre = $this-&gt;_getEmptyMsg(); 		$livre-&gt;id = intval($this-&gt;getRequest()-&gt;getParam('id')); 		$this-&gt;view-&gt;action .= '/id/' . $livre-&gt;id; 		if ($this-&gt;getRequest()-&gt;isPost()) 		{ 			$livre_ = new Livre(); 			if ($livre_-&gt;delete($livre_-&gt;getAdapter()-&gt;quoteInto('id = ?', $livre-&gt;id))) 				$this-&gt;view-&gt;message = 'Message supprimé!'; 			else 				$this-&gt;view-&gt;message = 'Message &lt;b&gt;non&lt;/b&gt; supprimé!'; 			$this-&gt;view-&gt;message .= '&lt;br /&gt; Vous aller être rediriger!&lt;br /&gt;'; 			$this-&gt;getResponse()-&gt;setRawHeader('Refresh:3; url=' . $this-&gt;view-&gt;baseUrl . '/livre/'); 		} 	} 	function init() 	{ 		session_name('goldbook'); 		session_start(); 		$_SESSION['connecter'] = isset($_SESSION['connecter'])?$_SESSION['connecter']:false; 		$this-&gt;view-&gt;connecter = $_SESSION['connecter']; 		$this-&gt;view-&gt;title = 'Livre d\'or'; 		//url de base... 		$this-&gt;view-&gt;baseUrl = $this-&gt;_request-&gt;getBaseUrl(); 		$this-&gt;view-&gt;action = $this-&gt;getRequest()-&gt;getActionName(); 		//prêt à travailler sur les livres 		Zend_Loader::loadClass('Livre'); 		//ajout des aides de view 		$this-&gt;view-&gt;addHelperPath('./app/views/helpers', 'MyWsp_View_Helper'); 		$this-&gt;view-&gt;setEscape('utf8_encode'); 	} 	/** 	 * Créer un message vide 	 * 	 * @return Object 	 */ 	protected function _getEmptyMsg() 	{ 		//création d'un message vide 		$livre = new stdClass(); 		$livre	-&gt;id = -99; 		$livre	-&gt;nom = 'Pseudo'; 		$livre	-&gt;message = 'Entrez votre message'; 		$livre	-&gt;date = time(); 		return $livre; 	} }</pre>
<p>Il nous faut créer un système de session, et une authentification pour l&#8217;administration. Ici les choses sont très basiques, car le but n&#8217;y est pas! Donc on utilise els session php et une authentification des plus basique (login: <q>admin</q>, password: <q>1234</q>)!</p>
<p>Il nous faut encore modifier index.phtml</p>
<pre> &lt;?php echo $this-&gt;render('header.phtml'); ?&gt; &lt;?php if ($this-&gt;connecter) echo '&lt;a href="' , $this-&gt;baseUrl , '/livre/disadmin"&gt;Se déconnecter&lt;/a&gt;'; ?&gt; 	&lt;div id="livre"&gt; 		&lt;p&gt;&lt;a href="&lt;?php echo $this-&gt;baseUrl; ?&gt;/livre/ajouter"&gt;Ajouter un message&lt;/a&gt;&lt;/p&gt; 		&lt;div id="livre_message"&gt; 		&lt;?php foreach($this-&gt;livres as $livre) : ?&gt; 			&lt;div class="livre_block_message"&gt; 				&lt;span class="livre_pseudo"&gt;&lt;?php 					echo $this-&gt;escape($livre-&gt;nom); 				?&gt;&lt;/span&gt; | 				&lt;span class="livre_date"&gt;Le &lt;?php echo $this-&gt;date('DDDD DD MMMM YYYY', $this-&gt;escape($livre-&gt;date)); ?&gt;&lt;/span&gt; 				&lt;br /&gt; 				&lt;span class="livre_message"&gt;&lt;?php echo nl2br($this-&gt;escape($livre-&gt;message)); ?&gt;&lt;/span&gt; 				&lt;?php 				if ($this-&gt;connecter) 					echo '&lt;br /&gt;&lt;a href="' , $this-&gt;baseUrl , '/livre/modifier/id/' , $livre-&gt;id , '"&gt;Modifier&lt;/a&gt; 					&lt;a href="' , $this-&gt;baseUrl , '/livre/supprimer/id/' , $livre-&gt;id , '"&gt;Supprimer&lt;/a&gt;'; 				?&gt; 			&lt;/div&gt; 		&lt;?php endforeach; ?&gt; 		&lt;/div&gt; 	&lt;/div&gt; &lt;?php echo $this-&gt;render('footer.phtml'); ?&gt;</pre>
<p>N&#8217;oublions pas d&#8217;ajouter les fichier admin.phtml et supprimer.phtml</p>
<p><strong>suprimer.html</strong></p>
<pre> &lt;?php echo $this-&gt;render('header.phtml'); ?&gt; 	&lt;div id="livre"&gt; 		&lt;strong&gt;&lt;?php echo $this-&gt;message; ?&gt;&lt;/strong&gt; 		&lt;form method="post" action="&lt;?php echo $this-&gt;baseUrl ?&gt;/livre/&lt;?php echo $this-&gt;action ?&gt;" name="form_nom"&gt; 			&lt;div id="livre_haut"&gt; 				&lt;button type="submit" name="del"&gt;Supprimer?&lt;/button&gt; 			&lt;/div&gt; 		&lt;/form&gt; 		&lt;br /&gt; 		&lt;br /&gt; 	&lt;/div&gt; &lt;?php echo $this-&gt;render('footer.phtml'); ?&gt;</pre>
<p><strong>admin.phtml</strong></p>
<pre> &lt;?php echo $this-&gt;render('header.phtml'); ?&gt; 	&lt;div id="livre"&gt; 		&lt;form method="post" action="&lt;?php echo $this-&gt;baseUrl ?&gt;/livre/admin" name="form_nom"&gt; 			&lt;div id="livre_haut"&gt; 				Login : &lt;input type="text" name="login"&gt; 				&lt;br /&gt; 				Password : &lt;input type="password" name="pass"&gt; 				&lt;br /&gt; 				&lt;button type="submit" name="admin"&gt;Poster&lt;/button&gt; 			&lt;/div&gt; 		&lt;/form&gt; 		&lt;br /&gt; 		&lt;br /&gt; 	&lt;/div&gt; &lt;?php echo $this-&gt;render('footer.phtml'); ?&gt;</pre>
<p>Comme on peux le remarquer pas besoin d&#8217;un fichier modifier.phtml car nous réutilisons ajouter.phtml via <q>$this-&gt;render(&#8216;ajouter&#8217;);</q>!</p>
<p><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F64&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20cinqui%C3%A8me%20%C3%A9tapes%20%3A%20Modification%20et%20suppression%20des%20messages" title="Delicious" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F64&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20cinqui%C3%A8me%20%C3%A9tapes%20%3A%20Modification%20et%20suppression%20des%20messages" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F64&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20cinqui%C3%A8me%20%C3%A9tapes%20%3A%20Modification%20et%20suppression%20des%20messages" title="Twitter" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F64&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20cinqui%C3%A8me%20%C3%A9tapes%20%3A%20Modification%20et%20suppression%20des%20messages" title="Facebook" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_google_bookmarks" href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F64&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20cinqui%C3%A8me%20%C3%A9tapes%20%3A%20Modification%20et%20suppression%20des%20messages" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a><a class="a2a_button_netvibes_share" href="http://www.addtoany.com/add_to/netvibes_share?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F64&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20cinqui%C3%A8me%20%C3%A9tapes%20%3A%20Modification%20et%20suppression%20des%20messages" title="Netvibes Share" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/netvibes.png" width="16" height="16" alt="Netvibes Share"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgrummfy.be%2Fblog%2F64&amp;title=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20cinqui%C3%A8me%20%C3%A9tapes%20%3A%20Modification%20et%20suppression%20des%20messages" id="wpa2a_10"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://grummfy.be/blog/64/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Framework (ZF) : un livre d&#8217;or, quatrième étapes : Affichages et ajout de messages</title>
		<link>http://grummfy.be/blog/63#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://grummfy.be/blog/63#comments</comments>
		<pubDate>Mon, 06 Aug 2007 02:03:00 +0000</pubDate>
		<dc:creator>Grummfy</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[jouons]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programmation]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[tutoriel]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[ZF]]></category>

		<guid isPermaLink="false">http://grummfy.be/blog/?p=63</guid>
		<description><![CDATA[Créations d&#8217;un livre d&#8217;or en 6 étapes Définition Créations des tables sql et des répertoires Bases des fichiers Affichages et ajout de messages Modification et suppression des messages Conclusions Affichages et ajout de messages Maintenant, il nous faut modifier le contrôleur afin qu&#8217;il affiche le contenu des fichier index.phtml et ajout.phtml. &#60;?php /** Zend_Controller_Action */ [...]]]></description>
			<content:encoded><![CDATA[<h2>Créations d&#8217;un livre d&#8217;or en 6 étapes</h2>
<ol>
<li><a href="?p=58#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Définition</a></li>
<li><a href="?p=59#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Créations des tables sql et des répertoires</a></li>
<li><a href="?p=60#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Bases des fichiers</a></li>
<li><a href="?p=63#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Affichages et ajout de messages</a></li>
<li><a href="?p=64#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Modification et suppression des messages</a></li>
<li><a href="?p=65#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Conclusions</a></li>
</ol>
<h3>Affichages et ajout de messages</h3>
<p>Maintenant, il nous faut modifier le contrôleur afin qu&#8217;il affiche le contenu des fichier index.phtml et ajout.phtml.</p>
<pre> &lt;?php /** Zend_Controller_Action */ require_once 'Zend/Controller/Action.php'; class LivreController extends Zend_Controller_Action { 	public function indexAction() 	{ 		$livre = new livre(); 		$this-&gt;view-&gt;livres = $livre-&gt;fetchAll(); 	} 	public function ajouterAction() 	{ 		$this-&gt;view-&gt;title .= ' .: Ajout d\'un message'; 		if ($this-&gt;getRequest()-&gt;isPost()) 		{ 			Zend_Loader::loadClass('Zend_Filter_StripTags'); 			$filter = new Zend_Filter_StripTags(); 			$livre = $this-&gt;_getEmptyMsg(); 			$livre-&gt;id = null; 			$livre-&gt;nom = trim($filter-&gt;filter($this-&gt;getRequest()-&gt;getPost('nom'))); 			$livre-&gt;message = trim($filter-&gt;filter($this-&gt;getRequest()-&gt;getPost('message'))); 			if ($livre-&gt;nom != htmlspecialchars('Pseudo')) 			{ 				$livre_ = new Livre(); 				$livre_-&gt;insertObject($livre); 				$this-&gt;_redirect('/livre'); 				return; 			} 			else 			{ 				$this-&gt;view-&gt;message = 'Merci de donner votre pseudo!'; 			} 		} 		//création d'un message vide 		$this-&gt;view-&gt;livre = $this-&gt;_getEmptyMsg(); 	} 	function init() 	{ 		$this-&gt;view-&gt;title = 'Livre d\'or'; 		//url de base... 		$this-&gt;view-&gt;baseUrl = $this-&gt;_request-&gt;getBaseUrl(); 		$this-&gt;view-&gt;action = $this-&gt;getRequest()-&gt;getActionName(); 		//prêt à travailler sur les livres 		Zend_Loader::loadClass('Livre'); 		//ajout des aides de view 		$this-&gt;view-&gt;addHelperPath('./app/views/helpers', 'MyWsp_View_Helper'); 		$this-&gt;view-&gt;setEscape('utf8_encode'); 	} 	/** 	 * Créer un message vide 	 * 	 * @return Object 	 */ 	protected function _getEmptyMsg() 	{ 		//création d'un message vide 		$livre = new stdClass(); 		$livre	-&gt;id = -99; 		$livre	-&gt;nom = 'Pseudo'; 		$livre	-&gt;message = 'Entrez votre message'; 		$livre	-&gt;date = time(); 		return $livre; 	} }</pre>
<p>Passons en revue chaque méthode</p>
<h2>init()</h2>
<p>Cette permet l&#8217;initialisation des différent paramètre, elle est appelé dans le constructeur parent de la class. On en profite pour définir un titre de page (<q>$this-view-&gt;title</q>) et divers autres paramètres. On défini aussi un répertoire supplémentaire pour les helper de view (<q>$this-&gt;view-&gt;addHelperPath(&#8216;./app/views/helpers&#8217;, &#8216;MyWsp_View_Helper&#8217;);</q>).</p>
<h2>ajouterAction()</h2>
<p>Appeler lorsque on est à l&#8217;url /livre/ajouter, tout comme les autres méthode du type actionnNameAction() la partie actionName est prise depuis l&#8217;url! On récupère les différent paramètre si on a effectué un post ou on affiche simplement le contenu de ajouter.phtml (ceci se faisant automatiquement).</p>
<h2>indexAction()</h2>
<p>On récupère les informations dans la base de données, et on stocke les données dans le viewer.</p>
<p>Ajoutons quelques fichiers afin de rendre le tout plus intéressant et avoir un vrai jeu de templates/gabarit! <strong>header.phtml</strong></p>
<pre> &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr-be" lang="fr-be"&gt; &lt;head&gt; 	&lt;meta http-equiv="Content-Type" content="text/html;charset=utf-8" /&gt; 	&lt;title&gt;&lt;?php echo $this-&gt;escape($this-&gt;title); ?&gt;&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="content"&gt; &lt;h1&gt;&lt;?php echo $this-&gt;escape($this-&gt;title); ?&gt;&lt;/h1&gt;</pre>
<p>le haut de la page html</p>
<p><strong>footer.phtml</strong></p>
<pre> 	&lt;/div&gt; &lt;/body&gt; &lt;/html&gt;</pre>
<p>le bas de la page html</p>
<p><strong>index.phtml</strong></p>
<pre> &lt;?php echo $this-&gt;render('header.phtml'); ?&gt; 	&lt;div id="livre"&gt; 		&lt;p&gt;&lt;a href="&lt;?php echo $this-&gt;baseUrl; ?&gt;/livre/ajouter"&gt;Ajouter un message&lt;/a&gt;&lt;/p&gt; 		&lt;div id="livre_message"&gt; 		&lt;?php foreach($this-&gt;livres as $livre) : ?&gt; 			&lt;div class="livre_block_message"&gt; 				&lt;span class="livre_pseudo"&gt;&lt;?php echo $this-&gt;escape($livre-&gt;nom); ?&gt;&lt;/span&gt; | 				&lt;span class="livre_date"&gt;Le &lt;?php echo $this-&gt;date('DDDD DD MMMM YYYY', $this-&gt;escape($livre-&gt;date)); ?&gt;&lt;/span&gt; 				&lt;br /&gt; 				&lt;span class="livre_message"&gt;&lt;?php echo nl2br($this-&gt;escape($livre-&gt;message)); ?&gt;&lt;/span&gt; 				&lt;?php 				if ($this-&gt;connecter) 					echo '&lt;br /&gt;&lt;a href="' , $this-&gt;baseUrl , '/livre/modifier/id/' , $livre-&gt;id , '"&gt;Modifier&lt;/a&gt; 					&lt;a href="' , $this-&gt;baseUrl , '/livre/supprimer/id/' , $livre-&gt;id , '"&gt;Supprimer&lt;/a&gt;'; 				?&gt; 			&lt;/div&gt; 		&lt;?php endforeach; ?&gt; 		&lt;/div&gt; 	&lt;/div&gt; &lt;?php echo $this-&gt;render('footer.phtml'); ?&gt;</pre>
<p>La liste des messages du forum, on oublie pas d&#8217;inclure le haut et le bas de page (via <q>$this-&gt;render();</q>)</p>
<p>On voix ici l&#8217;utilisation du helper Date afin d&#8217;afficher la date au format choisi.</p>
<p><strong>ajouter.phtml</strong></p>
<pre> &lt;?php echo $this-&gt;render('header.phtml'); ?&gt; 	&lt;div id="livre"&gt; 	&lt;strong&gt;&lt;?php echo $this-&gt;message; ?&gt;&lt;/strong&gt; 	&lt;?php echo $this-&gt;render('livre/_form.phtml'); ?&gt; 	&lt;/div&gt; &lt;?php echo $this-&gt;render('footer.phtml'); ?&gt;</pre>
<p>La page d&#8217;ajout des messages.</p>
<p><strong>_form.phtml</strong></p>
<pre> &lt;form method="post" action="&lt;?php echo $this-&gt;baseUrl ?&gt;/livre/&lt;?php echo $this-&gt;action; ?&gt;" name="form_nom"&gt; 	&lt;div id="livre_haut"&gt; 		&lt;input type="text" name="nom" value="&lt;?php echo $this-&gt;escape(trim($this-&gt;livre-&gt;nom)); ?&gt;"&gt; 		&amp;nbsp;&amp;bull;&amp;nbsp; 		&lt;input type="text" name="site" value="&lt;?php echo $this-&gt;escape($this-&gt;livre-&gt;site);?&gt;"&gt; 		&lt;br /&gt; 		&lt;textarea name="message" cols="50" rows="5"&gt;&lt;?php echo $this-&gt;escape($this-&gt;livre-&gt;message); ?&gt;&lt;/textarea&gt; 		&lt;br /&gt; 		&lt;button type="submit" name="add"&gt;Poster&lt;/button&gt; 	&lt;/div&gt; &lt;/form&gt; &lt;br /&gt; &lt;br /&gt;</pre>
<p>Le formulaire d&#8217;ajout et de modification (noté le <q>_</q> devant le nom permettant d&#8217;avoir un <q>template/gabarit privé</q>.</p>
<p>En principe vous êtes maitenant capable d&#8217;ajouter des messages et de les afficher!</p>
<p><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F63&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20quatri%C3%A8me%20%C3%A9tapes%20%3A%20Affichages%20et%20ajout%20de%20messages" title="Delicious" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F63&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20quatri%C3%A8me%20%C3%A9tapes%20%3A%20Affichages%20et%20ajout%20de%20messages" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F63&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20quatri%C3%A8me%20%C3%A9tapes%20%3A%20Affichages%20et%20ajout%20de%20messages" title="Twitter" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F63&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20quatri%C3%A8me%20%C3%A9tapes%20%3A%20Affichages%20et%20ajout%20de%20messages" title="Facebook" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_google_bookmarks" href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F63&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20quatri%C3%A8me%20%C3%A9tapes%20%3A%20Affichages%20et%20ajout%20de%20messages" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a><a class="a2a_button_netvibes_share" href="http://www.addtoany.com/add_to/netvibes_share?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F63&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20quatri%C3%A8me%20%C3%A9tapes%20%3A%20Affichages%20et%20ajout%20de%20messages" title="Netvibes Share" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/netvibes.png" width="16" height="16" alt="Netvibes Share"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgrummfy.be%2Fblog%2F63&amp;title=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20quatri%C3%A8me%20%C3%A9tapes%20%3A%20Affichages%20et%20ajout%20de%20messages" id="wpa2a_12"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://grummfy.be/blog/63/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Framework (ZF) : un livre d&#8217;or, troisième étapes : Bases des fichiers</title>
		<link>http://grummfy.be/blog/60#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://grummfy.be/blog/60#comments</comments>
		<pubDate>Fri, 03 Aug 2007 00:30:00 +0000</pubDate>
		<dc:creator>Grummfy</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[jouons]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programmation]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[tutoriel]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[ZF]]></category>

		<guid isPermaLink="false">http://grummfy.be/blog/?p=60</guid>
		<description><![CDATA[Créations d&#8217;un livre d&#8217;or en 6 étapes Définition Créations des tables sql et des répertoires Bases des fichiers Affichages et ajout de messages Modification et suppression des messages Conclusions Bases des fichiers Avant tout, il nous faut créer les différents fichier .htaccess RewriteEngine on #RewriteBase /serveur/mon_repertoire/ RewriteRule .* index.php php_flag magic_quotes_gpc off php_flag register_globals off [...]]]></description>
			<content:encoded><![CDATA[<h2>Créations d&#8217;un livre d&#8217;or en 6 étapes</h2>
<ol>
<li><a href="?p=58#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Définition</a></li>
<li><a href="?p=59#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Créations des tables sql et des répertoires</a></li>
<li><a href="?p=60#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Bases des fichiers</a></li>
<li><a href="?p=63#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Affichages et ajout de messages</a></li>
<li><a href="?p=64#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Modification et suppression des messages</a></li>
<li><a href="?p=65#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Conclusions</a></li>
</ol>
<h3>Bases des fichiers</h3>
<p>Avant tout, il nous faut créer les différents fichier <strong>.htaccess</strong></p>
<pre> RewriteEngine on #RewriteBase /serveur/mon_repertoire/ RewriteRule .* index.php php_flag magic_quotes_gpc off php_flag register_globals off</pre>
<p>La ligne en commentaire, permet dans le cas d&#8217;une erreur de ce type : <q>Fatal error: Uncaught exception &#8216;Zend_Controller_Dispatcher_Exception&#8217; with message &#8216;Invalid controller specified (serveur)&#8217; in</q> de corriger le problème, pour un accès, par exemple, via : http://localhost/serveur/mon_repertoire/</p>
<p><strong>LivreControllers.php</strong></p>
<pre> &lt;?php /** Zend_Controller_Action */ require_once 'Zend/Controller/Action.php'; class LivreController extends Zend_Controller_Action { 	public function indexAction() 	{ 		echo 'Index du livre d\'or'; 		return; 	} 	public function ajouterAction() 	{ 		$this-&gt;view-&gt;title .= ' .: Ajout d\'un message'; 		echo 'ajout d\'un message!'; 		return; 	} }</pre>
<p>Le controlleur, c&#8217;est ce qui va diriger notre application</p>
<p><strong>index.php</strong></p>
<pre> &lt;?php error_reporting(E_ALL|E_STRICT); date_default_timezone_set('Europe/Brussels'); set_include_path('.' . PATH_SEPARATOR . '../site/lib' . PATH_SEPARATOR . './app/models/'  . PATH_SEPARATOR . get_include_path()); include 'Zend/Loader.php'; Zend_Loader::loadClass('Zend_Controller_Front'); Zend_Loader::loadClass('Zend_Config_Ini'); Zend_Loader::loadClass('Zend_Registry'); Zend_Loader::loadClass('Zend_Db'); // load configuration $config = new Zend_Config_Ini('./app/config.ini', 'general'); $registry = Zend_Registry::getInstance(); $registry-&gt;set('config', $config); // setup database $db = Zend_Db::factory($config-&gt;db-&gt;adapter,  $config-&gt;db-&gt;config-&gt;toArray()); Zend_Db_Table::setDefaultAdapter($db); // Régler le dossier des contrôleurs par défaut : $frontController = Zend_Controller_Front::getInstance(); $frontController-&gt;throwExceptions(true); $frontController-&gt;setControllerDirectory('./app/controllers'); // run! $frontController-&gt;dispatch();</pre>
<p><strong>Livre.php</strong></p>
<pre> &lt;?php Zend_Loader::loadClass('Zend_Db_Table'); class Livre extends Zend_Db_Table {     protected $_name = 'livre';     protected $_primary = 'id'; 	public function insertObject($object) 	{ 		return parent::insert((array) $object); 	} 	public function updateObject($object, $where) 	{ 		return $this-&gt;update((array) $object, $where); 	} }</pre>
<p>Le modèle du livre, c&#8217;est-à-dire les données -&gt; ici la base des données.</p>
<p><strong>Date.php</strong></p>
<pre> &lt;?php class MyWsp_View_Helper_Date { 	/** 	 * Retourne une date sous forme d'une chaîne, au format donné par le 	 * paramètre format, fournie par le paramètre timestamp ou la date et 	 * l'heure courantes si aucun timestamp n'est fourni. En d'autres termes, 	 * le paramètre timestamp est optionnel et vaut par défaut la valeur de la 	 * fonction time(). 	 * Plus d'info sur http://www.php.net/manual/fr/function.date.php 	 * 	 * @param string $format format de la date 	 * @param int $timestampdate à formaté 	 * 	 * @return string 	 */ 	public function date($format, $timestamp = null) 	{ 		if (!is_nan($timestamp)) 			$timestamp = time(); 		// see http://www.php.net/manual/fr/function.strftime.php 		$dates = array( 			'DDDD'	=&gt; '%A', 			'DDD'	=&gt; '%a', 			'DD'	=&gt; '%d', 			'D'		=&gt; '%e', 			'MMMM'	=&gt; '%B', 			'MMM'	=&gt; '%b', 			'MM'	=&gt; '%m', 			'YYYY'	=&gt; '%Y', 			'YY'	=&gt; '%y', 			'HH'	=&gt; '%H', 			'hh'	=&gt; '%I', 			'mm'	=&gt; '%M', 			'ss'	=&gt; '%S', 		); 		return strftime(str_replace(array_keys($dates), array_values($dates), $format), $timestamp); 	} }</pre>
<p><strong>config.ini</strong></p>
<pre> [general] db.adapter = PDO_MYSQL db.config.host = localhost db.config.username = root db.config.password = db.config.dbname = livredor</pre>
<p>Contient la configuration pour accéder à la base de donnée du livre d&#8217;or.</p>
<h4>Test</h4>
<p>Rendez-vous à l&#8217;adresse de votre script :</p>
<ul>
<li>Lire les messages : http://localhost/serveur/mon_repertoire/livre/</li>
<li>Ajouter un message : http://localhost/serveur/mon_repertoire/livre/ajouter/</li>
</ul>
<p>Si tout est ok, passons à la suite!</p>
<p><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F60&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20troisi%C3%A8me%20%C3%A9tapes%20%3A%20Bases%20des%20fichiers" title="Delicious" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F60&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20troisi%C3%A8me%20%C3%A9tapes%20%3A%20Bases%20des%20fichiers" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F60&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20troisi%C3%A8me%20%C3%A9tapes%20%3A%20Bases%20des%20fichiers" title="Twitter" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F60&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20troisi%C3%A8me%20%C3%A9tapes%20%3A%20Bases%20des%20fichiers" title="Facebook" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_google_bookmarks" href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F60&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20troisi%C3%A8me%20%C3%A9tapes%20%3A%20Bases%20des%20fichiers" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a><a class="a2a_button_netvibes_share" href="http://www.addtoany.com/add_to/netvibes_share?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F60&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20troisi%C3%A8me%20%C3%A9tapes%20%3A%20Bases%20des%20fichiers" title="Netvibes Share" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/netvibes.png" width="16" height="16" alt="Netvibes Share"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgrummfy.be%2Fblog%2F60&amp;title=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20troisi%C3%A8me%20%C3%A9tapes%20%3A%20Bases%20des%20fichiers" id="wpa2a_14"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://grummfy.be/blog/60/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Zend Framework (ZF) : un livre d&#8217;or, deuxième étapes : Créations des tables sql et répertoires</title>
		<link>http://grummfy.be/blog/59#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://grummfy.be/blog/59#comments</comments>
		<pubDate>Thu, 02 Aug 2007 03:02:00 +0000</pubDate>
		<dc:creator>Grummfy</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[jouons]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programmation]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[tutoriel]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[ZF]]></category>

		<guid isPermaLink="false">http://grummfy.be/blog/?p=59</guid>
		<description><![CDATA[Créations d&#8217;un livre d&#8217;or en 6 étapes Définition Créations des tables sql et des répertoires Bases des fichiers Affichages et ajout de messages Modification et suppression des messages Conclusions Créations des tables sql Créer une nouvelle base de donnée dans votre serveur mysql. Ensuite exécuter la requête suivante : CREATE TABLE `livre` ( `id` int(10) unsigned [...]]]></description>
			<content:encoded><![CDATA[<h2>Créations d&#8217;un livre d&#8217;or en 6 étapes</h2>
<ol>
<li><a href="?p=58#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Définition</a></li>
<li><a href="?p=59#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Créations des tables sql et des répertoires</a></li>
<li><a href="?p=60#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Bases des fichiers</a></li>
<li><a href="?p=63#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Affichages et ajout de messages</a></li>
<li><a href="?p=64#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Modification et suppression des messages</a></li>
<li><a href="?p=65#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Conclusions</a></li>
</ol>
<h3>Créations des tables sql</h3>
<p>Créer une nouvelle base de donnée dans votre serveur mysql. Ensuite exécuter la requête suivante :</p>
<p>CREATE TABLE `livre` (</p>
<pre> `id` int(10) unsigned NOT NULL auto_increment,  `date` int(10) unsigned NOT NULL,  `message` text character set utf8 collate utf8_unicode_ci NOT NULL,  `nom` varchar(60) character set utf8 collate utf8_unicode_ci NOT NULL,  PRIMARY KEY  (`id`),  KEY `inde` (`date`)</pre>
<p>);</p>
<p>La structure de la table correspond donc a ceci :</p>
<table>
<thead>
<tr>
<th>Champ</th>
<th>Type</th>
<th>Défaut</th>
<th>Extra</th>
</tr>
</thead>
<tbody>
<tr>
<th>id</th>
<td>int(10)</td>
<td></td>
<td>auto_increment</td>
</tr>
<tr>
<th>date</th>
<td>int(10)</td>
<td></td>
<td></td>
</tr>
<tr>
<th>message</th>
<td>text</td>
<td></td>
<td></td>
</tr>
<tr>
<th>nom</th>
<td>varchar(60)</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<p>Très simple et rien de compliquer jusque là, enfin normalement.</p>
<h3>Structure du script</h3>
<p>Les répertoires d&#8217;abords :</p>
<pre> /site     /lib         /Zend --&gt; ici le zend framework /test     /app         /controllers         /models         /views             /scripts                 /livre</pre>
<p>Et avec les fichiers :</p>
<pre> /app     /controllers         LivreControllers.php     /models        Livre.php     /views         /helpers         /scripts             header.phtml             footer.phtml             /livre                 livre.phtml                 ajouter.phtml     config.ini index.php .htaccess</pre>
<h5>Pourquoi une tel disposition?</h5>
<p>En fait, ZF va chercher de manière automatique grâce, notamment, au ViewHelper où se trouve les différent fichiers et les charger automatiquement! Zf utilisé le système <a href="http://fr.wikipedia.org/wiki/MVC">MVC</a>, c&#8217;est-à-dire modèle-vue-contrôleur!</p>
<ul>
<li>Contrôleur : Lien entre la vue et le modèle, réagit au requête de l&#8217;utilisateurs, etc</li>
<li>Vue : ce que voix l&#8217;utilisateur, souvent le système de templates, donc c&#8217;est la présentation des données!</li>
<li>Modèle : accès aux données, en gros accès à la base des données, au fichiers, etc</li>
</ul>
<p>Cependant divers dossiers peuvent se trouver à d&#8217;autres emplacement, mais ici on fait dans le simple!</p>
<p>Pensez à utiliser <a href="/blog/index.php?post/2007/08/01/Creation-de-repertoire-automatique-en-php-via-une-structure-txt#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">mon script</a> pour avoir plus facile &#8230;</p>
<p><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F59&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20deuxi%C3%A8me%20%C3%A9tapes%20%3A%20Cr%C3%A9ations%20des%20tables%20sql%20et%20r%C3%A9pertoires" title="Delicious" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F59&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20deuxi%C3%A8me%20%C3%A9tapes%20%3A%20Cr%C3%A9ations%20des%20tables%20sql%20et%20r%C3%A9pertoires" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F59&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20deuxi%C3%A8me%20%C3%A9tapes%20%3A%20Cr%C3%A9ations%20des%20tables%20sql%20et%20r%C3%A9pertoires" title="Twitter" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F59&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20deuxi%C3%A8me%20%C3%A9tapes%20%3A%20Cr%C3%A9ations%20des%20tables%20sql%20et%20r%C3%A9pertoires" title="Facebook" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_google_bookmarks" href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F59&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20deuxi%C3%A8me%20%C3%A9tapes%20%3A%20Cr%C3%A9ations%20des%20tables%20sql%20et%20r%C3%A9pertoires" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a><a class="a2a_button_netvibes_share" href="http://www.addtoany.com/add_to/netvibes_share?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F59&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20deuxi%C3%A8me%20%C3%A9tapes%20%3A%20Cr%C3%A9ations%20des%20tables%20sql%20et%20r%C3%A9pertoires" title="Netvibes Share" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/netvibes.png" width="16" height="16" alt="Netvibes Share"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgrummfy.be%2Fblog%2F59&amp;title=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20deuxi%C3%A8me%20%C3%A9tapes%20%3A%20Cr%C3%A9ations%20des%20tables%20sql%20et%20r%C3%A9pertoires" id="wpa2a_16"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://grummfy.be/blog/59/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Framework (ZF) : un livre d&#8217;or, première étapes : définition</title>
		<link>http://grummfy.be/blog/58#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://grummfy.be/blog/58#comments</comments>
		<pubDate>Thu, 02 Aug 2007 02:52:00 +0000</pubDate>
		<dc:creator>Grummfy</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[jouons]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programmation]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[tutoriel]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[ZF]]></category>

		<guid isPermaLink="false">http://grummfy.be/blog/?p=58</guid>
		<description><![CDATA[Créations d&#8217;un livre d&#8217;or en 6 étapes Définition Créations des tables sql et des répertoires Bases des fichiers Affichages et ajout de messages Modification et suppression des messages Conclusions Définition des besoins Pour faire un livre d&#8217;or très basique : Ajout de message Affichage de messages Modération : modification et suppression des messages Par après on peux [...]]]></description>
			<content:encoded><![CDATA[<h2>Créations d&#8217;un livre d&#8217;or en 6 étapes</h2>
<ol>
<li><a href="?p=58#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Définition</a></li>
<li><a href="?p=59#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Créations des tables sql et des répertoires</a></li>
<li><a href="?p=60#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Bases des fichiers</a></li>
<li><a href="?p=63#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Affichages et ajout de messages</a></li>
<li><a href="?p=64#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Modification et suppression des messages</a></li>
<li><a href="?p=65#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Conclusions</a></li>
</ol>
<h3>Définition des besoins</h3>
<p>Pour faire un livre d&#8217;or très basique :</p>
<ul>
<li>Ajout de message</li>
<li>Affichage de messages</li>
<li>Modération : modification et suppression des messages</li>
</ul>
<p>Par après on peux ajouter différents éléments :</p>
<ul>
<li>Smileys</li>
<li>Site-web et email des auteurs</li>
<li>Et des trucs plus fun : cache, css, &#8230;</li>
</ul>
<p><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F58&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20premi%C3%A8re%20%C3%A9tapes%20%3A%20d%C3%A9finition" title="Delicious" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F58&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20premi%C3%A8re%20%C3%A9tapes%20%3A%20d%C3%A9finition" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F58&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20premi%C3%A8re%20%C3%A9tapes%20%3A%20d%C3%A9finition" title="Twitter" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F58&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20premi%C3%A8re%20%C3%A9tapes%20%3A%20d%C3%A9finition" title="Facebook" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_google_bookmarks" href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F58&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20premi%C3%A8re%20%C3%A9tapes%20%3A%20d%C3%A9finition" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a><a class="a2a_button_netvibes_share" href="http://www.addtoany.com/add_to/netvibes_share?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F58&amp;linkname=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20premi%C3%A8re%20%C3%A9tapes%20%3A%20d%C3%A9finition" title="Netvibes Share" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/netvibes.png" width="16" height="16" alt="Netvibes Share"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgrummfy.be%2Fblog%2F58&amp;title=Zend%20Framework%20%28ZF%29%20%3A%20un%20livre%20d%26%238217%3Bor%2C%20premi%C3%A8re%20%C3%A9tapes%20%3A%20d%C3%A9finition" id="wpa2a_18"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://grummfy.be/blog/58/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Au début il n&#8217;y avait rien, et puis ce fut terminer!</title>
		<link>http://grummfy.be/blog/50#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://grummfy.be/blog/50#comments</comments>
		<pubDate>Tue, 10 Jul 2007 02:46:00 +0000</pubDate>
		<dc:creator>Grummfy</dc:creator>
				<category><![CDATA[My comment]]></category>
		<category><![CDATA[délire]]></category>
		<category><![CDATA[dessin]]></category>
		<category><![CDATA[étrange]]></category>
		<category><![CDATA[jouons]]></category>
		<category><![CDATA[sbé]]></category>
		<category><![CDATA[The Gimp]]></category>

		<guid isPermaLink="false">http://grummfy.be/blog/?p=50</guid>
		<description><![CDATA[Au début il n&#8217;y avait rien, Après fut l&#8217;envie, La recherche du crayon perdu fut, La feuille fut trouvée. Au début il n&#8217;y avait rien, Le crayon traça, La mains s&#8217;agita, et l&#8217;esquisse s&#8217;installa. Au début il n&#8217;y avait rien, Puis le scan fut, Les filtres furents, Les couleurs aggissèrent, D&#8217;autres filtres se joignirent, Et [...]]]></description>
			<content:encoded><![CDATA[<p>Au début il n&#8217;y avait rien,<br />
Après fut l&#8217;envie,<br />
La recherche du crayon perdu fut,<br />
La feuille fut trouvée.</p>
<p>Au début il n&#8217;y avait rien,<br />
Le crayon traça,<br />
La mains s&#8217;agita,<br />
et l&#8217;esquisse s&#8217;installa.</p>
<p>Au début il n&#8217;y avait rien,<br />
<a href="/blog/media/dessin-the-gimp/0.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img src="/blog/media/dessin-the-gimp/mini/0.png" alt="0.png" /></a><br />
Puis le scan fut,<br />
<a href="/blog/media/dessin-the-gimp/1.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img src="/blog/media/dessin-the-gimp/mini/1.png" alt="1.png" /></a><br />
Les filtres furents,<br />
<a href="/blog/media/dessin-the-gimp/3.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img src="/blog/media/dessin-the-gimp/mini/3.png" alt="3.png" /></a><br />
Les couleurs aggissèrent,<br />
<a href="/blog/media/dessin-the-gimp/7.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img src="/blog/media/dessin-the-gimp/mini/7.png" alt="7.png" /></a><br />
D&#8217;autres filtres se joignirent,<br />
<a href="/blog/media/dessin-the-gimp/10.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img src="/blog/media/dessin-the-gimp/mini/10.png" alt="10.png" /></a><br />
Et ce fut terminer!<br />
<a href="/blog/media/dessin-the-gimp/12.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img src="/blog/media/dessin-the-gimp/mini/12.png" alt="12.png" /></a></p>
<p>Ayant envie de crayonner, hier soir j&#8217;ai fait un rapide croquis d&#8217;un truc.<br />
Aujourd&#8217;hui, je me suis dit mais pourquoi ne pas faire joujou avec <a href="http://fr.wikipedia.org/wiki/GIMP">The Gimp</a><br />
C&#8217;est ce que j&#8217;ai fait, en voici les étapes (cliquer pour agrandir)&nbsp;:</p>
<ul>
<li><a href="/blog/media/dessin-the-gimp/0.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img src="/blog/media/dessin-the-gimp/mini/0.png" alt="0.png" /></a></li>
<li><a href="/blog/media/dessin-the-gimp/1.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img src="/blog/media/dessin-the-gimp/mini/1.png" alt="1.png" /></a></li>
<li><a href="/blog/media/dessin-the-gimp/2.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img src="/blog/media/dessin-the-gimp/mini/2.png" alt="2.png" /></a></li>
<li><a href="/blog/media/dessin-the-gimp/3.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img src="/blog/media/dessin-the-gimp/mini/3.png" alt="3.png" /></a></li>
<li><a href="/blog/media/dessin-the-gimp/4.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img src="/blog/media/dessin-the-gimp/mini/4.png" alt="4.png" /></a></li>
<li><a href="/blog/media/dessin-the-gimp/5.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img src="/blog/media/dessin-the-gimp/mini/5.png" alt="5.png" /></a></li>
<li><a href="/blog/media/dessin-the-gimp/6.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img src="/blog/media/dessin-the-gimp/mini/6.png" alt="6.png" /></a></li>
<li><a href="/blog/media/dessin-the-gimp/7.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img src="/blog/media/dessin-the-gimp/mini/7.png" alt="7.png" /></a></li>
<li><a href="/blog/media/dessin-the-gimp/8.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img src="/blog/media/dessin-the-gimp/mini/8.png" alt="8.png" /></a></li>
<li><a href="/blog/media/dessin-the-gimp/9.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img src="/blog/media/dessin-the-gimp/mini/9.png" alt="9.png" /></a></li>
<li><a href="/blog/media/dessin-the-gimp/10.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img src="/blog/media/dessin-the-gimp/mini/10.png" alt="10.png" /></a></li>
<li><a href="/blog/media/dessin-the-gimp/11.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img src="/blog/media/dessin-the-gimp/mini/11.png" alt="11.png" /></a></li>
<li><a href="/blog/media/dessin-the-gimp/12.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img src="/blog/media/dessin-the-gimp/mini/12.png" alt="12.png" /></a></li>
</ul>
<p>Chaque étapes est l&#8217;ajout d&#8217;un calque ou d&#8217;un filtre.<br />
j&#8217;ai fait le trucs à la barbares, sans but artistiques, juste faire joujou&#8230;.</p>
<p><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F50&amp;linkname=Au%20d%C3%A9but%20il%20n%26%238217%3By%20avait%20rien%2C%20et%20puis%20ce%20fut%20terminer%21" title="Delicious" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F50&amp;linkname=Au%20d%C3%A9but%20il%20n%26%238217%3By%20avait%20rien%2C%20et%20puis%20ce%20fut%20terminer%21" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F50&amp;linkname=Au%20d%C3%A9but%20il%20n%26%238217%3By%20avait%20rien%2C%20et%20puis%20ce%20fut%20terminer%21" title="Twitter" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F50&amp;linkname=Au%20d%C3%A9but%20il%20n%26%238217%3By%20avait%20rien%2C%20et%20puis%20ce%20fut%20terminer%21" title="Facebook" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_google_bookmarks" href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F50&amp;linkname=Au%20d%C3%A9but%20il%20n%26%238217%3By%20avait%20rien%2C%20et%20puis%20ce%20fut%20terminer%21" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a><a class="a2a_button_netvibes_share" href="http://www.addtoany.com/add_to/netvibes_share?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F50&amp;linkname=Au%20d%C3%A9but%20il%20n%26%238217%3By%20avait%20rien%2C%20et%20puis%20ce%20fut%20terminer%21" title="Netvibes Share" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/netvibes.png" width="16" height="16" alt="Netvibes Share"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgrummfy.be%2Fblog%2F50&amp;title=Au%20d%C3%A9but%20il%20n%26%238217%3By%20avait%20rien%2C%20et%20puis%20ce%20fut%20terminer%21" id="wpa2a_20"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://grummfy.be/blog/50/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>mingle2.com ou le truc a sondage qui servent a rien &#8230;.</title>
		<link>http://grummfy.be/blog/48#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://grummfy.be/blog/48#comments</comments>
		<pubDate>Tue, 03 Jul 2007 01:18:00 +0000</pubDate>
		<dc:creator>Grummfy</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[découverte]]></category>
		<category><![CDATA[délire]]></category>
		<category><![CDATA[étrange]]></category>
		<category><![CDATA[jouons]]></category>
		<category><![CDATA[santé]]></category>
		<category><![CDATA[sbé]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://grummfy.be/blog/?p=48</guid>
		<description><![CDATA[<p>mingle2.com ou le truc a sondage qui servent a rien ....</p> <p>j'y ai répondu, je vous met donc les réponses ....</p>]]></description>
			<content:encoded><![CDATA[<p>mingle2.com ou le truc a sondage qui servent a rien &#8230;.</p>
<p>j&#8217;y ai répondu, je vous met donc les réponses &#8230;.</p>
<p><span id="more-48"></span><br />
<a href="http://mingle2.com/blog-addiction" style="color: #D64B32; text-decoration: none; display: block; width: 286px; height: 128px; padding-top: 50px; padding-left: 17px; background: url(http://mingle2.com/img/bb/blog_addiction/badge.jpg) no-repeat; font-family: Times New Roman, sans-serif; font-size: 30px;">84%<span style="display: none;">How Addicted to Blogging Are You?</span></a>
<p style="text-align: center;">Mingle<sup>2</sup></p>
<p>
<a href="http://mingle2.com/blog-rating"><img style="border: none;" src="http://mingle2.com/img/bb/blog_rating/g.jpg" alt="Free Online Dating" /></a>
<p>Mingle<sup>2</sup></p>
<p><a href="http://mingle2.com/cadaver-calculator" style="color: #fff; text-decoration: none; display: block; width: 395px; height: 184px; padding-top: 121px; background: url(http://mingle2.com/img/bb/body_worth/badge.jpg) no-repeat; font-family: Arial, sans-serif; font-size: 24px; text-align: center;"><strong style="font-weight: normal;">$4640.00</strong><span style="display: none;">The Cadaver Calculator &#8211; Find out how much your body is worth</span></a>
<p style="text-align: center;">Mingle<sup>2</sup></p>
<p>
<a href="http://mingle2.com/geek-quiz" style="text-decoration: none; background: url('http://mingle2.com/css/img/quiz/badge1_orange.jpg') no-repeat; display: block; width: 268px; height: 82px;"><span style="display: block; padding-left: 125px; padding-top: 28px; color: #000; font-family: Arial; font-size: 22px;">57% Geek</span></a>Mingle<sup>2</sup> </p>
<p><a id="mingle2_badge" href="http://mingle2.com/html-elements-quiz" style="display: block; background:url(http://mingle2.com/css/img/badges/html_elements.jpg) no-repeat top left; height: 147px; width: 335px; text-decoration: none; color: #fff;"><em style="display: none;"><strong>Mingle<sup>2</sup> &#8211; Free Online Dating</strong></em><strong id="mingle2_badge_score" style="display: block; padding-left: 125px; padding-top: 44px; font-weight: normal; font-family: Times New Roman, Arial; font-size: 45px;">65</strong></a> </p>
<p>
<a id="mingle2_badge" href="http://mingle2.com/css-quiz" style="display: block; background: url(http://mingle2.com/css/img/badges/css_properties.jpg) no-repeat top left; height: 93px;  width: 335px; text-decoration: none; color: #fff;"><em style="display: none;">Free Online Dating</em><strong id="mingle2_badge_score" style="display: block; padding-left: 123px; padding-top: 20px;  font-weight: normal; font-family: Times New Roman, Arial; font-size: 20px;">62</strong></a>
<div style="width: 335px; text-align: center; font-size: 11px;"></div>
<p></p>
<p>plus de truc débile&nbsp;: <a href="http://mingle2.com/bb" title="http://mingle2.com/bb">http://mingle2.com/bb</a></p>
]]></content:encoded>
			<wfw:commentRss>http://grummfy.be/blog/48/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Enregistrer son écran sous GNU/Linux</title>
		<link>http://grummfy.be/blog/47#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://grummfy.be/blog/47#comments</comments>
		<pubDate>Sun, 01 Jul 2007 17:15:00 +0000</pubDate>
		<dc:creator>Grummfy</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[découverte]]></category>
		<category><![CDATA[FSB]]></category>
		<category><![CDATA[GNU|Linux]]></category>
		<category><![CDATA[jouons]]></category>
		<category><![CDATA[MyWsp]]></category>
		<category><![CDATA[Projet]]></category>
		<category><![CDATA[trucs et astuces]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://grummfy.be/blog/?p=47</guid>
		<description><![CDATA[Lors de la création de de tuto vidéo il est très intéressant de pouvoir enregistrer son écran et ainsi permettre une compréhension plus élevée de ce qu&#8217;explique le dit tuto. Ainsi, cherchant a m&#8217;entrainer à faire quelques tuto pour MyWsp, je me suis dit mais pourquoi pas en faire pour FSB. J&#8217;ai donc réfléchi a [...]]]></description>
			<content:encoded><![CDATA[<p>Lors de la création de de tuto vidéo il est très intéressant de pouvoir enregistrer son écran et ainsi permettre une compréhension plus élevée de ce qu&#8217;explique le dit tuto.</p>
<p>Ainsi, cherchant a m&#8217;entrainer à faire quelques tuto pour <a href="/blog/index.php?tag/MyWsp#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><acronym title="My Web Site Plugins">MyWsp</acronym></a>, je me suis dit mais pourquoi pas en faire pour <acronym title="Fire Soft Board">FSB</acronym>.</p>
<p>J&#8217;ai donc réfléchi a comment faire les meilleurs video, et me suis dit la capture d&#8217;écran est encore le plus simple.<br />
Donc, comment faire. Faire des recherches, je connais deux trois logiciel mais sans plus. Et hop grâce à Google je tombe sur ceci&nbsp;: <a href="http://www.coagul.org/article.php3?id_article=611">petit description de logiciel de capture video</a></p>
<p>Bref génial, je vous laisse lire l&#8217;article. Moi je compte utiliser xvidcap.</p>
<p>Repasser via Kino et Audacity pour remettre le tout ensemble (son, video, texte).</p>
<p>Je dirait une dernière choses, pensez aussi que si vous utiliser un texte en sous-titre cela permet d&#8217;être traduit plus facilement&#8230; (et permet aussi au sourd de comprendre ce que vous faites &#8230;.)</p>
<p><strong>Edit</strong> :<br />
j&#8217;en profite pour rajouter ceci&nbsp;: <a href="http://www.funix.org/fr/linux/main-linux.php?ref=montage&amp;page=full" title="http://www.funix.org/fr/linux/main-linux.php?ref=montage&amp;page=full">http://www.funix.org/fr/linux/main-&#8230;</a><br />
et le site de funix en général&nbsp;: <a href="http://www.funix.org/" title="http://www.funix.org/">http://www.funix.org/</a> qui contient pas mal de truc intéressant</p>
<p>et surtout <a href="http://www.lprod.org">Lprod</a> tout sous la production sous linux!</p>
<p><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F47&amp;linkname=Enregistrer%20son%20%C3%A9cran%20sous%20GNU%2FLinux" title="Delicious" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F47&amp;linkname=Enregistrer%20son%20%C3%A9cran%20sous%20GNU%2FLinux" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F47&amp;linkname=Enregistrer%20son%20%C3%A9cran%20sous%20GNU%2FLinux" title="Twitter" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F47&amp;linkname=Enregistrer%20son%20%C3%A9cran%20sous%20GNU%2FLinux" title="Facebook" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_google_bookmarks" href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F47&amp;linkname=Enregistrer%20son%20%C3%A9cran%20sous%20GNU%2FLinux" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a><a class="a2a_button_netvibes_share" href="http://www.addtoany.com/add_to/netvibes_share?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F47&amp;linkname=Enregistrer%20son%20%C3%A9cran%20sous%20GNU%2FLinux" title="Netvibes Share" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/netvibes.png" width="16" height="16" alt="Netvibes Share"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgrummfy.be%2Fblog%2F47&amp;title=Enregistrer%20son%20%C3%A9cran%20sous%20GNU%2FLinux" id="wpa2a_22"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://grummfy.be/blog/47/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>De l&#8217;humour des informaticiens &#8230;</title>
		<link>http://grummfy.be/blog/26#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://grummfy.be/blog/26#comments</comments>
		<pubDate>Sun, 29 Apr 2007 23:04:00 +0000</pubDate>
		<dc:creator>Grummfy</dc:creator>
				<category><![CDATA[My comment]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[découverte]]></category>
		<category><![CDATA[GNU|Linux]]></category>
		<category><![CDATA[jouons]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://grummfy.be/blog/?p=26</guid>
		<description><![CDATA[Qui a dit que les informaticiens, surtout les programmeurs, n&#8217;avais pas d&#8217;humour? Je pense que après la lecture et l&#8217;utilisation de tagada, on ne peux plus que rigoler! Imaginez un monde ou, vous prenez plaisir a taper vos commande, hop tagadada tsoin tsoin xchat et hop xchat est installer, C&#8217;est plus sympa que apt-get install [...]]]></description>
			<content:encoded><![CDATA[<p>Qui a dit que les informaticiens, surtout les programmeurs, n&#8217;avais pas d&#8217;humour?</p>
<p>Je pense que après la lecture et l&#8217;utilisation de <em>tagada</em>, on ne peux plus que rigoler!</p>
<p>Imaginez un monde ou, vous prenez plaisir a taper vos commande, hop <em>tagadada tsoin tsoin xchat</em> et hop xchat est installer,<br />
C&#8217;est plus sympa que <em>apt-get install xchat</em>, non?</p>
<h3>Les commandes&nbsp;:</h3>
<p>D&#8217;après xbrigh&nbsp;:</p>
<blockquote><p><strong>plop</strong>&nbsp;: met à jour la liste des paquets<br />
<strong>pouet</strong>&nbsp;: télécharge et installe les mises à jour<br />
<strong>gropouet</strong>&nbsp;: télécharge et installe les mises à jour de la distribution<br />
<strong>padechichi</strong>&nbsp;: met à jour la liste des paquets puis télécharge et installe les mises à jour</p>
<p> <strong>osekour</strong>&nbsp;: donne l&#8217;aide et la liste des commandes<br />
<strong>kiélkon</strong>&nbsp;: donne les informations de droits d&#8217;auteurs</p>
<p> <strong>pabo</strong>&nbsp;: supprime un logiciel<br />
<strong>trépabo</strong>&nbsp;: supprime un logiciel en effaçant toutes les traces possibles</p>
<p> <strong>konépa</strong>&nbsp;: cherche un logiciel dans la liste<br />
<strong>kicésa</strong>&nbsp;: affiche des informations sur le logiciel<br />
<strong>kékive</strong>&nbsp;: affiche la liste des dépendances du logiciel</p>
<p> <strong>tsouin tsouin</strong>&nbsp;: installe le paquet</p>
</blockquote>
<p>Mais je vous conseil de parcourir le code du script, vous serez encore plus émerveillez <img src='http://grummfy.be/blog/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h3>Pour l&#8217;installer&nbsp;:</h3>
<p>Utiliser le paquet .deb dont l&#8217;adresse se trouve sur le <a href="http://xbright.codingteam.net/dotclear/index.php/post/2007/04/29/tagada-un-APT-GET-revisite-pour-tous-les-dingues-de-la-planete">[blog de xbright</a>]</p>
<p>Moi je dit merci pour cette touche d&#8217;humour!<br />
Il est vrai que dans les logiciel libre (plus que dans les proprio en tout cas), on remarque souvent des petites touches de-ci delà, mais rien d&#8217;aussi beau!</p>
<p><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F26&amp;linkname=De%20l%26%238217%3Bhumour%20des%20informaticiens%20%26%238230%3B" title="Delicious" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_technorati_favorites" href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F26&amp;linkname=De%20l%26%238217%3Bhumour%20des%20informaticiens%20%26%238230%3B" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F26&amp;linkname=De%20l%26%238217%3Bhumour%20des%20informaticiens%20%26%238230%3B" title="Twitter" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F26&amp;linkname=De%20l%26%238217%3Bhumour%20des%20informaticiens%20%26%238230%3B" title="Facebook" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_google_bookmarks" href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F26&amp;linkname=De%20l%26%238217%3Bhumour%20des%20informaticiens%20%26%238230%3B" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a><a class="a2a_button_netvibes_share" href="http://www.addtoany.com/add_to/netvibes_share?linkurl=http%3A%2F%2Fgrummfy.be%2Fblog%2F26&amp;linkname=De%20l%26%238217%3Bhumour%20des%20informaticiens%20%26%238230%3B" title="Netvibes Share" rel="nofollow" target="_blank"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/icons/netvibes.png" width="16" height="16" alt="Netvibes Share"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgrummfy.be%2Fblog%2F26&amp;title=De%20l%26%238217%3Bhumour%20des%20informaticiens%20%26%238230%3B" id="wpa2a_24"><img src="http://grummfy.be/blog/wp/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://grummfy.be/blog/26/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Css et (x)html découverte du multi-class</title>
		<link>http://grummfy.be/blog/23#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://grummfy.be/blog/23#comments</comments>
		<pubDate>Mon, 23 Apr 2007 16:53:00 +0000</pubDate>
		<dc:creator>Grummfy</dc:creator>
				<category><![CDATA[My comment]]></category>
		<category><![CDATA[découverte]]></category>
		<category><![CDATA[étrange]]></category>
		<category><![CDATA[jouons]]></category>
		<category><![CDATA[trucs et astuces]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://grummfy.be/blog/?p=23</guid>
		<description><![CDATA[<p>C'est étrange que malgré une certaine pratique, des choses simples peuvent encore étonné!<br />
J'ai découvert (suite à une erreur de manipulation) que l'on pouvait facilement mettre deux class css a un élément html!</p>]]></description>
			<content:encoded><![CDATA[<p>C&#8217;est étrange que malgré une certaine pratique, des choses simples peuvent encore étonné!<br />
J&#8217;ai découvert (suite à une erreur de manipulation) que l&#8217;on pouvait facilement mettre deux class css a un élément html!</p>
<p><span id="more-23"></span></p>
<h2>Comment cela se passe?</h2>
<pre> 	&lt;style&gt; 		.cls1 		{ 			font-size: 2em; 		} 		.cls2 		{ 			font-weight: bold; 		} 		.cls3 		{ 			border: 1px solid red; 		} 	&lt;/style&gt; 	&lt;div class=&quot;cls1&quot;&gt;test cls1&lt;/div&gt; 	&lt;div class=&quot;cls1 cls2&quot;&gt;test cls1 et cls2&lt;/div&gt; 	&lt;div class=&quot;cls1 cls2 cls3&quot;&gt;test cls1, cls2 et cls3&lt;/div&gt; </pre>
<p>ce qui va donner (attention ici  il y a aussi le style de la page qui s&#8217;applique mais c&#8217;est juste pour donner une idée!</p>
<style> 		.cls1 		{ 			font-size: 2em; 		} 		.cls2 		{ 			font-weight: bold; 		} 		.cls3 		{ 			border: 1px solid red; 		} 	</style>
<div class="cls1">test cls1</div>
<div class="cls1 cls2">test cls1 et cls2</div>
<div class="cls1 cls2 cls3">test cls1, cls2 et cls3</div>
<p>Cela ouvre énormément de possibilité, et cela semble valide donc &#8230;</p>
<p>Et pour ne rien gâcher cela fonctionne même sous ie!</p>
]]></content:encoded>
			<wfw:commentRss>http://grummfy.be/blog/23/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Jouons aves PHP et la poo</title>
		<link>http://grummfy.be/blog/15#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://grummfy.be/blog/15#comments</comments>
		<pubDate>Sun, 18 Mar 2007 23:22:00 +0000</pubDate>
		<dc:creator>Grummfy</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[jouons]]></category>
		<category><![CDATA[poo]]></category>
		<category><![CDATA[programmation]]></category>

		<guid isPermaLink="false">http://grummfy.be/blog/?p=15</guid>
		<description><![CDATA[<p>Amusons nous avec PHP4, et PHP5 en poo.<br /><br /> Comparons le comportement de ceci :</p> <pre class="code php"><span style="color: rgb(0, 0, 0); font-weight: bold;">class</span> A<br /><span style="color: rgb(102, 204, 102);">{</span><br />    <span style="color: rgb(0, 0, 0); font-weight: bold;">function</span> A<span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(102, 204, 102);">)</span><br />    <span style="color: rgb(102, 204, 102);">{</span></pre><br />]]></description>
			<content:encoded><![CDATA[<p>Amusons nous avec PHP4, et PHP5 en poo.</p>
<p> Comparons le comportement de ceci :</p>
<pre class="code php"><span style="color: rgb(0, 0, 0); font-weight: bold;">class</span> A<span style="color: rgb(102, 204, 102);">{</span>    <span style="color: rgb(0, 0, 0); font-weight: bold;">function</span> A<span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(102, 204, 102);">)</span>    <span style="color: rgb(102, 204, 102);">{</span></pre>
<p>
<span id="more-15"></span></p>
<pre class="code php">        <a href="http://www.php.net/echo"><span style="color: rgb(0, 0, 102);">echo</span></a> <span style="color: rgb(255, 0, 0);">'Je me nome A'</span> . <span style="color: rgb(255, 0, 0);">"<span style="color: rgb(0, 0, 153); font-weight: bold;"> </span>"</span>;    <span style="color: rgb(102, 204, 102);">}</span>

    <span style="color: rgb(0, 0, 0); font-weight: bold;">function</span> B<span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(102, 204, 102);">)</span>    <span style="color: rgb(102, 204, 102);">{</span>        <a href="http://www.php.net/echo"><span style="color: rgb(0, 0, 102);">echo</span></a> <span style="color: rgb(255, 0, 0);">'Je me nome B'</span> . <span style="color: rgb(255, 0, 0);">"<span style="color: rgb(0, 0, 153); font-weight: bold;"> </span>"</span>;    <span style="color: rgb(102, 204, 102);">}</span>

<span style="color: rgb(102, 204, 102);">}</span>&nbsp;<span style="color: rgb(0, 0, 0); font-weight: bold;">class</span> B <span style="color: rgb(0, 0, 0); font-weight: bold;">extends</span> A<span style="color: rgb(102, 204, 102);">{</span>    <span style="color: rgb(0, 0, 0); font-weight: bold;">function</span> C<span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(102, 204, 102);">)</span>    <span style="color: rgb(102, 204, 102);">{</span>        <a href="http://www.php.net/echo"><span style="color: rgb(0, 0, 102);">echo</span></a> <span style="color: rgb(255, 0, 0);">'Je me nome C'</span> . <span style="color: rgb(255, 0, 0);">"<span style="color: rgb(0, 0, 153); font-weight: bold;"> </span>"</span>;    <span style="color: rgb(102, 204, 102);">}</span><span style="color: rgb(102, 204, 102);">}</span>

<span style="color: rgb(0, 0, 0); font-weight: bold;">class</span> C <span style="color: rgb(0, 0, 0); font-weight: bold;">extends</span> B<span style="color: rgb(102, 204, 102);">{</span>&nbsp;<span style="color: rgb(102, 204, 102);">}</span>&nbsp;<span style="color: rgb(0, 0, 255);">$B</span> = <span style="color: rgb(0, 0, 0); font-weight: bold;">new</span> B<span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(102, 204, 102);">)</span>;<span style="color: rgb(0, 0, 255);">$C</span> = <span style="color: rgb(0, 0, 0); font-weight: bold;">new</span> C<span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(102, 204, 102);">)</span>;</pre>
<ul>
<li>en PHP4 :<br />
<blockquote>
<p>Je me nome B<br />
 Je me nome C</p>
</blockquote>
</li>
<li>en PHP5<br />
<blockquote>
<p>Je me nome A <br />Je me nome A</p>
</blockquote>
</li>
</ul>
<p> <ins> Avant tout il faut savoi</ins>r que en PHP, si une class enfant n&#8217;as pas de constructeur défini, c&#8217;est le constructeur parent qui sera appelé.</p>
<p> En PHP5, on peux le voir c&#8217;est effectivement le cas.<br />Mais en PHP4, cela ne semble pas tout a fait juste.</p>
<p>Changeons un peu le code, en remplaçant :<br /><code> function C()</code><br />par<br /><code>function Cbis()</code> <br />Et là le résultat pour PHP4 change :<br />
<blockquote>
<p>Je me nome B<br />
 Je me nome B</p>
</blockquote>
<p>C&#8217;est toujours utile a savoir&#8230; et surtotu cela peux éviter de longue heures de debug &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://grummfy.be/blog/15/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.320 seconds -->

