<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Gerard Guiu</title>
	
	<link>http://www.gerardguiu.com</link>
	<description>Freelance en desarrollo web, SEO and Community Manager</description>
	<lastBuildDate>Tue, 17 Aug 2010 09:35:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/gerardguiu" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="gerardguiu" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Mis experiencias como freelance</title>
		<link>http://www.gerardguiu.com/2010/08/mis-experiencias-como-freelance/</link>
		<comments>http://www.gerardguiu.com/2010/08/mis-experiencias-como-freelance/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 09:35:19 +0000</pubDate>
		<dc:creator>Gerard</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.entretenemos.com/gerardguiu/?p=276</guid>
		<description><![CDATA[Ya llevo casi 5 meses como autónomo freelance. Las cosas han cambiado mucho de como estaba acostumbrado, unas para bien otras para mal, pero encontrando el equilibrio entre las dos, la verdad es que es que trabajar como autónomo es un mundo aparte. Para los que están empezando en este mundillo o no saben si [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Mis experiencias como freelance", url: "http://www.gerardguiu.com/2010/08/mis-experiencias-como-freelance/" });</script>]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } --></p>
<p style="margin-bottom: 0cm;"><a href="http://www.flickr.com/photos/widdowquinn/2665444580/sizes/m/in/photostream/"><img class="alignleft" style="margin: 5px 7px; border: 2px solid black;" src="http://farm4.static.flickr.com/3218/2665444580_79129e44ba.jpg" alt="" width="326" height="221" /></a>Ya llevo casi 5 meses como autónomo freelance. Las cosas han cambiado mucho de como estaba acostumbrado, unas para bien otras para mal, pero <strong>encontrando el equilibrio </strong>entre las dos, la verdad es que es que trabajar como autónomo es un mundo aparte.</p>
<p style="margin-bottom: 0cm;">Para los que están empezando en este mundillo o no saben si pasarse a la aventura, les dejo unas pequeñas <strong>sugerencias personales</strong>:</p>
<p style="margin-bottom: 0cm;"><span id="more-276"></span></p>
<p>-El primer punto creo que es el mas importante. No te tires al vacio sin tener un paracaídas. Con otras palabras, no empieces la aventura del autónomo <strong>sin tener nada que hacer</strong>. Ahora ya no tienes a un jefe que te manda la faena cada día, ni sabes que, a final de mes tendrás un sueldo. Ahora estás dentro del dicho <em>&#8216;yo me lo guiso, yo me lo como</em>&#8216;.</p>
<p>-<strong>Recupera</strong> contactos de amigos, ex-compañeros de trabajo, empresas que tengas contacto. Comentales tu nuevo estado y ofrecerles tus servicios de colaboración. Muchos compañeros puede que tengan trabajos para desviarte a ti.</p>
<p>-Intenta <strong>asistir</strong> a tantos eventos de networking como puedas. Conocerás a gente como tu y podrás <strong>dar a conocer tus servicio</strong>s.</p>
<p>-Estas al día de <strong>temas burocrático</strong>s? IVA, IRPF, declaraciones de renta,..? Acude a un gestor para que te asesore.</p>
<p>-Si tienes blog, proyectos personales, <a title="LinkedIN" href="http://www.linkedin.com" target="_self">linkdIn</a>, <a title="Xing" href="https://www.xing.com" target="_self">Xing</a>, etc mira de tenerlos actualizados al máximo con todo lo que ofreces, lo que has realizado, con quien has trabajado, etc. A día de hoy es vital <strong>tener un perfil</strong> publicado a estas redes.</p>
<p>- Vístete cada mañana. Puede parecer una tontería, pero ir en pijama todo el día te da la sensación de<strong> no ir al trabajo</strong>. Vístete, y arreglate antes de empezar a trabajar.</p>
<p>-Tendrás que aprender a<strong> separar la vida laboral de la vida social</strong>. Esto creo que es lo mas difícil al tener el despacho en casa, pero con unos horario bien marcados podemos hacerlo.</p>
<p style="margin-bottom: 0cm;">Estos son los consejos que doy como un autónomo novato <img src='http://www.gerardguiu.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p style="margin-bottom: 0cm;">Que consejos darías tu?</p>
<p><a href="http://sharethis.com/item?&wp=3.0.1&amp;publisher=a8621708-3ce8-4483-9842-17a4bb4796d3&amp;title=Mis+experiencias+como+freelance&amp;url=http%3A%2F%2Fwww.gerardguiu.com%2F2010%2F08%2Fmis-experiencias-como-freelance%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.gerardguiu.com/2010/08/mis-experiencias-como-freelance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remodelación entretenemos.com</title>
		<link>http://www.gerardguiu.com/2010/07/remodelacion-entretenemos-com/</link>
		<comments>http://www.gerardguiu.com/2010/07/remodelacion-entretenemos-com/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 09:27:07 +0000</pubDate>
		<dc:creator>Gerard</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.enbloger.net/?p=264</guid>
		<description><![CDATA[Despúes de casi 1 año intentando renovar la web, buscando tiempo debajo de las piedras, por fin, he publicado la remodelación de mi proyecto entretenemos.com. Las novedades del proyecto son muchas, desde la optimización de código, como en diseño, pero aparte de todo esto, he querido socializarlo con widgets a facebook y referencias a twitter, [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Remodelación entretenemos.com", url: "http://www.gerardguiu.com/2010/07/remodelacion-entretenemos-com/" });</script>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="Entretenemos" src="http://www.entretenemos.com/images/logo.png" alt="" width="260" height="51" /></p>
<p>Despúes de casi 1 año intentando renovar la web, buscando tiempo debajo de las piedras, por fin, he publicado la remodelación de mi proyecto <a title="Entretenemos" href="http://www.entretenemos.com" target="_self">entretenemos.com</a>.</p>
<p>Las novedades del proyecto son muchas, desde la optimización de código, como en diseño, pero aparte de todo esto, he querido socializarlo con widgets a facebook y referencias a twitter, flickr y todas las herramientas 2.0 relacionadas con el ámbito de la web.</p>
<p>Aparte, he mejorado la base de la web, la <a href="http://www.entretenemos.com/busqueda_avanzada" target="_blank">búsqueda de artistas y servicios</a> y lo he cambiado por algo mas sencillo de lo que tenia antes. De esta forma facilito las cosas al usuario que ande buscando algún servicio.</p>
<p>Mas novedades? Mirarlo vosotros en la web y ya me diréis <img src='http://www.gerardguiu.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />   <a href="http://www.entretenemos.com" target="_blank">http://www.entretenemos.com</a></p>
<p><a href="http://sharethis.com/item?&wp=3.0.1&amp;publisher=a8621708-3ce8-4483-9842-17a4bb4796d3&amp;title=Remodelaci%C3%B3n+entretenemos.com&amp;url=http%3A%2F%2Fwww.gerardguiu.com%2F2010%2F07%2Fremodelacion-entretenemos-com%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.gerardguiu.com/2010/07/remodelacion-entretenemos-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tip rapido: Pasar parámetros checkbox o múltiple select por post</title>
		<link>http://www.gerardguiu.com/2010/06/tip-rapido-pasar-parametros-checkbox-o-multiple-select-por-post/</link>
		<comments>http://www.gerardguiu.com/2010/06/tip-rapido-pasar-parametros-checkbox-o-multiple-select-por-post/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 14:32:18 +0000</pubDate>
		<dc:creator>Gerard</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.enbloger.net/?p=250</guid>
		<description><![CDATA[El titulo lo dice todo, pero una cosa tan sencilla, me ha echo perder un tiempo valioso. En un formulario, pasar los campos por post/get es facil, pero si tenemos un listado de campos múltiples o tenemos un listado de checkbox, como los pasamos? Uno a uno? Que matada no? Investigando, un poco encontré que el [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Tip rapido: Pasar parámetros checkbox o múltiple select por post", url: "http://www.gerardguiu.com/2010/06/tip-rapido-pasar-parametros-checkbox-o-multiple-select-por-post/" });</script>]]></description>
			<content:encoded><![CDATA[<p>El titulo lo dice todo, pero una cosa tan sencilla, me ha echo perder un tiempo valioso.<br />
En un formulario, pasar los campos por post/get es facil, pero si tenemos un listado de campos múltiples o tenemos un listado de checkbox, como los pasamos? Uno a uno? Que matada no? Investigando, un poco encontré que el php detecta como array cualquier nombre terminado en corchetes '[ ]'. Osea, que aplicando lo dicho, tendríamos que hacer lo siguiente en los checkboxes:</p>
<div class="igBar"><span id="lhtml-4"><a href="#" onclick="javascript:showPlainTxt('html-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-4">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'checkbox'</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"valor[]"</span>  <span style="color: #000066;">value</span>=<span style="color: #cc66cc;color:#800000;">1</span>&gt;</span>Campo1 </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'checkbox'</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"valor[]"</span>  <span style="color: #000066;">value</span>=<span style="color: #cc66cc;color:#800000;">2</span>&gt;</span>Campo2 </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'checkbox'</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"valor[]"</span>  <span style="color: #000066;">value</span>=<span style="color: #cc66cc;color:#800000;">3</span>&gt;</span>Campo3 </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'checkbox'</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"valor[]"</span>  <span style="color: #000066;">value</span>=<span style="color: #cc66cc;color:#800000;">4</span>&gt;</span>Campo4 </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>De igual manera en un listado de campos multiple selección</p>
<div class="igBar"><span id="lhtml-5"><a href="#" onclick="javascript:showPlainTxt('html-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-5">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/select.html"><span style="color: #000000; font-weight: bold;">&lt;select</span></a> <span style="color: #000066;">multiple</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"campos[]"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900;"><a href="http://december.com/html/4/element/option.html"><span style="color: #000000; font-weight: bold;">&lt;option</span></a> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">"1"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>campo1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option&gt;</span></span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900;"><a href="http://december.com/html/4/element/option.html"><span style="color: #000000; font-weight: bold;">&lt;option</span></a> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">"2"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>campo2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900;"><a href="http://december.com/html/4/element/option.html"><span style="color: #000000; font-weight: bold;">&lt;option</span></a> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">"3"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>campo3<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900;"><a href="http://december.com/html/4/element/option.html"><span style="color: #000000; font-weight: bold;">&lt;option</span></a> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">"4"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>campo4<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/select&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Para capturar los datos, des del php haremos como cualquier otro tipo de dato, en este caso, por post 
<div class="igBar"><span id="lphp-6"><a href="#" onclick="javascript:showPlainTxt('php-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-6">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color:#0000FF;">$campos</span> = <span style="color:#0000FF;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'campos'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;  </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Y el resultado obtenido nos será un array con los campos seleccionados.</p>
<p><a href="http://sharethis.com/item?&wp=3.0.1&amp;publisher=a8621708-3ce8-4483-9842-17a4bb4796d3&amp;title=Tip+rapido%3A+Pasar+par%C3%A1metros+checkbox+o+m%C3%BAltiple+select+por+post&amp;url=http%3A%2F%2Fwww.gerardguiu.com%2F2010%2F06%2Ftip-rapido-pasar-parametros-checkbox-o-multiple-select-por-post%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.gerardguiu.com/2010/06/tip-rapido-pasar-parametros-checkbox-o-multiple-select-por-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crear una validación simple de un formulario con jquery</title>
		<link>http://www.gerardguiu.com/2010/03/crear-una-validacion-simple-de-un-formulario-con-jquery/</link>
		<comments>http://www.gerardguiu.com/2010/03/crear-una-validacion-simple-de-un-formulario-con-jquery/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 10:12:07 +0000</pubDate>
		<dc:creator>Gerard</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[programacion]]></category>

		<guid isPermaLink="false">http://www.enbloger.net/?p=233</guid>
		<description><![CDATA[Después de un paro ‘blogero’, básicamente por disponer de poco tiempo, como es habitual, volvemos a la carga. Hoy voy a intentar explicar un poco, como crearnos nuestro formulario con un validador hecho con jquery. Vale la pena disponer de un validador, así solo nos basta de referenciarlo en el documento y no repetir   el [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Crear una validación simple de un formulario con jquery", url: "http://www.gerardguiu.com/2010/03/crear-una-validacion-simple-de-un-formulario-con-jquery/" });</script>]]></description>
			<content:encoded><![CDATA[<p>Después de un paro ‘blogero’, básicamente por disponer de poco tiempo, como es habitual, volvemos a la carga.</p>
<p>Hoy voy a intentar explicar un poco, como crearnos nuestro formulario con un validador hecho con jquery. Vale la pena disponer de un validador, así solo nos basta de referenciarlo en el documento y no repetir   el mismo código infitas veces.</p>
<p>Vamos al lio.</p>
<p><span id="more-233"></span></p>
<p>Lo primero de todo, será crear el formulario:</p>
<div class="igBar"><span id="lhtml-13"><a href="#" onclick="javascript:showPlainTxt('html-13'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-13">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/form.html"><span style="color: #000000; font-weight: bold;">&lt;form</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"mi_formulario"</span> <span style="color: #000066;">action</span>=<span style="color: #ff0000;">"index.php"</span> <span style="color: #000066;">method</span>=<span style="color: #ff0000;">"POST"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span> Nombre <span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"user_name"</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"user_name"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Apellidos <span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"user_surname"</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"user_surname"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Comentario <span style="color: #009900;"><a href="http://december.com/html/4/element/textarea.html"><span style="color: #000000; font-weight: bold;">&lt;textarea</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"desc"</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"desc"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/textarea&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"submit_form"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"submit"</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">"enviar"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/form&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Una vez tengamos el formulario creado,  si pulsamos el botón de enviar, podremos enviarlo sin pasar ningún tipo de revisión, con lo cual, podríamos enviar el formulario vacio sin problema alguno.<br />
Para intentar evitar la entrada de campos vacios empezaremos insertando en los campos que queramos validar, la clase ‘validacion’.</p>
<div class="igBar"><span id="lhtml-14"><a href="#" onclick="javascript:showPlainTxt('html-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-14">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Nombre <span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"”user_name”"</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"”user_name”"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"”text”"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Comentario <span style="color: #009900;"><a href="http://december.com/html/4/element/textarea.html"><span style="color: #000000; font-weight: bold;">&lt;textarea</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"”desc”"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"”validacion”"</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"”desc”"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/textarea&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Para que nos sirve insertar una clase en el campo? Pues muy sencillo, será como una marca que tiene el campo, que en javascript nos facilitara su búsqueda.</p>
<p>Antes de crear el javacript, vamos a crear la clase css que nos mostrara el aviso.<br />
.focus{<br />
border: 1px solid red;<br />
}</p>
<p>Vamos a crear el javascript:</p>
<p>Como vamos a usar jquery, te recuerdo que deberás insertar el fichero jquery en el código. Para mas info de jquery.</p>
<div class="igBar"><span id="ljavascript-15"><a href="#" onclick="javascript:showPlainTxt('javascript-15'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-15">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span>document<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">ready</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// Variable de control del submit del formulario.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> check = <span style="color: #003366; font-weight: bold;">true</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// Damos al botón un evento al hacer click.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'# submit_form'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">click</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// Hacemos un each de todos los campos que tengan la clase validación.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'.validate'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">each</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// Eliminamos la clase foco del objecto, por si la tiene vinculada.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">removeClass</span><span style="color: #66cc66;">&#40;</span>‘<span style="color: #000066;">focus</span>’<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>$<span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">val</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #3366CC;">''</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span>&lt;strong&gt;this&lt;/strong&gt;<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">addClass</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"focus"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">check = <span style="color: #003366; font-weight: bold;">false</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>!check<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Con esto ya lo tendríamos echo, aun así, es necesario que dentro del código php que se encargará de procesar los campos, que se validen de nuevo los campos y sobretodo, que se procesen los campos para evitar sql injections(en el caso que trabajemos con bd) o contra ataques en el servidor.</p>
<p>NOTA:<br />
El ejemplo explicado es muy sencillo de utilizar. Podríamos complicarlo, por ejemplo, insertando un texto debajo de cada campo que no este lleno mostrando al usuario que el campo se debe rellenar. Tan solo deberíamos crear un campo oculto debajo de cada input con el nombre del campo _error y mostrarlo con el jquery. Ejemplo:<br />
html</p>
<div class="igBar"><span id="lhtml-16"><a href="#" onclick="javascript:showPlainTxt('html-16'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-16">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Nombre</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"”user_name”"</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"”user_name”"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"”text”"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"user_name_error"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"”form_error”"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Inserta el nombre<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Comentario<span style="color: #009900;"><a href="http://december.com/html/4/element/textarea.html"><span style="color: #000000; font-weight: bold;">&lt;textarea</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"”desc”"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"”validacion”"</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"”desc”"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/textarea&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"desc_error"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"”form_error”"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Inserta una descripcion<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>css:</p>
<div class="igBar"><span id="lcss-17"><a href="#" onclick="javascript:showPlainTxt('css-17'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-17">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.form_error<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">background</span>:<span style="color: #993333;">url</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'../images/bullet_error.png'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333;">no-repeat</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">padding-left</span>:<span style="color: #cc66cc;color:#800000;">1</span>.5em;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">color</span>: #cc0000;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">display</span>: <span style="color: #993333;">none</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>js:</p>
<div class="igBar"><span id="ljavascript-18"><a href="#" onclick="javascript:showPlainTxt('javascript-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-18">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span>document<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">ready</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span>&nbsp; check = <span style="color: #003366; font-weight: bold;">true</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'# submit_form'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">click</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'.validate'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">each</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">//Escondemos todos los avisos.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'.form_error'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">hide</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// Eliminamos la clase foco del objecto, por si la tiene vinculada.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">removeClass</span><span style="color: #66cc66;">&#40;</span>‘<span style="color: #000066;">focus</span>’<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>$<span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">val</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #3366CC;">''</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> field_name = $<span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">attr</span><span style="color: #66cc66;">&#40;</span>‘<span style="color: #000066;">name</span>’<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">addClass</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"focus"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'#'</span>+field_name+<span style="color: #3366CC;">'_error'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">fadeIn</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'slow'</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">check = <span style="color: #003366; font-weight: bold;">false</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>!check<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><a href="http://sharethis.com/item?&wp=3.0.1&amp;publisher=a8621708-3ce8-4483-9842-17a4bb4796d3&amp;title=Crear+una+validaci%C3%B3n+simple+de+un+formulario+con+jquery&amp;url=http%3A%2F%2Fwww.gerardguiu.com%2F2010%2F03%2Fcrear-una-validacion-simple-de-un-formulario-con-jquery%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.gerardguiu.com/2010/03/crear-una-validacion-simple-de-un-formulario-con-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crear un menú en drupal</title>
		<link>http://www.gerardguiu.com/2010/01/crear-un-menu-en-drupal/</link>
		<comments>http://www.gerardguiu.com/2010/01/crear-un-menu-en-drupal/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 15:10:14 +0000</pubDate>
		<dc:creator>Gerard</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[programacion]]></category>

		<guid isPermaLink="false">http://www.enbloger.net/?p=222</guid>
		<description><![CDATA[Una de las opciones básicas en una web, son los menús. Pueden ser horizontales, verticales o de mil formas, pero su existencia es imprescindible en una web. En drupal es muy sencillo crear un menú, pero nosotros lo haremos por código. Empezamos a ver como lo hacemos. Para realizar nuestro menú, aremos uso del hook_menu. [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Crear un menú en drupal", url: "http://www.gerardguiu.com/2010/01/crear-un-menu-en-drupal/" });</script>]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">Una de las opciones básicas en una web, son los <strong>menús</strong>. Pueden ser horizontales, verticales o de mil formas, pero su existencia es imprescindible en una web.<br />
En drupal es muy sencillo crear un menú, pero nosotros <strong>lo haremos por código</strong>.</p>
<p>Empezamos a ver como lo hacemos.</p>
<p><span id="more-222"></span></p>
<p>Para realizar nuestro menú, aremos uso del hook_menu. (<a title="Hook_menu" href="http://api.drupal.org/api/function/hook_menu/6" target="_blank">http://api.drupal.org/api/function/hook_menu/6</a>)</p>
<p>Este hook nos ayuda a crear nuestro propio menú, con los ítems que creamos.<br />
Parámetros de cada ítem:</p>
<p><strong>-title</strong>: El titulo que mostrara el ítem del menú.<br />
<strong>-description</strong>: Una pequeña descripción del ítem (no obligatoria, pero si que la uso para aveiguar rapidamente que hace el ítem)<br />
<strong>-page callback</strong>: La pagina, formulario, etc que se nos mostrara al hacer clic.<br />
<strong>-page arguments:</strong> Array de argumentos que se pasan a la pagina de callback.<br />
<strong>-access arguments</strong>: Array con los permisos que podrán visualizar la pagina.<br />
<strong>-file</strong>: Si tenemos el fichero que contiene el callback en un lugar distinto del menú, aquí especificamos donde se encuentra.(La ruta no será siempre a partir del directorio actual).<br />
<strong>-weight:</strong> El peso que tiene el ítem. Drupal muestra de mas pequeño a mas grande.<br />
<strong>-type:</strong> El tipo de menú. Por defecto estará en MENU_NORMAL_ITEM, pero podemos tener mas casos. Ejemplo:<br />
<strong>-MENU_CALLBACK</strong>: No se mostrara el ítem del menú ya que solo se usara como llamada para recoger su contenido.</p>
<p>Como creo un menú.<br />
Primero de todo, debemos crear nuestra función usando el hook_menu.</p>
<div class="igBar"><span id="lphp-21"><a href="#" onclick="javascript:showPlainTxt('php-21'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-21">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ejemplo_menu<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// productos es la ruta que tiene el ítem, osea www.sitio.com/productos</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$item</span><span style="color:#006600; font-weight:bold;">&#91;</span>‘productos’<span style="color:#006600; font-weight:bold;">&#93;</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'title'</span> = <span style="color:#FF0000;">'Listado de productos'</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'description'</span> = <span style="color:#FF0000;">'Listado de todos los productos de la empresa'</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// ejemplo_listado_productos es la función que nos mostrara el contenido.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'‘page callback'</span> = <span style="color:#FF0000;">'ejemplo_listado_productos'</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Id de la empresa que necesita la funcion ejemplo_listado_productos para mostrar el&nbsp; &nbsp; &nbsp; resultado</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'page arguments'</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'id_empresa'</span><span style="color:#006600; font-weight:bold;">&#41;</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Trabajadores es el único rol que podrá ver este ítem de menú.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'access arguments'</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'trabajadores'</span><span style="color:#006600; font-weight:bold;">&#41;</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Ruta donde esta la función ejemplo_listado_productos.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'file'</span> = <span style="color:#FF0000;">'/includes/ ejemplo_listado.inc'</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Si quisiéramos mas menús:</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$item</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'empresas'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Insertar los campos.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Retornamos los ítems de menú creados.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">Return</span> <span style="color:#0000FF;">$items</span>.</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Y si queremos hacer un menú con submenús?<br />
Es muy sencillo. Tendremos que hacer uso de el tipo MENU_LOCAL_TASK de los menú.<br />
Ejemplo:</p>
<div class="igBar"><span id="lphp-22"><a href="#" onclick="javascript:showPlainTxt('php-22'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-22">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$item</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'admin/productos'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'title'</span> = <span style="color:#FF0000;">'Listado de productos'</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'description'</span> = <span style="color:#FF0000;">'Listado de todos los productos de la empresa'</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'page callback'</span> = <span style="color:#FF0000;">'ejemplo_listado_productos'</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'page arguments'</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'id_empresa'</span><span style="color:#006600; font-weight:bold;">&#41;</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'access arguments'</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'trabajadores'</span><span style="color:#006600; font-weight:bold;">&#41;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'type'</span> =&nbsp; &nbsp;MENU_LOCAL_TASK,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'file'</span> = <span style="color:#FF0000;">'/includes/ ejemplo_listado.inc'</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$item</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'admin/productos/productos artesanales'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'title'</span> = <span style="color:#FF0000;">'Listado de productos artesanales'</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'description'</span> = <span style="color:#FF0000;">'Listado de todos los productos de la empresa'</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'page callback'</span> = <span style="color:#FF0000;">'ejemplo_listado_productos'</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'page arguments'</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'id_empresa'</span><span style="color:#006600; font-weight:bold;">&#41;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'access arguments'</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'trabajadores'</span><span style="color:#006600; font-weight:bold;">&#41;</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'type'</span> =&nbsp; &nbsp;MENU_LOCAL_TASK,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'file'</span> = <span style="color:#FF0000;">'/includes/ ejemplo_listado.inc'</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$item</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'admin/productos/productos_manufacturados'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'title'</span> = <span style="color:#FF0000;">'Listado de productos manufacturados'</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'description'</span> = <span style="color:#FF0000;">'Listado de todos los productos de la empresa'</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'page callback'</span> = <span style="color:#FF0000;">'ejemplo_listado_productos'</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'page arguments'</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'id_empresa'</span><span style="color:#006600; font-weight:bold;">&#41;</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'access arguments'</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'trabajadores'</span><span style="color:#006600; font-weight:bold;">&#41;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'type'</span> =&nbsp; &nbsp;MENU_LOCAL_TASK,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'file'</span> = <span style="color:#FF0000;">'/includes/ ejemplo_listado.inc'</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$item</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'admin/productos/productos_en_stock'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'title'</span> = <span style="color:#FF0000;">'Listado de productos en stock'</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'description'</span> = <span style="color:#FF0000;">'Listado de todos los productos de la empresa'</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'page callback'</span> = <span style="color:#FF0000;">'ejemplo_listado_productos'</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'page arguments'</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'id_empresa'</span><span style="color:#006600; font-weight:bold;">&#41;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'access arguments'</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'trabajadores'</span><span style="color:#006600; font-weight:bold;">&#41;</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'type'</span> =&nbsp; &nbsp;MENU_LOCAL_TASK,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'file'</span> = <span style="color:#FF0000;">'/includes/ ejemplo_listado.inc'</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Nos quedaría una cosa similar a esto:</p>
<p style="text-align: center;"><a href="http://www.enbloger.net/wp-content/uploads/2010/01/menu.jpg" rel="lightbox[222]"><img class="aligncenter size-medium wp-image-225" title="menu" src="http://www.enbloger.net/wp-content/uploads/2010/01/menu-300x60.jpg" alt="menu" width="300" height="60" /></a></p>
<p>Puedes probar de crear tu menú y hacer pruebas con los callback, los tipos, los permisos, etc.<br />
Para mas dudas, en los comentarios <img src='http://www.gerardguiu.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://sharethis.com/item?&wp=3.0.1&amp;publisher=a8621708-3ce8-4483-9842-17a4bb4796d3&amp;title=Crear+un+men%C3%BA+en+drupal&amp;url=http%3A%2F%2Fwww.gerardguiu.com%2F2010%2F01%2Fcrear-un-menu-en-drupal%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.gerardguiu.com/2010/01/crear-un-menu-en-drupal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solución a las sims muertas/quemadas del iphone</title>
		<link>http://www.gerardguiu.com/2009/12/solucion-a-las-sims-muertasquemadas-del-iphone/</link>
		<comments>http://www.gerardguiu.com/2009/12/solucion-a-las-sims-muertasquemadas-del-iphone/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 09:56:50 +0000</pubDate>
		<dc:creator>Gerard</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[tecnologia]]></category>

		<guid isPermaLink="false">http://www.enbloger.net/?p=216</guid>
		<description><![CDATA[Hace unos días, cuando encendí el iphone, no me detectó la sim. Reinicié y tampoco la detectaba. Saqué la tarjeta y la probé con otro móvil, y la sorpresa fue cuando me dijo que la sim no era valida. Fui a hacer un duplicado y desde aquí todo correcto de nuevo. Al cabo de un [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Solución a las sims muertas/quemadas del iphone", url: "http://www.gerardguiu.com/2009/12/solucion-a-las-sims-muertasquemadas-del-iphone/" });</script>]]></description>
			<content:encoded><![CDATA[<p>Hace unos días, cuando encendí el iphone, no me detectó la sim. Reinicié y tampoco la detectaba.<br />
Saqué la tarjeta y la probé con otro móvil, y la sorpresa fue cuando me dijo que la sim no era valida.<br />
Fui a hacer un duplicado y desde aquí todo correcto de nuevo.</p>
<p>Al cabo de un día, abro el iphone y me vuelve a pasar lo mismo: sim no disponible. De nuevo el iphone me quemó la sim<br />
Realice los mismos pasos otra vez, para acabar quemando la sim por tercera vez.<br />
Después de investigar un poco y 'discutirme' con el departamento técnico del apple, descubrí la<strong> solución al problema</strong>.<br />
Estos son los pasos para dejar el iphone en modo 'safe sim <img src='http://www.gerardguiu.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> '</p>
<p>-Ajustes /activar  modo avión. Esperar un momento y desactivarlo de nuevo.<br />
- Ajustes / General / Restaurar / Restaurar ajustes.<br />
Cuando se reinicie el dispositivo:<br />
- Ajustes / red / Activar  el 3g.<br />
- Ajustes / General / Restaurar / Restaurar ajustes de red.<br />
-  Para último, desactivar el 3G.</p>
<p>Con estos pasos se debería solucionar el problema.</p>
<p><em>Posibles hipótesis del porqué de la 'quema' de sims:</em><br />
El primero, <strong>no és culpa del jailbreak</strong>, ya que mucha gente sin jailbreak, le sucedia lo mismo.</p>
<p>En el departamento técnico no estaban al caso de este problema, pero por lo que vi en mi caso y en muchos otros usuarios, les empezó a pasar esto unos días después de actualizar a la versión 3.1.2 y muchos de ellos tenían el móvil 3GS.</p>
<p>Supongo que en la actualización, no se debe configurar o debe haber algún tipo de bug en los ajustes de red del operador, lo cual debe causar el problema, pero claro, es solo una hipótesis. En todo casos, a mi se me solucionó el problema con estos pasos y por lo que leí en otros foros que comenté la solución, a mas gente se le solucionó también.</p>
<p>Cualquier duda, postear un comentario.</p>
<p><a href="http://sharethis.com/item?&wp=3.0.1&amp;publisher=a8621708-3ce8-4483-9842-17a4bb4796d3&amp;title=Soluci%C3%B3n+a+las+sims+muertas%2Fquemadas+del+iphone&amp;url=http%3A%2F%2Fwww.gerardguiu.com%2F2009%2F12%2Fsolucion-a-las-sims-muertasquemadas-del-iphone%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.gerardguiu.com/2009/12/solucion-a-las-sims-muertasquemadas-del-iphone/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Importación de datos en drupal (I)</title>
		<link>http://www.gerardguiu.com/2009/11/importacion-de-datos-en-drupal-i/</link>
		<comments>http://www.gerardguiu.com/2009/11/importacion-de-datos-en-drupal-i/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 15:59:50 +0000</pubDate>
		<dc:creator>Gerard</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[programacion]]></category>

		<guid isPermaLink="false">http://www.enbloger.net/?p=190</guid>
		<description><![CDATA[Uno de los temas principales que nos aparecen cuando queremos migrar de nuestra web a una web con drupal, es, que hacemos con todo el contenido que tenemos y como lo importamos a la nueva web? Todos los datos guardados en la bd, todos los registros de usuarios, todas las relaciones con imágenes, etc. Se [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Importación de datos en drupal (I)", url: "http://www.gerardguiu.com/2009/11/importacion-de-datos-en-drupal-i/" });</script>]]></description>
			<content:encoded><![CDATA[<p>Uno de los temas principales que nos aparecen cuando queremos migrar de nuestra web a una web con drupal, <img class="size-full wp-image-205 alignright" title="upload_drupal" src="http://www.enbloger.net/wp-content/uploads/2009/11/upload_drupal.png" alt="upload_drupal" width="200" height="223" />es, que hacemos con todo el contenido que tenemos y<strong> como lo importamos </strong>a la nueva web?<br />
Todos los datos guardados en la bd, todos los registros de usuarios, todas las relaciones con imágenes, etc.<br />
Se puede migrar todo este contenido hacia drupal sin tener que entrarlo todo a mano de nuevo?<br />
La respuesta, es que si, pero entendiendo un poco la filosofía de trabajo de drupal.<br />
Es este primer tutorial, mirare de explicar un poco la manera como empezar a realizar correctamente la importación y crearemos la estructura de contenido en drupal.</p>
<p><span id="more-190"></span></p>
<p>La idea<strong> no es entrar el contenido directamente a la base de datos</strong>,  copiando los campos uno a uno dentro de cada campo, si no, utilizar las funciones que nos facilita drupal para poder realzar una importación correcta y validar los contenidos entrados.<br />
Si creamos los contenidos directamente en la base de datos de drupal <strong>no validaremos</strong> ningún contenido, aparte que drupal no sabrá relacionar los nodos y será todo un cacao ya que cuando drupal crea un nodo, crea muchos registros-subregistros, cosa que realizarlo a mano seria prácticamente imposible.</p>
<p><strong>Nota</strong>: El tutorial podríamos decir que es de un nivel medio, con lo cual, recomendaría antes de nada, leer un poco sobre como trabaja drupal con los nodos, cck, etc.</p>
<p>En el ejemplo, vamos a importar la tabla noticias.</p>
<p>Este seria nuestra table noticias en el MySQL de nuestra web actual.</p>
<div class="igBar"><span id="lmysql-25"><a href="#" onclick="javascript:showPlainTxt('mysql-25'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">MySQL:</span>
<div id="mysql-25">
<div class="mysql">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Id_noticia <span style="color: #66cc66;">&#40;</span><span style="color: #aa9933; font-weight: bold;">INT</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Titulo <span style="color: #66cc66;">&#40;</span><span style="color: #aa9933; font-weight: bold;">VARCHAR</span> <span style="color: #cc66cc;color:#800000;">250</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Entradilla <span style="color: #66cc66;">&#40;</span> varchar250<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Body  <span style="color: #66cc66;">&#40;</span><span style="color: #aa9933; font-weight: bold;">BLOB</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Fecha <span style="color: #66cc66;">&#40;</span> <span style="color: #993333; font-weight: bold;">TIMESTAMP</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Id_usuario <span style="color: #66cc66;">&#40;</span><span style="color: #aa9933; font-weight: bold;">INT</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Imagen <span style="color: #66cc66;">&#40;</span><span style="color: #aa9933; font-weight: bold;">VARCHAR</span> <span style="color: #cc66cc;color:#800000;">250</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
(Nota: la imagen es una ruta y no una imagen guardada en bd)</p>
<p>Primero de todo, y lo mas importante, es tener<strong> <a title="cck drupal" href="http://drupal.org/project/cck" target="_blank">instalado el modulo CCK</a></strong> ya que sin el, no podremos crear ningún tipo de contenido ni campos, ni ná de ná <img src='http://www.gerardguiu.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Si ya lo tenéis instalado, deberemos crear todos los tipos de contenido con sus campos y los campos que tengas un tipo similar o igual al de la  web. Osea, que si el campo nombre en la web actual es un campo de texto, en el actual no sea un radiobutton <img src='http://www.gerardguiu.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> , supongo que esto es obvio no?</p>
<p>Creamos un nuevo tipo de contenido: noticias y creamos los siguientes campos:<br />
<strong>Title </strong>– body (los campos por defecto del nodo)<br />
<strong>Entradilla </strong>=&gt; text =&gt; text field<br />
<strong>Fecha </strong>=&gt; datestamp  =&gt; mostrar en calendario<br />
<strong>Id_usuario</strong> =&gt; user_reference =&gt; autocomplete<br />
<strong>Imagen </strong>=&gt; file =&gt; image</p>
<p><a href="http://www.enbloger.net/wp-content/uploads/2009/11/content_user.jpg" rel="lightbox[190]"><img class="size-medium wp-image-199 alignnone" title="content_user" src="http://www.enbloger.net/wp-content/uploads/2009/11/content_user-300x34.jpg" alt="content_user" width="454" height="34" /></a></p>
<p><a href="http://www.enbloger.net/wp-content/uploads/2009/11/content_date.jpg" rel="lightbox[190]"><img class="size-medium wp-image-198 alignnone" title="content_date" src="http://www.enbloger.net/wp-content/uploads/2009/11/content_date-300x30.jpg" alt="content_date" width="456" height="30" /></a></p>
<p>Si no disponéis del campo fecha, instalar el modulo date. Descargar desde<a title="date - drupal" href="http://drupal.org/project/date" target="_blank"> aquí</a>.<br />
Si no disponéis del campo file, instalar el modulo Imagefield. Descargar desde <a title="Imagefield - drupal" href="http://drupal.org/project/imagefield" target="_blank">aquí</a>.<br />
Si alguno de los tipos no se os muestran, ir a admin/buid/modules, e instalároslos ya que los otros tipos de campo forman parte del core.<br />
<strong>Notas</strong>:<br />
-El campo id usuario, se relacionara con los usuario que tengamos en la web, por lo tanto, antes de importar las noticias, deberíamos crear los usuarios para poder establecer una relación en la importación.<br />
- No comento como configurar los campos, ya que en la documentación de los mismos creo que ya esta bien explicado. En caso de dudas, se puede comentar sin problema <img src='http://www.gerardguiu.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Ya tenemos la estructura de las noticias creada, como continuamos?</strong></p>
<p>Para una importación rápida y automática, nos crearemos un fichero .php que creara automáticamente todos los nodos del tipo noticia.<br />
Para que lo entendáis, el programa que crearemos, nos va a rellenar el nodo de noticias con los datos, y guardara el nodo, igual como si lo hiciésemos a mano.<br />
En este primer tutorial, solo vamos a hacer la importación de los tipos de texto ya que cada tipo de campo tiene sus propiedades distintas.</p>
<p><strong>Empezamos con el programa:</strong></p>
<div class="igBar"><span id="lphp-26"><a href="#" onclick="javascript:showPlainTxt('php-26'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-26">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$type</span>= ‘noticias’; <span style="color:#FF9933; font-style:italic;">// Definimos el tipo del contenido, en este caso, noticias.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$language</span> = ‘es’; <span style="color:#FF9933; font-style:italic;">// Definimos el lenguaje del nodo, en este caso español</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$user</span> = <span style="color:#CC66CC;color:#800000;">1</span> <span style="color:#FF9933; font-style:italic;">// El uid del usuario admin. Este campo puede ser cualquier uid de cualquier usuario. Nota: Este no es el id_usuario definido anteriormente. Este campo es el usuario creador del nodo.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Recogemos todos los datos de la base de datos de noticias</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$result</span> = <a href="http://www.php.net/mysql_query"><span style="color:#000066;">mysql_query</span></a><span style="color:#006600; font-weight:bold;">&#40;</span>‘select * from noticias ORDER BY id_noticia<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>!<span style="color:#0000FF;">$result</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> “Error al cargar datos de la base de datos\n”;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">while</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$news_data</span> =&amp;gt; <a href="http://www.php.net/mysql_fetch_object"><span style="color:#000066;">mysql_fetch_object</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$result</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Empezaremos por tratar los campos de tipo texto.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// NOTA: Vigilar en los campos de texto que la codificación de caracteres es la misma. En caso de no ser</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// la misma, deberíamos cambiar la codificación. Osea que si tenemos latin en la nueva debe ser latin, o en // todo caso, cambiar de latin a la nueva.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$titulo_nodo</span> = <a href="http://www.php.net/utf8_encode"><span style="color:#000066;">utf8_encode</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$news_data</span>-&amp;gt;titulo<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$desc_nodo</span> = <a href="http://www.php.net/utf8_encode"><span style="color:#000066;">utf8_encode</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$news_data</span>-&amp;gt;body<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$entradilla_campo</span> = <a href="http://www.php.net/utf8_encode"><span style="color:#000066;">utf8_encode</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$news_data</span>-&amp;gt;entradilla<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Definimos el nodo y le insertamos por defecto el parámetro del tipo de nodo, en nuestro caso, noticias.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$node</span> = <span style="color:#006600; font-weight:bold;">&#40;</span>object<span style="color:#006600; font-weight:bold;">&#41;</span><a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'type'</span> =&amp;gt; <span style="color:#0000FF;">$type</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#FF9933; font-style:italic;">// Importante, en drupal, el nodo es un objecto y como tal,</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//debemos tratarlo como un objeto.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$form_state</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#FF9933; font-style:italic;">// Array que contendrá la información del formulario.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Información Principal</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$form_state</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'values'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'title'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#0000FF;">$titulo_nodo</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$form_state</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'values'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'language'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#0000FF;">$language</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$form_state</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'values'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'status'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#CC66CC;color:#800000;">1</span>; <span style="color:#FF9933; font-style:italic;">// Si es 1. el nodo estará activo, 0 inactivo</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$form_state</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'values'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'name'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#0000FF;">$user</span>; <span style="color:#FF9933; font-style:italic;">// Id o nombre del usuario propietario del nodo.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$form_state</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'values'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'body'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#0000FF;">$desc_nodo</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// (todos estos parámetros son los que siempre deberán existir ya que contienen información necesaria para</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//la creación del nodo.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Campos del CCK.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$form_state</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'values'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'field_entradilla'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'value'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#0000FF;">$entradilla_campo</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Si nos fijamos en la estructura, siempre será mas o menos la misma: values =&amp;gt; nombre de campo =&amp;gt; value</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$form_state</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'values'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'op'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = t<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'Save'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#FF9933; font-style:italic;">// Le decimos a drupal que debe guardar el nodo.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">drupal_execute<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$type</span> .<span style="color:#FF0000;">'_node_form'</span>, <span style="color:#0000FF;">$form_state</span>, <span style="color:#0000FF;">$node</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#FF9933; font-style:italic;">// Esta función de drupal es la encargada de</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// ejecutar el formulario y tratar todos los datos contenidos.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// mas info: http://api.drupal.org/api/function/drupal_execute/6</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Comprobamos el resultado de la inserción</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$result</span> = form_set_error<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>!<a href="http://www.php.net/empty"><span style="color:#000066;">empty</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$result</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/print_r"><span style="color:#000066;">print_r</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$result</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Y con este primer código crearíamos todas las noticias con su titulo, entradilla y body.<br />
En el siguiente tutorial, vamos a insertar las fechas y si da tiempo, los usuarios relacionados.</p>
<p>Cualquier consulta, comentar en el post.</p>
<p><small>Este articulo ha sido escrito en <a title="Enbloger" href="../" target="_blank">enbloger.net </a>. </small></p>
<p><a href="http://sharethis.com/item?&wp=3.0.1&amp;publisher=a8621708-3ce8-4483-9842-17a4bb4796d3&amp;title=Importaci%C3%B3n+de+datos+en+drupal+%28I%29&amp;url=http%3A%2F%2Fwww.gerardguiu.com%2F2009%2F11%2Fimportacion-de-datos-en-drupal-i%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.gerardguiu.com/2009/11/importacion-de-datos-en-drupal-i/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Iphone: Mis Apps recomendadas(I)</title>
		<link>http://www.gerardguiu.com/2009/09/iphone-mis-apps-recomendadasi/</link>
		<comments>http://www.gerardguiu.com/2009/09/iphone-mis-apps-recomendadasi/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 18:16:15 +0000</pubDate>
		<dc:creator>Gerard</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.enbloger.net/?p=157</guid>
		<description><![CDATA[Ya llevo casi 4 meses con mi iphone 3GS y la verdad es que estoy muy contento de su compra. Lo que mas me gusta del aparatito es la sensación de tenerlo todo siempre encima y la comodidad de poder realizar tareas, como buscar información al momento o simplemente echarte a jugar un rato. De [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Iphone: Mis Apps recomendadas(I)", url: "http://www.gerardguiu.com/2009/09/iphone-mis-apps-recomendadasi/" });</script>]]></description>
			<content:encoded><![CDATA[<p>Ya llevo casi 4 meses con mi iphone 3GS y la verdad es que estoy muy contento de su compra. Lo que mas me gusta del aparatito es la sensación de tenerlo todo siempre encima y la comodidad de poder realizar tareas, como buscar información al momento o simplemente echarte a jugar un rato.</p>
<p>De todo esto, también destacar todas las aplicaciones que existen, y de entre las tropocientas aplicaciones que existen en la appstore, os dejo con mi listado de favoritas, que creo que no deberían faltar en vuestros iphones.</p>
<p><span id="more-157"></span></p>
<table border="0">
<tbody>
<tr>
<td><img class="alignleft size-full wp-image-158" title="aircam" src="http://www.enbloger.net/wp-content/uploads/2009/09/aircam.png" alt="aircam" width="57" height="57" /></td>
<td><strong>Aircam</strong>: Tienes una WebCam en casa y quieres ver lo que pasa en ella? Esta app nos permite configurar la WebCam y ver lo que pasa en ella al momento. (Necesitaremos instalar el programa aircam soft en el ordenador donde este conectada la WebCam. El programa es gratuito).</td>
</tr>
<tr>
<td><img class="alignleft size-full wp-image-159" title="airmouse" src="http://www.enbloger.net/wp-content/uploads/2009/09/airmouse.png" alt="airmouse" width="57" height="57" /></td>
<td><strong>Airmouse</strong>: Podremos usar el iphone de ratón. Tan solo debemos tener en la misma red local un ordenador y el iphone. (El ordenador host necesitara instalarse el programa airmouse, gratuito por cierto).</td>
</tr>
<tr>
<td><img class="alignleft size-full wp-image-160" title="airsharing" src="http://www.enbloger.net/wp-content/uploads/2009/09/airsharing.png" alt="airsharing" width="57" height="57" /></td>
<td><strong>Air Sharing</strong>: Necesitas tener a mano los documentos de tu pc/mac siempre encima? Con air sharing, podremos acceder siempre a ellos desde el iphone.</td>
</tr>
<tr>
<td valign="top"><img class="alignleft size-full wp-image-161" style="margin-top: 0px; margin-bottom: 0px;" title="aroundMe" src="http://www.enbloger.net/wp-content/uploads/2009/09/aroundMe.png" alt="aroundMe" width="60" height="59" /></td>
<td><strong>AroudMe</strong>: Nos informa de todo lo que tenemos a nuestro alrededor(bares, restaurantes, farmacias, etc)</p>
<p style="text-align: center;"><img class="size-full wp-image-162 aligncenter" title="aroundMe_app" src="http://www.enbloger.net/wp-content/uploads/2009/09/aroundMe_app.jpg" alt="aroundMe_app" width="207" height="310" /></p>
</td>
</tr>
<tr>
<td><img class="alignleft size-full wp-image-163" title="bustamove" src="http://www.enbloger.net/wp-content/uploads/2009/09/bustamove.png" alt="bustamove" width="57" height="57" /></td>
<td><strong>Bust A Move</strong>: Clásico juego de colocar 3 bolas del mismo color juntas. Adictivo 100%.</td>
</tr>
<tr>
<td valign="top"><img class="alignleft size-full wp-image-164" title="cameraGenius" src="http://www.enbloger.net/wp-content/uploads/2009/09/cameraGenius.png" alt="cameraGenius" width="57" height="57" /></td>
<td><strong>Camera Genius</strong>: Lo que debería ser la cámara del iphone i no es. Dota la cámara de zoom i diferentes efectos de fotografía.</p>
<p style="text-align: center;"><img class="size-medium wp-image-167 aligncenter" title="genius" src="http://www.enbloger.net/wp-content/uploads/2009/09/genius-200x300.jpg" alt="genius" width="200" height="300" /></p>
</td>
</tr>
<tr>
<td><img class="alignleft size-full wp-image-165" title="cocina" src="http://www.enbloger.net/wp-content/uploads/2009/09/cocina.png" alt="cocina" width="62" height="61" /></td>
<td><strong>Canal Cocin</strong>a : Te faltan ideas a la hora de prepararte la comida? Con esta app tendremos recetas para el infinito y mas allá.</td>
</tr>
<tr>
<td><img class="alignleft size-full wp-image-166" title="evernote-app" src="http://www.enbloger.net/wp-content/uploads/2009/09/evernote-app.jpg" alt="evernote-app" width="64" height="64" /></td>
<td><strong>Evernote</strong>: Gestionas proyectos, o simplemente cuando tienes una idea no tienes papel donde apuntarla y se te termina olvidando? Evernote, es tu solución. Además, podremos acceder a todas las notas a través de Internet, en la web de evernote. (requiere estar registrados a la web)</td>
</tr>
<tr>
<td><img class="alignleft size-full wp-image-168" title="goal" src="http://www.enbloger.net/wp-content/uploads/2009/09/goal.png" alt="goal" width="57" height="57" /></td>
<td><strong>Goooal</strong>: Quieres estar al caso de los resultados de tus equipos favoritos de futbol? Instala Goooal, inserta los equipos que quieras hacer un seguimiento y el programa te avisa via push cuando se marque un gol.</td>
</tr>
<tr>
<td><img class="alignleft size-full wp-image-170" title="guitartoolkit" src="http://www.enbloger.net/wp-content/uploads/2009/09/guitartoolkit.png" alt="guitartoolkit" width="57" height="57" /></td>
<td><strong>GuitarToolkit</strong>: Tocas la guitarra? Esta app no te puede faltar!. Dispone de un metrónomo, afinador y además un apartado donde ver todos los acordes.</td>
</tr>
<tr>
<td valign='top'><img class="alignleft size-full wp-image-171" title="monkey_island" src="http://www.enbloger.net/wp-content/uploads/2009/09/monkey_island.png" alt="monkey_island" width="57" height="57" /></td>
<td><strong>Monkey Island</strong>: Una versión renovada de la clásica aventura grafica de Lucas Arts.(tiene la posibilidad de jugar la versión clásica, para los mas nostálgicos)</p>
<p><img class="aligncenter size-medium wp-image-172" title="monkeyIsland" src="http://www.enbloger.net/wp-content/uploads/2009/09/monkeyIsland-300x198.jpg" alt="monkeyIsland" width="300" height="198" /></td>
</tr>
<tr>
<td valign='top'><img class="alignleft size-full wp-image-174" title="oldbooth" src="http://www.enbloger.net/wp-content/uploads/2009/09/oldbooth.png" alt="oldbooth" width="57" height="57" /></td>
<td><strong>OldBooth</strong>: Quieres ver como serias 100 antes? Esta app te garantiza muchas risas.</p>
<p><img class="aligncenter size-medium wp-image-173" title="oldBooth" src="http://www.enbloger.net/wp-content/uploads/2009/09/oldBooth-208x300.jpg" alt="oldBooth" width="208" height="300" /></td>
</tr>
<tr>
<td><img class="alignleft size-full wp-image-175" title="realRacing" src="http://www.enbloger.net/wp-content/uploads/2009/09/realRacing.png" alt="realRacing" width="57" height="57" /></td>
<td><strong>Real Racing</strong>: Podria decirse que es el mejor  juego de coches de la appstore. Si te gustan los juegos de coches, no puede faltar en tu iphone.</td>
</tr>
<tr>
<td><img class="alignleft size-full wp-image-176" title="shazam" src="http://www.enbloger.net/wp-content/uploads/2009/09/shazam.png" alt="shazam" width="57" height="57" /></td>
<td><strong>Shazam</strong>: Has escuchado una canción y te ha hecho rabia no saber cual era? La próxima vez que te pase esto, abres Shazam, acercas el iphone al altavoz y el mismo te dirá canción, artista y muchos mas datos de esta.</td>
</tr>
<tr>
<td><img class="alignleft size-full wp-image-178" title="tomtom" src="http://www.enbloger.net/wp-content/uploads/2009/09/tomtom.png" alt="tomtom" width="57" height="57" /></td>
<td><strong>Tomtom</strong>: El navegador por excelencia. Aun así, comentar que el navegador navicon, también esta recomendado.</td>
</tr>
<tr>
<td><img class="alignleft size-full wp-image-179" title="vnc" src="http://www.enbloger.net/wp-content/uploads/2009/09/vnc.png" alt="vnc" width="57" height="57" /></td>
<td><strong>VNC</strong>: Conéctate remotamente al ordenador de casa desde el iphone.</td>
</tr>
</tbody>
</table>
<p>Estas serian algunas de las muchas aplicaciones útiles para tener instaladas en el iphone,  i para el uso diario, pero cada cual debería buscar las que vea mas adecuadas para su uso particular.<br />
Aun así, las mencionadas, las recomiendo 100%.<br />
En un próximo post (Mis Apps recomendadasII), comentaremos aplicaciones mas destacadas, dentro de la appstore y en cydia.</p>
<p><small>Este articulo ha sido escrito en <a title="Enbloger" href="../" target="_blank">enbloger.net </a>. </small></p>
<p><a href="http://sharethis.com/item?&wp=3.0.1&amp;publisher=a8621708-3ce8-4483-9842-17a4bb4796d3&amp;title=Iphone%3A+Mis+Apps+recomendadas%28I%29&amp;url=http%3A%2F%2Fwww.gerardguiu.com%2F2009%2F09%2Fiphone-mis-apps-recomendadasi%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.gerardguiu.com/2009/09/iphone-mis-apps-recomendadasi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Una alternativa gratis a gol tv y plus liga: Justin tv</title>
		<link>http://www.gerardguiu.com/2009/09/una-alternativa-gratis-a-gol-tv-y-plus-liga-justin-tv/</link>
		<comments>http://www.gerardguiu.com/2009/09/una-alternativa-gratis-a-gol-tv-y-plus-liga-justin-tv/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 13:21:22 +0000</pubDate>
		<dc:creator>Gerard</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.enbloger.net/?p=122</guid>
		<description><![CDATA[La liga de fútbol profesional ya ha empezado y con ella un nuevo lío televisivo. Ayer con el partido del barça-sporting, creo que se empezó a ver como será esta año las retransmisiones de los partidos… un desastre y un lio para los usuarios. Yo, como usuario que no dispongo del plus pero si de [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Una alternativa gratis a gol tv y plus liga: Justin tv", url: "http://www.gerardguiu.com/2009/09/una-alternativa-gratis-a-gol-tv-y-plus-liga-justin-tv/" });</script>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-144" title="liga-gol" src="http://www.enbloger.net/wp-content/uploads/2009/09/liga-gol1-300x125.jpg" alt="liga-gol" width="300" height="125" />La liga de fútbol profesional ya ha empezado y con ella un nuevo lío televisivo. Ayer con el partido del barça-sporting, creo que se empezó a ver como será esta año las retransmisiones de los partidos… un desastre y un lio para los usuarios.<br />
Yo, como usuario que no dispongo del plus pero si de un aparato de tdt, ah no! Espera! Que ahora necesito uno que tenga un ‘cam’ para tarjetas y no puedo ver gol tv …..<br />
Creo que como yo, estamos unos cuantos y la verdad,  veo un poco injusto ahora tener que comprar otro ‘trasto’ mas solo para ver el fútbol.<br />
Pues bueno, ante la necesidad de ver el partido de ayer, busque la manera de <strong>ver partidos en Internet</strong>. Ya había oído hablar de esto, pero nunca había tenido la necesidad de verlo por Internet.<br />
Si estáis como yo, y la próxima jornada queréis ver el partido, os dejo un pequeño <strong>tutorial </strong>de cómo lo hice:</p>
<p><span id="more-122"></span></p>
<p>Primero de todo instálate el navegador <a title="Firefox" href="www.mozilla-europe.org/es/firefox/" target="_blank">firefox</a>.  Si no lo tenias, a partir de ahora ya será tu nuevo navegador, te lo recomiendo 100%</p>
<p>Luego nos vamos a <a title="es.justin.tv" href="es.justin.tv" target="_self">justin tv</a>, a la categoría de <a title="deportes" href="es.justin.tv/directory/sports" target="_blank">deportes</a>. (Antes de empezar los partidos, ya veras que salen muchas retransmisiones, mira de seleccionar la que menos gente haya viendo o la que desees, no importa)</p>
<p>Ahora vendrá un problema. Si seleccionamos un partido, al cabo de un rato(1 min. mas o menos), nos saldrá un<strong> aviso</strong> que nos dirá  que si no somos usuarios Premium, no podemos ver mas este canal.</p>
<p><img class="size-full wp-image-128 alignnone" title="justin_premium" src="http://www.enbloger.net/wp-content/uploads/2009/09/justin_premium.jpg" alt="justin_premium" width="225" height="165" /></p>
<p>Que hacer ahora? Firefox nos ayudará <img src='http://www.gerardguiu.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Nos descargaremos el plugin para el firefox <a href="https://addons.mozilla.org/es-ES/firefox/addon/2464" target="_blank">FoxyProxy</a>.  FoxyProxy, es un plugin que nos permite navegar a través de un <a href="http://es.wikipedia.org/wiki/Proxy" target="_self">Proxy </a>que definamos nosotros, de esta forma, conseguiremos ‘engañar’ a Justin tv.</p>
<p>Vamos a la <a title="FoxyProxy" href="https://addons.mozilla.org/es-ES/firefox/addon/2464" target="_blank">pagina del plugin</a> y  hacemos clic al botón de ‘añadir a firefox’, luego nos lleva a otra pagina, donde le volvemos a hacer clic al botón de ‘<strong>añadir a firefox</strong>’. Seguidamente, nos saldrá un pop up donde deberemos presionar aceptar para instalar el plugin. Cuando la instalación llegue al final, le decimos que si, al reiniciar firefox. Si no te lo comenta, deberias <strong>reiniciar el navegador</strong> si o si <img src='http://www.gerardguiu.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<table border="0">
<tbody>
<tr>
<td><a href="http://www.enbloger.net/wp-content/uploads/2009/09/insertar_firefox1.jpg" rel="lightbox[122]"><img class="alignleft size-medium wp-image-124" title="insertar_firefox1" src="http://www.enbloger.net/wp-content/uploads/2009/09/insertar_firefox1-300x173.jpg" alt="insertar_firefox1" width="215" height="123" /></a></td>
<td><a href="http://www.enbloger.net/wp-content/uploads/2009/09/insertar_firefox2.jpg" rel="lightbox[122]"><img title="insertar_firefox2" src="http://www.enbloger.net/wp-content/uploads/2009/09/insertar_firefox2.jpg" alt="insertar_firefox2" width="202" height="114" /></a></td>
<td><a href="http://www.enbloger.net/wp-content/uploads/2009/09/instalar_plugin.jpg" rel="lightbox[122]"><img class="size-full wp-image-126 alignnone" title="instalar_plugin" src="http://www.enbloger.net/wp-content/uploads/2009/09/instalar_plugin.jpg" alt="instalar_plugin" width="190" height="119" /></a></td>
</tr>
</tbody>
</table>
<p>Bien ya tenemos instalado el plugin, vamos a configurarlo!</p>
<p>Vamos a herramientas – FoxyProxy – opciones</p>
<p><a href="http://www.enbloger.net/wp-content/uploads/2009/09/opcions_proxy.jpg" rel="lightbox[122]"><img class="alignnone size-medium wp-image-131" title="opcions_proxy" src="http://www.enbloger.net/wp-content/uploads/2009/09/opcions_proxy-300x115.jpg" alt="opcions_proxy" width="300" height="115" /></a></p>
<p>Hacemos un clic a ‘añadir nuevo proxy’ y aquí configuraremos un nuevo Proxy.</p>
<p><a href="http://www.enbloger.net/wp-content/uploads/2009/09/nou_proxy.jpg" rel="lightbox[122]"><img class="alignnone size-medium wp-image-130" title="nou_proxy" src="http://www.enbloger.net/wp-content/uploads/2009/09/nou_proxy-300x173.jpg" alt="nou_proxy" width="300" height="173" /></a><br />
Primero vamos a la pestaña ‘General’ y entramos un nombre para el nuevo Proxy y una pequeña descripción.</p>
<p><a href="http://www.enbloger.net/wp-content/uploads/2009/09/nombrar_proxy.jpg" rel="lightbox[122]"><img class="alignnone size-medium wp-image-129" title="nombrar_proxy" src="http://www.enbloger.net/wp-content/uploads/2009/09/nombrar_proxy-300x194.jpg" alt="nombrar_proxy" width="300" height="194" /></a><br />
Seguimos, y haces clic a la pestaña detalles. Aquí es donde tenemos que insertar el nuevo Proxy. Recomiendo <a title="Lista de proxys" href="http://www.proxy-list.net/transparent-proxy-lists.shtml" target="_self">esta pagina</a> donde podéis escoger el Proxy que queráis, aunque recomiendo que sea de sitios un poco remotos, del tipo, Canadá, Japón, etc. Aun así, yo os dejo uno que me ha funcionado de fabula:<br />
<strong>Proxy/IP: 174.142.24.201 y Port: 3128</strong></p>
<p><a href="http://www.enbloger.net/wp-content/uploads/2009/09/config_proxy.jpg" rel="lightbox[122]"><img class="alignnone size-medium wp-image-123" title="config_proxy" src="http://www.enbloger.net/wp-content/uploads/2009/09/config_proxy-300x191.jpg" alt="config_proxy" width="300" height="191" /></a><br />
Cuando esté entrado, guardamos y ya lo tenemos preparado! Solo nos quedara hacer una cosa, <strong>decirle al firefox que queremos navegar con el nuevo Proxy</strong>.</p>
<p>Para hacer esto, herramientas – FoxyProxy – ‘usar el Proxy anónimo para todas las direcciones’ (dice anónimo, por que le he insertado el nombre de anónimo)</p>
<p><a href="http://www.enbloger.net/wp-content/uploads/2009/09/seleccio_anonim.jpg" rel="lightbox[122]"><img class="alignnone size-medium wp-image-132" title="seleccio_anonim" src="http://www.enbloger.net/wp-content/uploads/2009/09/seleccio_anonim-300x35.jpg" alt="seleccio_anonim" width="300" height="35" /></a></p>
<p>Una vez aceptado los cambios, deberás ver en la parte inferior derecha del navegador algo del tipo ‘Foxyproxy: Anónimo’ o el nombre que le hayas puesto.<br />
<a href="http://www.enbloger.net/wp-content/uploads/2009/09/instalat.jpg" rel="lightbox[122]"><img class="alignnone size-full wp-image-127" title="instalat" src="http://www.enbloger.net/wp-content/uploads/2009/09/instalat.jpg" alt="instalat" width="300" height="49" /></a></p>
<p>Pues ya esta! Nos vamos de nuevo a justin tv y a disfrutar del fútbol!</p>
<p><strong>Nota</strong>, si  no te funciona, prueba otro Proxy hasta que logres encontrar uno que funcione bien, aunque que con el que he pasado, debería de funcionarte.</p>
<p><small>Este articulo ha sido escrito en <a title="Enbloger" href="http://www.enbloger.net" target="_blank">enbloger.net </a>. </small></p>
<p><strong>Editado</strong>: Algunos proxys anteriores pueden no funcionar, con lo cual, os dejo unos links para otras webs donde encontrareis mas proxys.<br />
* <a href="http://www.checkedproxylists.com/proxylist_high_anonymous_sep_22_13_47_58.html" target="_blank">high_anonymous proxy list</a><br />
* <a href="http://www.checkedproxylists.com/proxylist_full_sep_22_13_47_58.html" target="_blank">full proxy list</a><br />
* <a href="http://www.checkedproxylists.com/proxylist_us_sep_22_13_47_58.html" target="_blank">us proxy list<br />
</a> *<a href="http://www.checkedproxylists.com/proxylist_high_anonymous_us_sep_22_13_47_58.html" target="_blank"> high_anonymous_us proxy list</a><br />
* <a href="http://www.checkedproxylists.com/proxylist_anonymous_sep_22_13_47_58.html" target="_blank">anonymous proxy list</a><br />
* <a href="http://www.checkedproxylists.com/proxylist_port_80_sep_22_13_47_58.html" target="_blank">port_80 proxy list</a><br />
* <a href="http://www.checkedproxylists.com/proxylist_transparent_sep_22_13_47_58.html" target="_blank">transparent proxy list</a><br />
* <a href="http://www.checkedproxylists.com/proxylist_high_anonymous_80_sep_22_13_47_58.html" target="_blank">high_anonymous_80 proxy list</a><br />
* <a href="http://www.checkedproxylists.com/proxylist_port_8080_sep_22_13_47_58.html" target="_blank">port_8080 proxy list</a><br />
* <a href="http://www.checkedproxylists.com/proxylist_eu_sep_22_13_47_58.html" target="_blank">eu proxy list</a><br />
* <a href="http://www.checkedproxylists.com/proxylist_port_3128_sep_22_13_47_58.html" target="_blank">port_3128 proxy list</a><br />
*<a href="http://www.checkedproxylists.com/proxylist_socks_sep_22_13_47_58.html" target="_blank"> socks proxy list</a><br />
*<a href="http://www.checkedproxylists.com/proxylist_br_sep_22_13_47_58.html" target="_blank"> br proxy list</a><br />
*<a href="http://www.checkedproxylists.com/proxylist_ru_sep_22_13_47_58.html" target="_blank"> ru proxy list</a><br />
* <a href="http://www.checkedproxylists.com/proxylist_ssl_enabled_sep_22_13_47_58.html" target="_blank">ssl_enabled proxy list</a></p>
<p><a href="http://sharethis.com/item?&wp=3.0.1&amp;publisher=a8621708-3ce8-4483-9842-17a4bb4796d3&amp;title=Una+alternativa+gratis+a+gol+tv+y+plus+liga%3A+Justin+tv&amp;url=http%3A%2F%2Fwww.gerardguiu.com%2F2009%2F09%2Funa-alternativa-gratis-a-gol-tv-y-plus-liga-justin-tv%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.gerardguiu.com/2009/09/una-alternativa-gratis-a-gol-tv-y-plus-liga-justin-tv/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Crea guiones con celtx</title>
		<link>http://www.gerardguiu.com/2009/08/crea-guiones-con-celtx/</link>
		<comments>http://www.gerardguiu.com/2009/08/crea-guiones-con-celtx/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 14:49:59 +0000</pubDate>
		<dc:creator>Gerard</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.enbloger.net/?p=119</guid>
		<description><![CDATA[Después de las vacaciones ya volvemos de nuevo por aquí. Una de mis grandes aficiones es la magia. Desde pequeño siempre me ha encantado la magia. Todo lo que rodea un truco y toda la ilusión que desprende siempre me ha fascinado. Por que os cuento esto? Normalmente, si eres mago y haces algún que [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Crea guiones con celtx", url: "http://www.gerardguiu.com/2009/08/crea-guiones-con-celtx/" });</script>]]></description>
			<content:encoded><![CDATA[<p>Después de las vacaciones ya volvemos de nuevo por aquí.<br />
Una de mis grandes aficiones es la magia. Desde pequeño siempre me ha encantado la magia. Todo lo que rodea un truco y toda la ilusión que desprende siempre me ha fascinado. Por que os cuento esto?<br />
Normalmente, si eres mago y haces algún que otro bolo, te preparas una <strong>rutina</strong>. Yo tengo unas varias, dependiendo del tipo de publico, normal vaya.<br />
Todos mis guiones e ideas las escribia en un Word o documento de texto para luego ir ‘enlazando’ y creando un guión.<br />
Buscando encontré este programa <a href="http://celtx.com/" target="_blank">Celtx</a>.<br />
Celtx es un programa para <strong>crear guiones </strong>de películas, obras de teatro, libros, historietas, etc.<br />
Si eres mago o simplemente quieres realizar un guión, no lo dejes perder. Recomendado 100%.</p>
<p>Pd: Si no lo he dicho, el programa es gratuito.</p>
<p><a href="http://sharethis.com/item?&wp=3.0.1&amp;publisher=a8621708-3ce8-4483-9842-17a4bb4796d3&amp;title=Crea+guiones+con+celtx&amp;url=http%3A%2F%2Fwww.gerardguiu.com%2F2009%2F08%2Fcrea-guiones-con-celtx%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.gerardguiu.com/2009/08/crea-guiones-con-celtx/feed/</wfw:commentRss>
		<slash:comments>0</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! -->
