<?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>Zorrito studio : Developpeur web 2.0, wordpress, webdesign, xhtml / css &#187; Codage</title>
	<atom:link href="http://www.zorrito.com/category/codage/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zorrito.com</link>
	<description></description>
	<lastBuildDate>Thu, 10 Jun 2010 21:27:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>featured content jquery ajax (mise en avant)</title>
		<link>http://www.zorrito.com/featured-content-jquery-ajax/</link>
		<comments>http://www.zorrito.com/featured-content-jquery-ajax/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 14:13:28 +0000</pubDate>
		<dc:creator>zorrito</dc:creator>
				<category><![CDATA[Codage]]></category>
		<category><![CDATA[Webdesign]]></category>

		<guid isPermaLink="false">http://www.zorrito.com/?p=341</guid>
		<description><![CDATA[Voici une liste de script ajax / jquery permettant de mettre en avant du contenu (featured content), que ce soit des news, des images ou autre.


No related posts.]]></description>
			<content:encoded><![CDATA[<h2>Feature List : <a href="http://jqueryglobe.com/article/feature-list" target="_blank">Site</a> <a href="http://jqueryglobe.com/labs/feature_list" target="_blank">Démo</a></h2>
<p><a href="http://jqueryglobe.com/labs/feature_list" target="_blank"><img class="alignnone size-full wp-image-356" title="featured-content-1" src="http://www.zorrito.com/wp-content/uploads/2010/01/featured-content-1.jpg" alt="featured-content-1" width="629" height="294" /></a></p>
<h2>Slick Auto-Playing Featured Content Slider <a href="http://css-tricks.com/creating-a-slick-auto-playing-featured-content-slider/" target="_blank">Site</a> <a href="http://css-tricks.com/examples/FeaturedContentSlider" target="_blank">Démo</a></h2>
<p><a href="http://css-tricks.com/examples/FeaturedContentSlider" target="_blank"><img class="alignnone size-full wp-image-359" title="featured-content-2" src="http://www.zorrito.com/wp-content/uploads/2010/01/featured-content-2.jpg" alt="featured-content-2" width="454" height="365" /></a></p>
<h2>Feature list <a href="http://themeforest.net/item/feature-list-a-template-designed-to-sell/54494?ref=jeromebazin" target="_blank">Site</a> <a href="http://themeforest.net/item/feature-list-a-template-designed-to-sell/full_screen_preview/54494?ref=jeromebazin" target="_blank">Démo</a></h2>
<p><a href="http://themeforest.net/item/feature-list-a-template-designed-to-sell/full_screen_preview/54494?ref=jeromebazin"><img src="http://www.zorrito.com/wp-content/uploads/2010/01/featured-content-3.jpg" alt="featured-content-3" title="featured-content-3" width="629" height="385" class="alignnone size-full wp-image-391" /></a></p>
<h2>Featured Content Slider <a href="http://webdeveloperplus.com/jquery/featured-content-slider-using-jquery-ui/" target="_blank">Site</a> <a href="http://demo.webdeveloperplus.com/featured-content-slider/" target="_blank">Démo</a></h2>
<p><a href="http://demo.webdeveloperplus.com/featured-content-slider/" target="_blank"><img class="alignnone size-full wp-image-360" title="featured-content-4" src="http://www.zorrito.com/wp-content/uploads/2010/01/featured-content-4.jpg" alt="featured-content-4" width="656" height="256" /></a></p>
<h2>JC Play List <a href="http://www.jumpeyecomponents.com/Flash-Components/User-Interface/JC-Play-List-285/" target="_blank">Site</a> <a href="http://www.jumpeyecomponents.com/Flash-Components/User-Interface/JC-Play-List-285/examples.htm" target="_blank">Démo</a></h2>
<p><a href="http://www.jumpeyecomponents.com/Flash-Components/User-Interface/JC-Play-List-285/examples.htm" target="_blank"><img class="alignnone size-full wp-image-361" title="featured-content-5" src="http://www.zorrito.com/wp-content/uploads/2010/01/featured-content-5.jpg" alt="featured-content-5" width="581" height="256" /></a></p>
<h2>Content Slider avec jFlow <a href="http://www.webdesignbooth.com/step-by-step-to-create-content-slider-using-jflow-a-minimalist-jquery-plugin/" target="_blank">Site</a> <a href="http://demo.webdesignbooth.com/content-slider/" target="_blank">Démo</a></h2>
<p><a href="http://demo.webdesignbooth.com/content-slider/" target="_blank"><img class="alignnone size-full wp-image-362" title="featured-content-6" src="http://www.zorrito.com/wp-content/uploads/2010/01/featured-content-6.jpg" alt="featured-content-6" width="608" height="256" /></a></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.zorrito.com/featured-content-jquery-ajax/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Animations jquery (images animées jquery)</title>
		<link>http://www.zorrito.com/animations-images-animees-jquery/</link>
		<comments>http://www.zorrito.com/animations-images-animees-jquery/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 12:56:53 +0000</pubDate>
		<dc:creator>zorrito</dc:creator>
				<category><![CDATA[Codage]]></category>
		<category><![CDATA[animation jquery]]></category>
		<category><![CDATA[carte postale jquery]]></category>
		<category><![CDATA[images animées jquery]]></category>

		<guid isPermaLink="false">http://www.zorrito.com/?p=334</guid>
		<description><![CDATA[Dans ce petit tutorial nous allons faire une sorte de carte postale animée en utilisant uniquement jquery et des images.


Related posts:<ol><li><a href='http://www.zorrito.com/effet-de-zoom-en-css/' rel='bookmark' title='Permanent Link: Effet de zoom en CSS'>Effet de zoom en CSS</a></li><li><a href='http://www.zorrito.com/cookie-jquery-pour-style-switcher/' rel='bookmark' title='Permanent Link: Cookie jquery pour style switcher'>Cookie jquery pour style switcher</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p style="overflow:auto"><span class="demo-button"><a title="images animées jquery" href="http://www.zorrito.com/code/carte-postale/index.html" target="_blank">Demo</a></span><span class="tel-button"><a title="images animées jquery" href="http://www.zorrito.com/code/carte-postale/carte-postale.rar">Tel</a></span></p>
<p>Dans un premier temps nous allons mettre en place la carte postale ainsi que les images qui vont la composer.</p>
<p>Nous avons donc un conteneur qui fera office de cadre pour la carte postale et 4 autres div qui contiendront des images.</p>
<pre class="brush: html">
&lt;div id=&quot;content&quot;&gt;
&lt;div id=&quot;nuage1&quot;&gt;&lt;img src=&quot;images/nuage1.png&quot;/&gt;&lt;/div&gt;
&lt;div id=&quot;nuage2&quot;&gt;&lt;img src=&quot;images/nuage2.png&quot;&gt;&lt;/div&gt;
&lt;div id=&quot;zorritostudio&quot;&gt;&lt;img src=&quot;images/zs.png&quot;&gt;&lt;/div&gt;
&lt;div id=&quot;zorrito&quot;&gt;&lt;img src=&quot;images/zorrito.png&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>Voici le code CSS qui permet de positionner les images.</p>
<pre class="brush: html">
#content{
position:relative;
width:629px;
height:400px;
top:30px;
/*overflow:hidden; */ on met cette propriété en commentaire pour voir ou sont positionnées nos images.
border:5px solid #C7C7C7;
background: url(images/bg.jpg);
} 

#nuage1{
position:absolute;
top:80px;
left:-140px; /*en dehors de l&#039;image pour le faire apparaitre de gauche à droite*/
z-index:1;
}

#nuage2{
position:absolute;
top:10px;
left:-120px;
z-index:1;
} 

#zorrito{
position:absolute;
top:30px;
left:-240px;
z-index:2;
} 

