<?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>Même pas mal! &#187; shortcode</title>
	<atom:link href="http://www.memepasmal.ch/tag/shortcode/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.memepasmal.ch</link>
	<description>La vie à Genève et aux alentours</description>
	<lastBuildDate>Sat, 11 Feb 2012 15:32: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>Des vidéos sous WordPress</title>
		<link>http://www.memepasmal.ch/2010/05/01/des-videos-sous-wordpress/</link>
		<comments>http://www.memepasmal.ch/2010/05/01/des-videos-sous-wordpress/#comments</comments>
		<pubDate>Sat, 01 May 2010 08:47:22 +0000</pubDate>
		<dc:creator>gael</dc:creator>
				<category><![CDATA[Foutoir technologique]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[shortcode]]></category>
		<category><![CDATA[tutoriel]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.memepasmal.ch/?p=1082</guid>
		<description><![CDATA[N&#8217;ayant à ce jour pas trouvé de plugin pour WordPress permettant l&#8217;ajout de vidéos sur mon blog selon mes besoins précis, je me suis lancé dans le codage d&#8217;un petit hack qui a finalement répondu à mes attentes. Pour suivre cette manipulation il suffit d&#8217;avoir une légère maitrise de PHP, du XHTML ainsi que savoir [...]]]></description>
			<content:encoded><![CDATA[<p>N&#8217;ayant à ce jour pas trouvé de <em>plugin</em> pour WordPress permettant l&#8217;ajout de vidéos sur mon <em>blog</em> selon mes besoins précis, je me suis lancé dans le codage d&#8217;un petit <em>hack</em> qui a finalement répondu à mes attentes. Pour suivre cette manipulation il suffit d&#8217;avoir une légère maitrise de PHP, du XHTML ainsi que savoir se servir d&#8217;un client FTP.</p>
<p>Je n&#8217;utilise pas d&#8217;espace de stockage public tels que <a href="http://www.youtube.com/">Youtube</a> ou <a href="http://www.dailymotion.com/fr">Dailymotion</a> pour mes vidéos, tout est enregistré sur mon serveur web. J&#8217;utilise depuis longtemps le lecteur vidéo JW Player de chez <a href="http://www.longtailvideo.com/">Longtail</a>, il peut être téléchargé gratuitement pour une utilisation non commerciale. Il est écrit en Flash et reconnait la plupart des formats du web (flv, mp4, etc.).</p>
<p>Intégrer une vidéo dans un billet en utilisant ce lecteur est une sinécure, le code HTML est énorme et rébarbatif, d&#8217;où l&#8217;idée d&#8217;utiliser les <em>shortcodes</em> de WordPress pour simplifier à l&#8217;extrême. Au final, l&#8217;insertion d&#8217;une vidéo dans un article se résume ainsi en une simple ligne écrite directement dans le texte du billet.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[flv file=&quot;mavideo.flv&quot; image=&quot;image.jpg&quot; width=&quot;300&quot; height=&quot;200&quot;]</div></td></tr></tbody></table></div>
<p>Ce <em>shortcode</em> &laquo;&nbsp;<em>flv</em>&nbsp;&raquo; permet au moyen des attributs de spécifier la vidéo, l&#8217;image facultative qui sera utilisée en attendant la lecture, la largeur et la hauteur. Il est important de noter que toutes les vidéos et toutes les images d&#8217;attente sont stockées dans un répertoire particulier et envoyées sur le serveur au moyen d&#8217;un client FTP, donc pas de belle interface dans le tableau de bord, tout est fait à la main. Dans l&#8217;exemple qui suit, le répertoire contenant ces fichiers est le répertoire &laquo;&nbsp;</em>/bin</em> &raquo;&nbsp;.<br />
<span id="more-1082"></span><br />
La première étape consiste à récupérer le lecteur vidéo JW Player depuis <a href="http://www.longtailvideo.com/players/jw-flv-player">le site de l&#8217;éditeur</a>. Attention à bien décocher la case &laquo;&nbsp;<em>Include Viral, a video sharing plugin</em>&nbsp;&raquo; avant de cliquer sur &laquo;&nbsp;<em>Download</em> &raquo;&nbsp;, sinon tu vas te retrouver avec un lecteur contenant le <em>plugin</em> &laquo;&nbsp;<em>Viral</em>&nbsp;&raquo; qui est extrêmement lourd, il t&#8217;affichera une page très soulante après chaque lecture.</p>
<p>Une fois le téléchargement de l&#8217;archive terminé, tu la décompresses où bon te semble. Tu n&#8217;auras besoin que de deux fichiers, &laquo;&nbsp;<em>swfobject.js</em>&nbsp;&raquo; et &laquo;&nbsp;<em>player.swf</em> &raquo;&nbsp;, tu les envoies dans la racine de ton site web <em>via</em> ton client FTP favori. Si tu as le fichier &laquo;&nbsp;<em>player-viral.swf</em>&nbsp;&raquo; à la place c&#8217;est que tu as téléchargé le lecteur contenant le  <em>plugin</em> &laquo;&nbsp;<em>Viral</em> &raquo;&nbsp;, tu viendras pas te plaindre.</p>
<p>La seconde étape est la mise en place du <em>hack</em>. Tu vas aller ouvrir le fichier &laquo;&nbsp;<em>functions.php</em>&nbsp;&raquo; qui se trouve dans le répertoire de ton thème WordPress. Normalement le chemin est &laquo;&nbsp;<em>/wp-content/themes/ton_theme</em> &raquo;&nbsp;. Tu y ajoute le code suivant, bien entendu entre les balises PHP.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:200px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">// Shortcode FLV function</span><br />
<span style="color: #666666; font-style: italic;">// Author : http://www.memepasmal.ch</span><br />
<span style="color: #000000; font-weight: bold;">function</span> flv_func<span style="color: #009900;">&#40;</span><span style="color: #000088;">$atts</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Répertoire des vidéos, change-le si tu veux</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$repmedia</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;/bin/&quot;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// L'ID du DIV doit être unique</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$div</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;media&quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">rand</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">999999</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Extraction des attributs</span><br />
&nbsp; &nbsp; <span style="color: #990000;">extract</span><span style="color: #009900;">&#40;</span>shortcode_atts<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'file'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'image'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'width'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'320'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'height'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'240'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$atts</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Construction du code HTML</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$html</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$html</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;div style='text-align:center;' id='&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$div</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;'&gt;&lt;/div&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> <br />
&nbsp; &nbsp; <span style="color: #000088;">$html</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;script type='text/javascript'&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$html</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot; &nbsp;var so = new SWFObject('/player.swf','single','&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$atts</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;width&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;','&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$atts</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;height&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;','0');<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$html</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot; &nbsp;so.addParam('allowfullscreen','true');<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$html</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot; &nbsp;so.addParam('allowscriptaccess','always');<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$html</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot; &nbsp;so.addParam('wmode','opaque');<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$html</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot; &nbsp;so.addParam('autostart','false');<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$html</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot; &nbsp;so.addParam('controlbar','bottom');<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$html</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot; &nbsp;so.addVariable('file','&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$repmedia</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$atts</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;file&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;');<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$atts</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;image&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$html</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot; &nbsp;so.addVariable('image','&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$repmedia</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$atts</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;image&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;');<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$html</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot; &nbsp;so.write('&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$div</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;');<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$html</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;/script&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$html</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>Cette fonction PHP sera utilisée par notre futur <em>shortcode</em>. Tu noteras la présence de la ligne permettant d&#8217;indiquer le répertoire des fichiers vidéos.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$repmedia</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;/bin/&quot;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Tu peux modifier &laquo;&nbsp;<em>/bin/</em>&nbsp;&raquo; avec le nom de ton répertoire qui contient tes médias. Attention à bien terminer par un slash.</p>
<p>Juste après l&#8217;accolade finale de cette fonction, toujours dans le fichier &laquo;&nbsp;<em>functions.php</em>&nbsp;&raquo; tu ajoutes la ligne suivante qui a pour but la création du <em>shortcode</em> &laquo;&nbsp;<em>flv</em> &raquo;&nbsp;.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">// Ajout du shortcode</span><br />
add_shortcode<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'flv'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'flv_func'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>La dernière étape consiste à intégrer le code JavaScript qui permet au lecteur de fonctionner. Tu vas donc aller ouvrir le fichier &laquo;&nbsp;<em>header.php</em>&nbsp;&raquo; qui se trouve dans le répertoire de ton thème, et tu vas ajouter la ligne suivante à la suite des balises HTML. Attention à l&#8217;emplacement, normalement ce code devrait se trouver entre les balises &laquo;&nbsp;<em>&lt;head&gt;</em>&nbsp;&raquo; et &laquo;&nbsp;</em>&lt;/head&gt;</em>.</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'text/javascript'</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'/swfobject.js'</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></div></td></tr></tbody></table></div>
<p>Tu envoies les deux fichiers &laquo;&nbsp;<em>functions.php</em>&nbsp;&raquo; et &laquo;&nbsp;<em>header.php</em>&nbsp;&raquo; modifiés sur ton serveur et le tour est joué, tu peux maintenant utiliser le <em>shortcode</em> nommé &laquo;&nbsp;<em>flv</em>&nbsp;&raquo; pour intégrer facilement des vidéos dans tes billets.</p>
<p>Par exemple, pour jouer le fichier vidéo &laquo;&nbsp;<em>mpm.flv</em>&nbsp;&raquo; de 320 pixels par 240, avec comme image d&#8217;attente &laquo;&nbsp;<em>mpm.jpg</em> &raquo;&nbsp;.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[flv file=&quot;mpm.flv&quot; image=&quot;mpm.jpg&quot; width=&quot;320&quot; height=&quot;240&quot;]</div></td></tr></tbody></table></div>
<p>Ce code affichera le résultat suivant aux visiteurs.</p>
<p><div class="video" style="width:320px;">
<div id='video849787'></div>
<script type='text/javascript'>
  var so = new SWFObject('/player.swf','single','320','264','0');
  so.addParam('allowfullscreen','true');
  so.addParam('allowscriptaccess','always');
  so.addParam('wmode','opaque');
  so.addParam('autostart','false');
  so.addParam('controlbar','bottom');
  so.addParam('dock','false');
  so.addVariable('file','/bin/mpm.flv');
  so.addVariable('image','/bin/mpm.jpg');
  so.write('video849787');
</script>
</div>
</p>
<p>L&#8217;attribut &laquo;&nbsp;<em>image</em>&nbsp;&raquo; est optionnel. Voici le code pour jouer ce même fichier vidéo, mais sans image d&#8217;attente.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[flv file=&quot;mpm.flv&quot; width=&quot;320&quot; height=&quot;240&quot;]</div></td></tr></tbody></table></div>
<p>Une petite astuce pour terminer, si malgré tous mes avertissements tu as téléchargé le lecteur incluant le plugin Viral et que tu as la flemme de télécharger une version sans cette lourdeur supplémentaire, il te suffit d&#8217;ajouter ces quelques lignes à la fonction PHP (au milieu de celles qui se ressemblent) pour désactiver cet horrible message de partage en fin de vidéo.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; <span style="color: #000088;">$html</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot; &nbsp;so.addVariable('viral.allowmenu','false');<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$html</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot; &nbsp;so.addVariable('viral.onpause','false');<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$html</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot; &nbsp;so.addVariable('viral.oncomplete','false');<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>C&#8217;est à toi de jouer maintenant.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.memepasmal.ch/2010/05/01/des-videos-sous-wordpress/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

