<?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>Flasheves &#187; script</title>
	<atom:link href="http://www.flasheves.com/tag/script/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flasheves.com</link>
	<description>programacion, analisis , diseño</description>
	<lastBuildDate>Thu, 18 Mar 2010 22:48:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Obtener el src de the_post_thumbnail en WordPress</title>
		<link>http://www.flasheves.com/obtener-el-src-de-the_post_thumbnail-en-wordpress/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=obtener-el-src-de-the_post_thumbnail-en-wordpress</link>
		<comments>http://www.flasheves.com/obtener-el-src-de-the_post_thumbnail-en-wordpress/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 22:57:59 +0000</pubDate>
		<dc:creator>eveevans</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://test.flasheves.com/?p=178</guid>
		<description><![CDATA[Script para obtener el source ( src ) de una imagen definida mediante the_post_thumbnail ]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-201" href="http://www.flasheves.com/obtener-el-src-de-the_post_thumbnail-en-wordpress/code01/"><img title="code01" src="../wp-content/uploads/2010/02/code01.jpg" alt="" width="618" height="155" /></a></p>
<p><a href="http://codex.wordpress.org/Template_Tags/the_post_thumbnail">the_post_thumbnail</a> es una de mis funciones favoritas, incorporada a partir de WordPress 2.9 , que permite definir una imagen asociada a  un post y mostrarla facilmente, algo muy útil para hacer temas (templates) atractivos  y amigables desde el punto de vista administrativo.</p>
<p>Ya <a href="http://ayudawordpress.com/actualizar-tu-tema-a-wordpress-2-9">bastante </a>se ha hablado sobre esta <a href="http://wpengineer.com/about-wordpress-post-thumbnail/">función </a>y las<a href="http://wpengineer.com/the-ultimative-guide-for-the_post_thumbnail-in-wordpress-2-9/"> mil maneras de usarla</a>, sin embargo si queremos  hacer algo más avanzado que simplemente mostrar la imagen, lo más probable es que necesitamos solamente el source (src) de la imagen. Para esto usamos la función <a href="http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src">wp_get_attachment_image_src</a> , la cual recibe como parámetros el ID del <a href="http://codex.wordpress.org/Using_Image_and_File_Attachments">attachment </a>y el tamaño que queremos de la miniatura, y devuelte un arreglo que contiene el URL, el acho y el alto del attachment.</p>
<p>A manera de ejemplo, su uso dentro de <a href="http://codex.wordpress.org/The_Loop">the_loop</a> seria algo asi:</p>
<p><pre class="brush: php;">
&lt;div&gt;
&lt;div&gt;
&lt;pre&gt;&lt;?php if(has_post_thumbnail()):   //si hay thumbnail definido
	$pimagen =  wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' , false );  // arreglo que contiene url, width , height
?&gt;
&lt;img src=&quot;&lt;?php echo $pimagen[0] ?&gt;&quot; alt=&quot;&lt;?php the_title(); ?&gt;&quot; width=&quot;&lt;?php echo $pimagen[1]; ?&gt;&quot; height=&quot;&lt;?php echo $pimagen[2]; ?&gt;&quot; /&gt;

&lt;?php endif; ?&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
</pre></p>
<p>Obviamente, en este caso esta haciendo practicamente lo mismo que la función <a href="http://codex.wordpress.org/Template_Tags/the_post_thumbnail">the_post_thumbnail</a> , sin embargo las aplicaciones las dejo a tu imaginación. <a href="http://codex.wordpress.org/Template_Tags/the_post_thumbnail"><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flasheves.com/obtener-el-src-de-the_post_thumbnail-en-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>La hormiga más amiga de la hormiga js</title>
		<link>http://www.flasheves.com/la-hormiga-mas-amiga-de-la-hormiga-js/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=la-hormiga-mas-amiga-de-la-hormiga-js</link>
		<comments>http://www.flasheves.com/la-hormiga-mas-amiga-de-la-hormiga-js/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 23:54:05 +0000</pubDate>
		<dc:creator>eveevans</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.flasheves.com/?p=142</guid>
		<description><![CDATA[Un simple script para hacer alguna broma ]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-157" title="hmiga" src="http://www.flasheves.com/wp-content/uploads/2010/01/hmiga.jpg" alt="hmiga" width="620" height="155" /></p>
<p><img class="alignright sinborde size-full wp-image-150" style="border: none;" title="miga" src="http://www.flasheves.com/wp-content/uploads/2010/01/miga.gif" alt="miga" width="100" height="75" />A raiz que me encontre con esta imagen, se me ocurrió un pequeño script para hacer una broma. ( Además tengo la meta de escribir almenos un post por semana, asi que esto cuenta xD )</p>
<p>Lo único que deben hacer es:<br />
1. Copiar el siguiente script<br />
2. Entra a cualquier página ( preferiblemente con fondo claro )<br />
3. Pegar en la URL del navegador, el código que copiaron</p>
<p><pre class="brush: jscript;">
javascript:(function(){insecto= document.createElement(&quot;div&quot;);insecto.innerHTML=&quot;&lt;img src='http://28.media.tumblr.com/tumblr_kwv92nwuIw1qzcj42o1_100.gif'&gt;&lt;/div&gt;&quot;;insecto.setAttribute(&quot;style&quot;,&quot;position:fixed;top:0;left:0;&quot;);document.body.appendChild(insecto);})();
</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flasheves.com/la-hormiga-mas-amiga-de-la-hormiga-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Miniaturas de Post en WordPress 2.8.x</title>
		<link>http://www.flasheves.com/miniaturas-de-post-en-wordpress-2-8-x/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=miniaturas-de-post-en-wordpress-2-8-x</link>
		<comments>http://www.flasheves.com/miniaturas-de-post-en-wordpress-2-8-x/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 17:18:44 +0000</pubDate>
		<dc:creator>eveevans</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.flasheves.com/?p=75</guid>
		<description><![CDATA[Script para generar miniaturas de los post en Wordpress 2.8 ]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-88" title="loma" src="http://www.flasheves.com/wp-content/uploads/2009/10/loma.jpg" alt="loma" width="620" height="155" /></p>
<p>Entre <a href="http://codex.wordpress.org/Version_2.9">otras de las  funcionalidades</a> que me gustan de la nueva versión de WordPress 2.9 es una función llamada <a href="http://wpengineer.com/new-feature-in-wordpress-2-9-the_post_image/">the_post_image()</a> la cual nos permite generar minuaturas de una imagen del post, muy útil en el momento de hacer un theme.</p>
<p>Sin embargo de vuelta a la realidad y debido a que aun no sale<a href="http://wordpress.org/development/2009/10/getting-involved-with-the-2-9-beta-testing/"> WordPress 2.9 </a>les dejo un script que podemos usar dentro de <a href="http://codex.wordpress.org/The_Loop">the_loop() </a>para generar miniaturas del post.</p>
<p><pre class="brush: php;">
&lt;div&gt;
&lt;div&gt;
&lt;pre&gt;&lt;?php
  $image = null; 
  $attachments =&amp; get_children(array('post_parent'=&gt;get_the_ID(),'post_type'=&gt;'attachment','post_mime_type'=&gt;'image'));
 
     if ($attachments == TRUE) {        
        foreach($attachments as $att) {
        $image = wp_get_attachment_image_src($att-&gt;ID,'thumbnail',false);
        break; 
        }
}
 
 if (isset($image)) {
 ?&gt;
 &lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;Enlace permanente a &lt;?php the_title(); ?&gt;&quot;&gt;
 &lt;img src=&quot;&lt;?php echo $image[0] ?&gt;&quot; alt=&quot;&lt;?php the_title(); ?&gt;&quot; width=&quot;&lt;?php echo $image[1]; ?&gt;&quot; height=&quot;&lt;?php echo $image[2]; ?&gt;&quot; /&gt;&lt;/a&gt;
&lt;?php } ?&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
</pre></p>
<p>Para información detallada sobre la utilización del  script puede verlo en <a href="http://www.frickr.es/2009/01/04/como-mostrar-miniaturas-en-tu-tema-de-wordpress-sin-plugins-ni-hacks/2/">http://www.frickr.es/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flasheves.com/miniaturas-de-post-en-wordpress-2-8-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Utilizar otro framework javascript en Joomla 1.5.x</title>
		<link>http://www.flasheves.com/utilizar-otro-framework-javascript-en-joomla-1-5-x/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=utilizar-otro-framework-javascript-en-joomla-1-5-x</link>
		<comments>http://www.flasheves.com/utilizar-otro-framework-javascript-en-joomla-1-5-x/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 15:57:49 +0000</pubDate>
		<dc:creator>eveevans</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.flasheves.com/?p=54</guid>
		<description><![CDATA[Script para eliminar el framework javascript "Mootools" que trae por defecto las versiones 1.5.x de Joomla]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-71" title="lapiz" src="http://www.flasheves.com/wp-content/uploads/2009/09/lapiz.jpg" alt="lapiz" width="620" height="155" /></p>
<p><a href="http://www.joomla.org/" target="_blank">Joomla</a> es uno de los más populares Sistemas de Gestión de Contenido (<a href="http://es.wikipedia.org/wiki/Sistema_de_gesti%C3%B3n_de_contenido" target="_blank">CMS</a>), y su versión 1.5 trajo muchas mejoras respecto a su anterior 1.0. Sin embargo en esta versión introdujeron el framework javascript <a href="http://www.mootools.net/" target="_blank">Mootools </a>por defecto, lo cual está bien para la administración (backend), sin embargo en el front-end  o plantilla del sitio ( que es lo que el usuario final visualiza ) se vuelve un poco innesesario cargar esta librería; por un lado no todos los themes lo necesitan, y además limita al diseñador que quiera utilizar otro framework ( en lo personal prefiero <a href="http://www.prototypejs.org/" target="_blank">prototype </a>o <a href="http://jquery.com/" target="_blank">jquery </a>)</p>
<p>El siguiente script  php permite eliminar la llamada a mootools para de esta manera evitar que cargue y así poder llamar a otro framework sin problemas ( o simplemente no llamar a ninguno )</p>
<p><pre class="brush: php;"> getHeadData();
reset($headerstuff['scripts']);
$moo = key($headerstuff['scripts']);
unset($headerstuff['scripts'][$moo]);
unset($headerstuff['scripts']['/media/system/js/caption.js']);
$this-&gt;setHeadData($headerstuff);</pre></p>
<p>Cabe mensionar que este código debe ir en la cabecera (&lt;head&gt;&lt;/head&gt;) del archivo index.php del template</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flasheves.com/utilizar-otro-framework-javascript-en-joomla-1-5-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Detectar inactividad del mouse</title>
		<link>http://www.flasheves.com/detectar-inactividad-del-mouse/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=detectar-inactividad-del-mouse</link>
		<comments>http://www.flasheves.com/detectar-inactividad-del-mouse/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 01:44:52 +0000</pubDate>
		<dc:creator>eveevans</dc:creator>
				<category><![CDATA[Actionscript 2]]></category>
		<category><![CDATA[ActionScript2]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://localhost/flasheves/?p=7</guid>
		<description><![CDATA[Script para detectar la inactividad del mouse pasado determinado tiempo]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-37" title="mouse" src="http://www.flasheves.com/wp-content/uploads/2009/08/mouse.jpg" alt="mouse" /></p>
<p>Con este script haremos que si ha transcurrido cierta cantidad  de tiempo y el mouse no se ha movido, entonces que realize una acción determinada.</p>
<p>Es decir que detecte la inactividad del Mouse.</p>
<p><pre class="brush: as3;">
 var raton:Object=new Object();
 var reloj:Number=0;
 var espera:Number=3;

 raton.onMouseMove=function(){
 reloj=0;
 }

 function contador()
 {
 trace(reloj);
 reloj++;
 if(reloj&amp;gt;=espera)
 trace(”inactividad encontrada”);
 }

 var hilo=setInterval(contador,1000);
 Mouse.addListener(raton);
</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flasheves.com/detectar-inactividad-del-mouse/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->