#zorritostudio{
position:absolute;
top:-80px;
left:240px;
z-index:2;
}
</pre>
<p>A ce stade vous devriez avoir quelque chose qui ressemble à ceci.</p>
<p><img title="animation jquery" src="http://www.zorrito.com/wp-content/uploads/2010/01/anim-jquery.jpg" alt="animation jquery" width="629" height="338" /></p>
<p>Il ne reste plus qu&#8217;à animer tout ceci en utilisant jquery.</p>
<p>Dans un premier temps pensez à décommenter la propriété overflow pour #content.<br />
Voici notre code javascript commenté.</p>
<pre class="brush: html">
&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function() {
animation();
});

function animation(){
nuage1();
zorrito();
zorritostudio();
nuage2();
}

function zorrito(){
//le petit renard va se déplacer de la position défini dans le css (hors du cadre) jusqu&#039;à 20px de la gauche du cadre avec un effet de rebond.
$(&quot;#zorrito&quot;).animate({left: &#039;20px&#039; }, {queue:false, duration:1000, easing:&#039;easeOutBounce&#039;});
}

function zorritostudio(){
//le setTimeout nous permet de faire un effet infini (le 4000 vient du 2000 + 2000)
 $(&quot;#zorritostudio&quot;).animate({top: &#039;180px&#039; }, {queue:false, duration:1000, easing:&#039;easeOutBounce&#039;});
 $(&quot;#zorritostudio&quot;).animate({opacity:1},2000).animate({opacity:0.1}, 2000)
 setTimeout(&quot;zorritostudio()&quot;,4000);
}

function nuage1(){
 $(&quot;#nuage1&quot;).animate({left:&quot;+=950px&quot;},7000).animate({left:&quot;-140px&quot;}, 0)
 setTimeout(&quot;nuage1()&quot;,7000);
}

function nuage2(){
 $(&quot;#nuage2&quot;).animate({left:&quot;+=950px&quot;},5000).animate({left:&quot;-120px&quot;}, 0)
 setTimeout(&quot;nuage2()&quot;,5000);
}
&lt;/script&gt;
</pre>
<p>On obtient une belle petite animation qui nous fait penser à un flash mais très simple :)</p>


<p>Related posts:<ol><li><a href='http://www.zorrito.com/effet-de-zoom-en-css/' rel='bookmark' title='Permanent Link: Effet de zoom en CSS'>Effet de zoom en CSS</a></li><li><a href='http://www.zorrito.com/cookie-jquery-pour-style-switcher/' rel='bookmark' title='Permanent Link: Cookie jquery pour style switcher'>Cookie jquery pour style switcher</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.zorrito.com/animations-images-animees-jquery/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Effet de zoom en CSS</title>
		<link>http://www.zorrito.com/effet-de-zoom-en-css/</link>
		<comments>http://www.zorrito.com/effet-de-zoom-en-css/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 10:30:24 +0000</pubDate>
		<dc:creator>zorrito</dc:creator>
				<category><![CDATA[Codage]]></category>
		<category><![CDATA[effet zoom css]]></category>
		<category><![CDATA[fancybox]]></category>
		<category><![CDATA[modalbox jquery]]></category>
		<category><![CDATA[zoom css]]></category>

		<guid isPermaLink="false">http://www.zorrito.com/?p=312</guid>
		<description><![CDATA[Dans ce petit tutorial nous allons voir comment afficher une petite galerie de ses réalisations avec un effet de zoom avec jquery ainsi que l'ouverture d'une modalbox (fancybox) pour voir les détails


Related posts:<ol><li><a href='http://www.zorrito.com/cookie-jquery-pour-style-switcher/' rel='bookmark' title='Permanent Link: Cookie jquery pour style switcher'>Cookie jquery pour style switcher</a></li><li><a href='http://www.zorrito.com/coverflow-ajax-mootools/' rel='bookmark' title='Permanent Link: Coverflow mootools &#8211; MooFlow'>Coverflow mootools &#8211; MooFlow</a></li><li><a href='http://www.zorrito.com/animations-images-animees-jquery/' rel='bookmark' title='Permanent Link: Animations jquery (images animées jquery)'>Animations jquery (images animées jquery)</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p style="overflow:auto"><span class="demo-button"><a title="Effet zoom CSS" href="http://www.zorrito.com/code/zoomcss/index.html" target="_blank">Demo</a></span><span class="tel-button"><a title="Zoom css" href="http://www.zorrito.com/code/zoomcss/zoomcss.rar">Tel</a></span></p>
<h3>Affichage de nos réalisations en html</h3>
<p>Nous allons mettre en place  une liste en utilisant les balises &lt;ul&gt; et &lt;li&gt;</p>
<pre class="brush: html">

&lt;ul id=&quot;bulle&quot;&gt;
&lt;li&gt;
&lt;a href=&quot;images/muchas_m.jpg&quot; title=&quot;Muchas maracas&quot;&gt;
&lt;img src=&quot;images/muchas.png&quot; alt=&quot;Muchas maracas&quot; /&gt;
&lt;img src=&quot;images/muchas_large.png&quot; alt=&quot;Muchas maracas&quot; /&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;images/nteam_m.jpg&quot; title=&quot;nteam&quot;&gt;
&lt;img src=&quot;images/nteam.png&quot; alt=&quot;nteam&quot; /&gt;
&lt;img src=&quot;images/nteam_large.png&quot; alt=&quot;nteam&quot; /&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;images/lagedor_m.jpg&quot; title=&quot;l&#039;age d&#039;or&quot;&gt;
&lt;img src=&quot;images/ageor.png&quot; alt=&quot;l&#039;age d&#039;or&quot; /&gt;
&lt;img src=&quot;images/ageor_large.png&quot; alt=&quot;l&#039;age d&#039;or&quot; /&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
</pre>
<h3>Mise en forme de cette liste grâce au CSS.</h3>
<p>Le code CSS ne comporte rien de vraiment spécifique et compliqué.</p>
<pre class="brush: css">

#bulle {
list-style: none;
margin: 20px 0px 0px;
padding: 0px;
}
#bulle li {
display: inline-block;
margin: 0px 5px;
padding: 0px;
width: 72px;
height: 72px;
}

#bulle li a img {
position: relative;
border: none;
}

#bulle li a img.large {
display: none;
}

#bulle li a:hover img.small {
display: none;
z-index: 0;
}

#bulle li a:hover img.large {
display: block;
margin-top: -28px;
margin-left: -28px;
z-index: 1000;
}
</pre>
<p>A ce stade nous avons bien l&#8217;effet de zoom qui est mis en ligne.</p>
<p>La dernière étape va consister à afficher dans une modalbox jquery le détail de la réalisation, dans la balise &lt;head&gt; de notre page html nous allons afficher le code ci-dessous.</p>
<pre class="brush: html">

&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;fancybox/jquery.fancybox-1.2.6.css&quot; media=&quot;screen&quot; /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;fancybox/jquery.fancybox-1.2.6.pack.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function() {
$(&quot;a.zoom&quot;).fancybox({
&#039;overlayOpacity&#039;    :    0.7,
&#039;overlayColor&#039;        :    &#039;#FFF&#039;
});
});
&lt;/script&gt;
</pre>
<p>Voila c&#8217;est déjà fini, j&#8217;espère que l&#8217;effet vous plait.</p>


<p>Related posts:<ol><li><a href='http://www.zorrito.com/cookie-jquery-pour-style-switcher/' rel='bookmark' title='Permanent Link: Cookie jquery pour style switcher'>Cookie jquery pour style switcher</a></li><li><a href='http://www.zorrito.com/coverflow-ajax-mootools/' rel='bookmark' title='Permanent Link: Coverflow mootools &#8211; MooFlow'>Coverflow mootools &#8211; MooFlow</a></li><li><a href='http://www.zorrito.com/animations-images-animees-jquery/' rel='bookmark' title='Permanent Link: Animations jquery (images animées jquery)'>Animations jquery (images animées jquery)</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.zorrito.com/effet-de-zoom-en-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Miniature wp-postratings</title>
		<link>http://www.zorrito.com/thumb-wp-postratings/</link>
		<comments>http://www.zorrito.com/thumb-wp-postratings/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 08:39:40 +0000</pubDate>
		<dc:creator>zorrito</dc:creator>
				<category><![CDATA[Codage]]></category>
		<category><![CDATA[minature top article]]></category>
		<category><![CDATA[minature wp-postratings]]></category>
		<category><![CDATA[thumb top articles]]></category>
		<category><![CDATA[thumb wp-postratings]]></category>
		<category><![CDATA[wp-postratings thumbnail]]></category>

		<guid isPermaLink="false">http://www.zorrito.com/?p=204</guid>
		<description><![CDATA[L'excellent plugin wordpress wp-postratings permet de pouvoir voter pour les articles de son blog.

On peux avec ce dernier afficher un top des meilleurs articles par exemple.
Cependant on ne peux pas y faire figurer une miniature de son article (on suppose que pour la gestion des miniatures de vos articles vous utilisez un champs personnalisé qui contiendra l'url de votre miniature)

Nous allons voir ensemble comment faire cela.


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Dans notre cas, nous allons modifier le script pour cette fonction ### Function: Display Highest Rated Page/Post</p>
<p>Ouvrez le fichier postratings-stats.php et allez à la ligne 217.<br />
Nous allons trouver la requête qui nous permet d&#8217;aller récupérer les informations dans notre base de donnée, nous allons la modifier comme ci dessous.</p>
<pre class="brush: php">
$highest_rated = $wpdb-&gt;get_results(&quot;SELECT DISTINCT $wpdb-&gt;posts.*, (t1.meta_value+0.00) AS ratings_average, (t2.meta_value+0.00) AS ratings_users, (t3.meta_value+0.00) AS ratings_score , (t4.meta_value) AS image FROM $wpdb-&gt;posts LEFT JOIN $wpdb-&gt;postmeta AS t1 ON t1.post_id = $wpdb-&gt;posts.ID LEFT JOIN $wpdb-&gt;postmeta As t2 ON t1.post_id = t2.post_id LEFT JOIN $wpdb-&gt;postmeta AS t3 ON t3.post_id = $wpdb-&gt;posts.ID LEFT JOIN wp_postmeta AS t4 ON t4.post_id = wp_posts.ID WHERE t1.meta_key = &#039;ratings_average&#039; AND t2.meta_key = &#039;ratings_users&#039; AND t3.meta_key = &#039;ratings_score&#039; AND t4.meta_key = &#039;image&#039; AND $wpdb-&gt;posts.post_password = &#039;&#039; AND $wpdb-&gt;posts.post_date &lt; &#039;&quot;.current_time(&#039;mysql&#039;).&quot;&#039; AND $wpdb-&gt;posts.post_status = &#039;publish&#039; AND t2.meta_value &gt;= $min_votes AND $where ORDER BY $order_by DESC, ratings_users DESC LIMIT $limit&quot;);
</pre>
<p>Avec cette requête nous allons donc pouvoir récupérer l&#8217;url de notre miniature qui est contenu dans un champs personnalisé &#8216;image&#8217;.<br />
Vous pouvez l&#8217;adapter à votre guise pour récupérer d&#8217;autres champs personnalisés par exemple.</p>
<p>Maintenant nous allons ouvrir le fichier wp-postratings.php et nous allons modifier la fonction function expand_ratings_template qui se trouve à partir de la ligne 934.</p>
<p>Par défaut nous avons ceci.</p>
<pre class="brush: php">
// Get post related variables
if(is_null($post_ratings_data)) {
$post_ratings_data = get_post_custom($post_id);
$post_ratings_users = intval($post_ratings_data[&#039;ratings_users&#039;][0]);
$post_ratings_score = intval($post_ratings_data[&#039;ratings_score&#039;][0]);
$post_ratings_average = floatval($post_ratings_data[&#039;ratings_average&#039;][0]);
} else {
$post_ratings_users = intval($post_ratings_data-&gt;ratings_users);
$post_ratings_score = intval($post_ratings_data-&gt;ratings_score);
$post_ratings_average = floatval($post_ratings_data-&gt;ratings_average);
}
</pre>
<p>Nous allons le transformer comme ceci.</p>
<pre class="brush: php">
// Get post related variables
if(is_null($post_ratings_data)) {
$post_ratings_data = get_post_custom($post_id);
$post_ratings_users = intval($post_ratings_data[&#039;ratings_users&#039;][0]);
$post_ratings_score = intval($post_ratings_data[&#039;ratings_score&#039;][0]);
$post_ratings_average = floatval($post_ratings_data[&#039;ratings_average&#039;][0]);
//MODIF ICI
$img = $post_ratings_data[&#039;image&#039;][0];
} else {
$post_ratings_users = intval($post_ratings_data-&gt;ratings_users);
$post_ratings_score = intval($post_ratings_data-&gt;ratings_score);
$post_ratings_average = floatval($post_ratings_data-&gt;ratings_average);
//MODIF ICI
$img = $post_ratings_data-&gt;image;
}
</pre>
<p>Ensuite dirigez vous vers les lignes 1000 ou il y a une succession de str_replace.</p>
<p>Nous allons rajouter ceci.</p>
<pre class="brush: php">
$value = str_replace(&quot;%THUMB%&quot;, $img, $value);
</pre>
<p>Le tour est joué.<br />
Dans les options de template de wp-postratings, vous allez pouvoir utiliser %THUMB% pour afficher une miniature de votre article.</p>
<pre class="brush: php">
&lt;a href=&quot;%POST_URL%&quot; title=&quot;%POST_TITLE%&quot;&gt;&lt;img class=&quot;top-articles&quot; src=&quot;http://localhost/wordpress/wp-content/themes/votre theme/thumb.php?src=%THUMB%&quot; alt=&quot;%POST_TITLE%&quot;  width=&quot;91&quot; height=&quot;67&quot;/&gt;&lt;/a&gt;
</pre>
<p>Le principe général est exposé, j&#8217;espère que cela vous aura été utile.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.zorrito.com/thumb-wp-postratings/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CSV vers MySQL (correspondance des colonnes)</title>
		<link>http://www.zorrito.com/csv-vers-mysql-correspondance-des-colonnes/</link>
		<comments>http://www.zorrito.com/csv-vers-mysql-correspondance-des-colonnes/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 08:29:13 +0000</pubDate>
		<dc:creator>zorrito</dc:creator>
				<category><![CDATA[Codage]]></category>
		<category><![CDATA[csv vers mysql]]></category>
		<category><![CDATA[import csv mysql]]></category>
		<category><![CDATA[import csv vers BDD]]></category>

		<guid isPermaLink="false">http://www.zorrito.com/?p=192</guid>
		<description><![CDATA[Nous allons essayer d'apprendre à utiliser le LOAD DATA INFILE qui nous permet d'importer des bases de données en CSV ou même texte dans notre base de donnée MySQL, de pouvoir insérer des dates qui sont au format français, des numéros de téléphone séparées par des espaces par exemple.


Related posts:<ol><li><a href='http://www.zorrito.com/thumb-wp-postratings/' rel='bookmark' title='Permanent Link: Miniature wp-postratings'>Miniature wp-postratings</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Imaginons la structure suivant pour notre base de donnée.</p>
<p><img class="alignnone size-full wp-image-193" title="bdd_mysql" src="http://www.zorrito.com/wp-content/uploads/2009/04/bdd_mysql.jpg" alt="bdd_mysql" width="496" height="55" /></p>
<p>Voici celle de notre fichier texte.</p>
<p><img class="alignnone size-full wp-image-194" title="csv" src="http://www.zorrito.com/wp-content/uploads/2009/04/csv.jpg" alt="csv" width="496" height="53" /></p>
<p>Dans notre cas nous avons juste une inversion entre le nom et le téléphone.</p>
<p>Voici comment nous allons procéder.</p>
<pre class="brush: php">
LOAD DATA INFILE &#039;fichier.csv&#039; INTO TABLE `prospects` FIELDS TERMINATED BY &#039;t&#039; ENCLOSED BY &#039;&#039;  LINES TERMINATED BY &#039;rn&#039; IGNORE 1 LINES (id,@telephone,nom,@date_naissance) SET date_naissance = DATE_FORMAT(STR_TO_DATE(@date_naissance,&#039;%d/%m/%Y&#039;),&#039;%Y-%m-%d&#039;), telephone = REPLACE(@telephone,&#039; &#039;,&#039;&#039;);
</pre>
<p>Je passe sur les différents paramètre comme FIELDS TERMINATED BY, ENCLOSED BY qui se comprennent très bien d&#8217;eux même.<br />
Si ce n&#8217;est pas le cas vous pouvez aller jeter un coup d&#8217;oeil à la <a href="http://dev.mysql.com/doc/refman/5.1/en/load-data.html">documentation MySQL</a>.</p>
<p>Quand nous faisons ceci (id,@telephone,nom,@date_naissance), cela signifie que nous allons insérer la première colonne de notre CSV dans le champs id de notre table prospects, la deuxième colonne dans le champs telephone, ainsi de suite.</p>
<p>Cela ne permet donc bien de pouvoir insérer des données qui ne respecteraient pas forcement la structure de notre base de donnée mysql.</p>
<p>Les @ présents nous servent de &laquo;&nbsp;variables temporaires&nbsp;&raquo; afin de pouvoir faire des modifications sur les champs présents dans notre CSV afin de les insérer dans notre base de donnée une fois transformée.</p>
<pre class="brush: php">SET date_naissance = DATE_FORMAT(STR_TO_DATE(@date_naissance,&#039;%d/%m/%Y&#039;),&#039;%Y-%m-%d&#039;)</pre>
<p>Le code ci-dessus nous permet d&#8217;insérer dans notre base de donnée MySQL, une date qui était au format français dans notre fichier CSV en format anglais.</p>
<pre class="brush: php">telephone = REPLACE(@telephone,&#039; &#039;,&#039;&#039;)</pre>
<p>Cela nous a permis d&#8217;insérer le téléphone qui possédait des espaces, dans notre champs téléphone (int 10).</p>
<p>J&#8217;espère que ces quelques petites astuces vous auront été nécessaires, vous devriez à présent pouvoir insérer tout et n&#8217;importe quoi à partir de votre fichier txt ou csv.</p>


<p>Related posts:<ol><li><a href='http://www.zorrito.com/thumb-wp-postratings/' rel='bookmark' title='Permanent Link: Miniature wp-postratings'>Miniature wp-postratings</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.zorrito.com/csv-vers-mysql-correspondance-des-colonnes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Coverflow mootools &#8211; MooFlow</title>
		<link>http://www.zorrito.com/coverflow-ajax-mootools/</link>
		<comments>http://www.zorrito.com/coverflow-ajax-mootools/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 07:00:28 +0000</pubDate>
		<dc:creator>zorrito</dc:creator>
				<category><![CDATA[Codage]]></category>
		<category><![CDATA[coverflow ajax]]></category>
		<category><![CDATA[coverflow javascript]]></category>
		<category><![CDATA[coverflow mootools]]></category>
		<category><![CDATA[mooflow]]></category>

		<guid isPermaLink="false">http://www.zorrito.com/?p=186</guid>
		<description><![CDATA[MooFlow (compatible avec mootools 1.2) vous permettra de réaliser de jolie coverflow.


Related posts:<ol><li><a href='http://www.zorrito.com/coverflow-ajax/' rel='bookmark' title='Permanent Link: Coverflow Ajax'>Coverflow Ajax</a></li></ol>]]></description>
			<content:encoded><![CDATA[<h3>Pré-requis</h3>
<p>Après avoir inclus tout les fichiers nécessaires au bon fonctionnement de ce coverflow (vous pouvez voir cela en téléchargeant les sources en bas de cet article), il devient très facile de réaliser votre effet.</p>
<h3>Inclusion javascript pour les définir les options du coverflow</h3>
<p>Vous trouverez la documentation <a href="http://www.outcut.de/MooFlow/Documentation.html" target="_blank">ici même</a>.</p>
<pre class="brush: js">
&lt;script type=&quot;text/javascript&quot;&gt;
var myMooFlowPage = {

start: function(){

var mf = new MooFlow($(&#039;MooFlow&#039;), {
bgColor: &#039;#fff&#039;,
useSlider: true,
useAutoPlay: true,
useCaption: true,
useResize: true,
useWindowResize: true,
useMouseWheel: true,
useKeyInput: true
});
}
};
window.addEvent(&#039;domready&#039;, myMooFlowPage.start);
&lt;/script&gt;
</pre>
<h3>Création du coverflow</h3>
<p>Le petit bout de code ci-dessous permet ensuite de créer le coverflow.</p>
<pre class="brush: html">
&lt;div id=&quot;MooFlow&quot;&gt;
&lt;div&gt;&lt;img src=&quot;images/cover1.jpg&quot; title=&quot;zorrito1&quot; alt=&quot;zorrito1&quot; /&gt;&lt;/div&gt;
&lt;div&gt;&lt;img src=&quot;images/cover2.jpg&quot; title=&quot;zorrito2&quot; alt=&quot;zorrito2&quot; /&gt;&lt;/div&gt;
&lt;div&gt;&lt;img src=&quot;images/cover3.jpg&quot; title=&quot;zorrito3&quot; alt=&quot;zorrito3&quot; /&gt;&lt;/div&gt;
&lt;div&gt;&lt;img src=&quot;images/cover4.jpg&quot; title=&quot;zorrito4&quot; alt=&quot;zorrito4&quot; /&gt;&lt;/div&gt;
&lt;/div&gt;
</pre>
<h3>Démos</h3>
<p>Vous pouvez télécharger les fichiers <a href="http://www.zorrito.com/code/mooflow/mooflow.rar">d’example</a> et voir une <a href="http://www.zorrito.com/code/mooflow/mooflow.html" target="_blank">démo</a>.</p>
<p>Vous trouverez d&#8217;autres démonstrations directement sur le site de <a href="http://www.outcut.de/MooFlow" target="_blank">MooFlow</a>.</p>


<p>Related posts:<ol><li><a href='http://www.zorrito.com/coverflow-ajax/' rel='bookmark' title='Permanent Link: Coverflow Ajax'>Coverflow Ajax</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.zorrito.com/coverflow-ajax-mootools/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Cookie jquery pour style switcher</title>
		<link>http://www.zorrito.com/cookie-jquery-pour-style-switcher/</link>
		<comments>http://www.zorrito.com/cookie-jquery-pour-style-switcher/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 15:34:36 +0000</pubDate>
		<dc:creator>zorrito</dc:creator>
				<category><![CDATA[Codage]]></category>
		<category><![CDATA[affichage jquery]]></category>
		<category><![CDATA[cookie jquery]]></category>
		<category><![CDATA[css switcher]]></category>
		<category><![CDATA[style switcher]]></category>
		<category><![CDATA[switcher de style css]]></category>
		<category><![CDATA[switcher style]]></category>

		<guid isPermaLink="false">http://www.zorrito.com/?p=129</guid>
		<description><![CDATA[Dans le tutorial suivant nous allons apprendre à utiliser les cookie avec la libraire javascript jquery.

Nous allons réaliser ensemble un bouton qui nous permettra de switcher entre deux vues différentes pour les articles de votre blog par exemple et de pouvoir ainsi garder sa préférence d'affichage.


Related posts:<ol><li><a href='http://www.zorrito.com/effet-de-zoom-en-css/' rel='bookmark' title='Permanent Link: Effet de zoom en CSS'>Effet de zoom en CSS</a></li><li><a href='http://www.zorrito.com/animations-images-animees-jquery/' rel='bookmark' title='Permanent Link: Animations jquery (images animées jquery)'>Animations jquery (images animées jquery)</a></li><li><a href='http://www.zorrito.com/coverflow-ajax-mootools/' rel='bookmark' title='Permanent Link: Coverflow mootools &#8211; MooFlow'>Coverflow mootools &#8211; MooFlow</a></li></ol>]]></description>
			<content:encoded><![CDATA[<h3>1 &#8211; Pré-requis</h3>
<p>Vous devez tout d&#8217;abord télécharger <a href="http://jquery.com/">Jquery</a> ainsi que le javascript de gestion des <a href="http://www.zorrito.com/code/jquery-cookie/js/jquery.cookie.js">cookies</a>.</p>
<p>Vous devez insérer le code suivant pour prendre en compte ces fichiers javascript.</p>
<pre class="brush: html">
&lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery-1.3.2.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery.cookie.js&quot;&gt;&lt;/script&gt;
</pre>
<pre class="brush: js">
$.cookie(&#039;cookie&#039;); // récupérer cookie
$.cookie(&#039;cookie&#039;, &#039;valeur&#039;); // créer un cookie avec une valeur
$.cookie(&#039;cookie&#039;, &#039;valeur&#039;&#039;, { expires: 7 }); // créer un cookie avec une expiration dans 7 jours
$.cookie(&#039;cookie&#039;, &#039;&#039;, { expires: -1 }); // effacer cookie
</pre>
<h3>2 &#8211; Deux affichages différents pour les news</h3>
<p>Voici un code basique permettant de créer un affichage normal de news comportant un titre, une image et un contenu; un second affichage de type liste ou seul le titre est présent.</p>
<pre class="brush: html">
&lt;div class=&quot;normal&quot;&gt;
&lt;p&gt;Titre du poste  &lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;images/zorrito.png&quot; width=&quot;48&quot; height=&quot;48&quot; alt=&quot;zorrito&quot; style=&quot;float:left;&quot;/&gt;Texte Texte Texte Texte Texte Texte Texte&lt;/p&gt;
&lt;p&gt;Texte Texte Texte Texte Texte Texte Texte&lt;/p&gt;
&lt;p&gt;Titre du poste 1 &lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;images/zorrito.png&quot; width=&quot;48&quot; height=&quot;48&quot; alt=&quot;zorrito&quot; style=&quot;float:left;&quot;/&gt;Texte Texte Texte Texte Texte Texte Texte&lt;/p&gt;
&lt;p&gt;Texte Texte Texte Texte Texte Texte Texte&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;liste&quot;&gt;
&lt;p&gt;Titre du poste &lt;/p&gt;
&lt;p&gt;Titre du poste 1 &lt;/p&gt;
&lt;/div&gt;
</pre>
<h3>3 &#8211; Gestion de l&#8217;affichage lors de l&#8217;accès au site</h3>
<p>Il va falloir récupérer le cookie et stocker la valeur de ce dernier dans une variable javascript.</p>
<pre class="brush: js">
&lt;script type=&quot;text/javascript&quot;&gt;
var affichage = $.cookie(&#039;swap_tuto&#039;); //variable permettant de savoir le style de l&#039;affichage
if (affichage == null) { var affichage = &#039;normal&#039;;} // si aucun cookie est créé, on aura un affichage standard par défaut.
if (affichage == &#039;normal&#039;) {$(document).ready(function(){ //si on a quitté sur un affichage normal on reviendra sur un affichage normal
$(&quot;a.changer_vue_avec&quot;).removeClass(&quot;swap&quot;);
$(&#039;div.liste&#039;).hide();
});}
if (affichage == &#039;liste&#039;) {$(document).ready(function(){
$(&quot;a.changer_vue_avec&quot;).addClass(&quot;swap&quot;);
$(&#039;div.normal&#039;).hide();
}); }
&lt;script&gt;
</pre>
<h3>3 &#8211; Création du cookie suivant l&#8217;affichage sélectionné</h3>
<p>Suivant le type d&#8217;affichage que nous aurons choisi, nous allons attribuer une valeur au cookie correspondant à la vue choisie.</p>
<pre class="brush: js">
$(document).ready(function(){
$(&quot;a.changer_vue_avec&quot;).toggle(function(){
if (affichage == &#039;normal&#039;)
{
$(this).addClass(&quot;swap&quot;);
$(&#039;div.normal&#039;).fadeOut(&#039;fast&#039;);
$(&#039;div.liste&#039;).fadeIn(&#039;fast&#039;);
$.cookie(&#039;swap_tuto&#039;, &#039;liste&#039;,{ expires: 99 });
}
if (affichage == &#039;liste&#039;)
{
$(this).removeClass(&quot;swap&quot;);
$(&#039;div.liste&#039;).fadeOut(&#039;fast&#039;);
$(&#039;div.normal&#039;).fadeIn(&#039;fast&#039;);
$.cookie(&#039;swap_tuto&#039;, &#039;normal&#039;,{ expires: 99 });
}
}, function () {
if (affichage == &#039;normal&#039;)
{
$(this).removeClass(&quot;swap&quot;);
$(&#039;div.liste&#039;).fadeOut(&#039;fast&#039;);
$(&#039;div.normal&#039;).fadeIn(&#039;fast&#039;);
$.cookie(&#039;swap_tuto&#039;, &#039;normal&#039;,{ expires: 99 });
}
if (affichage == &#039;liste&#039;)
{
$(this).addClass(&quot;swap&quot;);
$(&#039;div.normal&#039;).fadeOut(&#039;fast&#039;);
$(&#039;div.liste&#039;).fadeIn(&#039;fast&#039;);
$.cookie(&#039;swap_tuto&#039;, &#039;liste&#039;,{ expires: 99 });
}
});
});</pre>
<h3>4 &#8211; Conclusion, démo et fichiers</h3>
<p>J&#8217;espère que ce tutorial vous aura été utile.<br />
Vous pouvez télécharger les fichiers <a href="http://www.zorrito.com/code/jquery-cookie/cookie.rar">d&#8217;example</a> et voir une <a href="http://www.zorrito.com/code/jquery-cookie/index.html" target="_blank">démo</a>.</p>
<p>Lorsque vous testez la démo, changer de vue, et rafraichissez votre page pour voir l&#8217;effet des cookie (sauvegarde ou non de votre vue)</p>


<p>Related posts:<ol><li><a href='http://www.zorrito.com/effet-de-zoom-en-css/' rel='bookmark' title='Permanent Link: Effet de zoom en CSS'>Effet de zoom en CSS</a></li><li><a href='http://www.zorrito.com/animations-images-animees-jquery/' rel='bookmark' title='Permanent Link: Animations jquery (images animées jquery)'>Animations jquery (images animées jquery)</a></li><li><a href='http://www.zorrito.com/coverflow-ajax-mootools/' rel='bookmark' title='Permanent Link: Coverflow mootools &#8211; MooFlow'>Coverflow mootools &#8211; MooFlow</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.zorrito.com/cookie-jquery-pour-style-switcher/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Clavier virtuel</title>
		<link>http://www.zorrito.com/clavier-virtuel/</link>
		<comments>http://www.zorrito.com/clavier-virtuel/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 21:35:08 +0000</pubDate>
		<dc:creator>zorrito</dc:creator>
				<category><![CDATA[Codage]]></category>
		<category><![CDATA[clavier virtuel]]></category>

		<guid isPermaLink="false">http://www.zorrito.com/?p=94</guid>
		<description><![CDATA[Ce petit clavier virtuel vous permet d'ajouter un clavier virtuel pour remplir un champs d'un formulaire par exemple, vous avec le choix entre différentes langues pour votre clavier.


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Mais à quoi cela pourrait servir ?</p>
<p>On pourrait imaginer saisir le numéro de sa CB avec ce petit système ce qui éviterait en cas d&#8217;infection par un virus &laquo;&nbsp;keylogger&nbsp;&raquo; par exemple de se faire voler son numéro de carte.</p>
<p>L&#8217;autre raison pourrait être la frime.</p>
<p>Voici la tradionnelle démonstration (cliquez sur l&#8217;image du clavier)</p>
<p><iframe width="490" scrolling="no" height="250" frameborder="0" src="http://www.zorrito.com/code/keyboard/index.html"/></iframe></p>
<p>Vous trouverez tout ce qu&#8217;il faut pour le <a href="http://www.zorrito.com/code/keyboard/keyboard.rar">clavier virtuel</a> ici même.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.zorrito.com/clavier-virtuel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Coverflow Ajax</title>
		<link>http://www.zorrito.com/coverflow-ajax/</link>
		<comments>http://www.zorrito.com/coverflow-ajax/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 14:15:04 +0000</pubDate>
		<dc:creator>zorrito</dc:creator>
				<category><![CDATA[Codage]]></category>
		<category><![CDATA[coverflow ajax]]></category>
		<category><![CDATA[coverflow javascript]]></category>
		<category><![CDATA[protoflow]]></category>

		<guid isPermaLink="false">http://www.zorrito.com/?p=88</guid>
		<description><![CDATA[Protoflow (basé sur protoype et scriptaculous) vous permet de réaliser un coverflow en ajax à la sauce iphone.


Related posts:<ol><li><a href='http://www.zorrito.com/panneau-deroulant-jquery/' rel='bookmark' title='Permanent Link: Panneau déroulant jquery'>Panneau déroulant jquery</a></li><li><a href='http://www.zorrito.com/coverflow-ajax-mootools/' rel='bookmark' title='Permanent Link: Coverflow mootools &#8211; MooFlow'>Coverflow mootools &#8211; MooFlow</a></li><li><a href='http://www.zorrito.com/upload-ajax/' rel='bookmark' title='Permanent Link: Upload ajax'>Upload ajax</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Voici un petit aperçu de ce que vous aller pouvoir faire.<br />
Faites glisser le curseur et vous verrez les pochettes bouger, ou bouger la molette de votre souris.</p>
<p><iframe width="490" scrolling="no" height="400" frameborder="0" src="http://www.zorrito.com/code/coverflow/index.html"/></iframe></p>
<p>Cliquer directement <a title="Coverflow ajax" href="http://www.zorrito.com/code/coverflow/index.html" target="_blank">ici</a> et afficher la source pour pouvoir apprendre à réaliser ce coverflow.<br />
Ou alors télécharger les fichiers <a title="Coverflow ajax" href="http://www.zorrito.com/code/coverflow/coverflow.rar">ici même</a>.</p>


<p>Related posts:<ol><li><a href='http://www.zorrito.com/panneau-deroulant-jquery/' rel='bookmark' title='Permanent Link: Panneau déroulant jquery'>Panneau déroulant jquery</a></li><li><a href='http://www.zorrito.com/coverflow-ajax-mootools/' rel='bookmark' title='Permanent Link: Coverflow mootools &#8211; MooFlow'>Coverflow mootools &#8211; MooFlow</a></li><li><a href='http://www.zorrito.com/upload-ajax/' rel='bookmark' title='Permanent Link: Upload ajax'>Upload ajax</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.zorrito.com/coverflow-ajax/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Panneau déroulant jquery</title>
		<link>http://www.zorrito.com/panneau-deroulant-jquery/</link>
		<comments>http://www.zorrito.com/panneau-deroulant-jquery/#comments</comments>
		<pubDate>Sat, 31 May 2008 12:04:44 +0000</pubDate>
		<dc:creator>zorrito</dc:creator>
				<category><![CDATA[Codage]]></category>
		<category><![CDATA[panneau déroulant jquery]]></category>
		<category><![CDATA[slide jquery]]></category>

		<guid isPermaLink="false">http://www.zorrito.com/?p=62</guid>
		<description><![CDATA[Je vais expliquer dans ce petit tutorial comment réaliser un panneau déroulant qui passe par dessus votre design, grâce à Jquery.


Related posts:<ol><li><a href='http://www.zorrito.com/coverflow-ajax/' rel='bookmark' title='Permanent Link: Coverflow Ajax'>Coverflow Ajax</a></li><li><a href='http://www.zorrito.com/coverflow-ajax-mootools/' rel='bookmark' title='Permanent Link: Coverflow mootools &#8211; MooFlow'>Coverflow mootools &#8211; MooFlow</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Voici un petit aperçu de ce que vous pouvez faire.<br />
Cliquer sur le bouton dérouler et la magie opère!!</p>
<p><iframe width="490" scrolling="no" height="270" frameborder="0" src="http://www.zorrito.com/code/panneaujquery/panneau.html"/></iframe></p>
<p>Cliquer directement <a href="http://www.zorrito.com/code/panneaujquery/panneau.html" target="_blank">ici</a> et afficher la source pour pouvoir apprendre à réaliser cet effet.<br />
Ou alors télécharger les fichiers <a href="http://www.zorrito.com/code/panneaujquery/panneaujquery.rar">ici même</a>.</p>


<p>Related posts:<ol><li><a href='http://www.zorrito.com/coverflow-ajax/' rel='bookmark' title='Permanent Link: Coverflow Ajax'>Coverflow Ajax</a></li><li><a href='http://www.zorrito.com/coverflow-ajax-mootools/' rel='bookmark' title='Permanent Link: Coverflow mootools &#8211; MooFlow'>Coverflow mootools &#8211; MooFlow</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.zorrito.com/panneau-deroulant-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
