<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Cultura Digital#Blog</title>
	<atom:link href="http://www.blog.culturadigital.org/feed" rel="self" type="application/rss+xml" />
	<link>http://www.blog.culturadigital.org</link>
	<description>El Mar de las Infragancias</description>
	<pubDate>Thu, 15 May 2008 22:46:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Adios servicios de Google</title>
		<link>http://www.blog.culturadigital.org/actualidad/adios-servicios-de-google</link>
		<comments>http://www.blog.culturadigital.org/actualidad/adios-servicios-de-google#comments</comments>
		<pubDate>Thu, 15 May 2008 16:47:24 +0000</pubDate>
		<dc:creator>Covi</dc:creator>
		
		<category><![CDATA[Actualidad]]></category>

		<category><![CDATA[Internet]]></category>

		<category><![CDATA[adsense]]></category>

		<category><![CDATA[AEPD]]></category>

		<category><![CDATA[analytics]]></category>

		<category><![CDATA[google]]></category>

		<category><![CDATA[LOPD]]></category>

		<category><![CDATA[privacidad]]></category>

		<guid isPermaLink="false">http://www.blog.culturadigital.org/?p=354</guid>
		<description><![CDATA[Todos conocemos en mayor o menor medida el estado actual, a decir verdad genial en mi opinión respecto al consumidor y las normativas actuales tanto a nivel nacional como internacional, de las Políticas y Derechos respecto a la privacidad y datos de carácter personal.
Siempre me ha parecido increíble como, en los océanos de internet, los [...]]]></description>
			<content:encoded><![CDATA[<p>Todos conocemos en mayor o menor medida el estado actual, a decir verdad genial en mi opinión respecto al consumidor y las normativas actuales tanto a nivel nacional como internacional, de las Políticas y Derechos respecto a la privacidad y datos de carácter personal.</p>
<p>Siempre me ha parecido increíble como, en los océanos de internet, los sitios web se han pasado <em>por allí</em> una y otra vez tanto esta ley como muchas otras con temas sobre Copyrights, Derechos, etc&#8230;</p>
<p>Es decir&#8230; antes me quejaba mucho (sí, soy un poco talibán) de cómo algunos sitios web usaban descaradamente recursos de otro origen sin escrúpulo alguno y encima protegiendo los suyos propios con la fatídica frase que tanto morbo causa a quienes la usan: TODOS LOS DERECHOS RESERVADOS, o sólo porque quedaban bien el footer de su sitio.</p>
<p>Más tarde&#8230; empezaron a leerse prácticamente sólo cláusulas sobre los derechos del propietario&#8230; pero el usuario qué?, seguimos sin un puto derecho???. Pues la LOPD me parece, además de muy muy necesaria, genial porque:<br />
Primero&#8230; debes avisarme que recoges datos sobre mí en mi acceso a tu sitio, debes informarme de quien exactamente los recoge, qué recoge, para qué los quiere y a quien se los cede. Eso mínimo antes de establecer tu derecho a &#8220;banearme del sitio por mi IP&#8221;&#8230; porque, aunque solo me banearon una vez cuando mis hormonas eran mucho más jóvenes, el que puede banear tu servidor soy yo denunciándote a la AEPD&#8230; así están las cosas y realmente están cojonudas en mi opinión.</p>
<p>Por eso&#8230; y aunque he intentado cumplir con todas las obligaciones que hoy en día conlleva tener un sitio web respecto a la ley y en concreto a la Ley de Protección de Datos de Carácter Personal, dejo de usar los servicios de google en este sitio web porque no estoy seguro si puedo garantizar esa privacidad.</p>
<p>Es decir&#8230; si debo ceder dichos registros a google, pese a su cláusula de condiciones de uso y de tratamiento de datos, <strong>no puedo asegurarme que no los usen adecuadamente o de que ese uso cumpla la normativa vigente actual</strong>.<br />
Aquí tenéis una información que personalmente agradezco un montón (pues tengo que llamar en relación a otro proyecto) ya me parece fundamental a la hora de conocer <strong>qué son realmente los &#8220;datos personales</strong>&#8220;, o en todo caso, qué dice la ley de ellos.<br />
<a href="http://clotet.wordpress.com/2008/01/29/respuesta-de-la-agpd-sobre-el-uso-de-analitica-web-en-mi-banco/">Una carta recibida por clotet en wordpress.com de la AEPD en este sentido</a>.</p>
<p>Así que perfiero sinceramente, primero dejar de registrar datos que puedan ser susceptibles de ser privados y personales, y segundo, no cederlos a nadie.<br />
Adios por lo tanto a Adsense y Analytics&#8230; bah, tampoco es tan malo <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.culturadigital.org/actualidad/adios-servicios-de-google/feed</wfw:commentRss>
		</item>
		<item>
		<title>Wordpress 2.5 RC1 por fin!</title>
		<link>http://www.blog.culturadigital.org/desarrollo-web/wordpress-25-rc1-por-fin</link>
		<comments>http://www.blog.culturadigital.org/desarrollo-web/wordpress-25-rc1-por-fin#comments</comments>
		<pubDate>Sat, 22 Mar 2008 07:35:49 +0000</pubDate>
		<dc:creator>Covi</dc:creator>
		
		<category><![CDATA[Desarrollo Web]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.blog.culturadigital.org/desarrollo-web/wordpress-25-rc1-por-fin</guid>
		<description><![CDATA[Bueno&#8230; parece que ya se acerca algo más la esperadísima 2.5 de Wordpress con su flamante nuevo Panel de Control.
Personalmente no me he podido resistir y ya la estoy probando en local, a decir verdad, tremenda y gratamente sorprendido, muy en parte por dos de los alicientes que esperaba con más ganas:

La nueva Media Library
La [...]]]></description>
			<content:encoded><![CDATA[<p>Bueno&#8230; parece que <a href="http://wordpress.org/development/2008/03/25-sneak-peek/">ya se acerca</a> algo más la esperadísima 2.5 de Wordpress con su flamante nuevo Panel de Control.</p>
<p>Personalmente no me he podido resistir y ya la estoy probando en local, a decir verdad, tremenda y gratamente sorprendido, muy en parte por dos de los alicientes que esperaba con más ganas:</p>
<ul>
<li>La nueva Media Library</li>
<li>La gestión de los Feeds a incluir.</li>
</ul>
<p>Aunque ya estaba bastante harto de ver capturas del &#8220;impresionante&#8221; nuevo Panel de Control mis preferencias iban, como vengo comentando desde hace algún tiempo, a las funcionalidades en torno a aprovechar Wordpress como CMS. Y sin duda, una de ellas era el tema de la <strong>Biblioteca de archivos</strong> (Media Library) en donde encontramos una sustancial mejora en la gestión de estos.</p>
<p>Aunque seguimos sin poder superar la barrera del tamaña máximo para carga vía formularios, ahora (creo) podemos enlazar nuestros adjuntos directamente, así que evitamos la tediosa, en mi opinión, tarea de tener que usar plugins de descargas, etc.<br />
Si pretendes tener un CMS, esto realmente se convierte en un pequeño inconveniente que has de solucionar con pericpecias miles como en mi caso: enlazando archivos de imagen con PDF&#8217;s de gran tamaño por ejemplo.</p>
<p>La segunda parte, los feeds, lo cierto es que era algo que costaba creer que siguiera tal y como estaba (sobre todo por el gran número de buenas y sólidas librerías que ya existen: simplepie, la clase XML del Framework Ister, simpleXML para php5, DOMXML&#8230; ).<br />
Los feeds a través de Widgets se limitaban a listar sólo con títulos una cantidad determinada de items&#8230; no había control alguno más: Un URL y una cantidad.</p>
<p>Ahora podemos enlazar <strong>nuestros propios feeds</strong> (que aún no entiendo porque me fallaba esto antes), establecer un número a decir verdad bastante <strong>amplio de items</strong> (hasta 15) y en cada una de nuestras sidebars o, en todo caso, espacio para Widgets y lo más importante: <strong>mostrar el contenido</strong> de estos dando a nuestro sitio la posibilidad de enriquecerse y alimentarse realmente.</p>
<h4>Futuro muy esperanzador</h4>
<p>Todo esto unido a una mejora en usabilidad de toda la interfaz y hasta ahí lo que he visto en apenas unas horas.<br />
Por mi parte espero, no sé si ya hay algo de esto, la mejora de las etiquetas para las entradas, por ejemplo con &#8220;suggest&#8221;, la mejora de la gestión de los ya conocidos metadatos de los posts, el sistema de navegación en páginas, categorías e incluso etiquetas: ahora mismo es algo frustrante intentar llegar a más de 1 nivel de padres para Páginas&#8230; que en un CMS son las más (Secciones) en oposición a las Entradas o lo que serían las Noticias.</p>
<p>Además, algo con lo que vengo peleando desde hace tiempo entre la comunidad de desarrolladores de plugins:<br />
Realmente, el <strong>sistema de plugins debe ser mejorado</strong>.<br />
Lo peor de &#8220;sugerir&#8221; mejoras a quien desarrolla una aplicación o mini-aplicación es que casi nunca se lo toma bien <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
Pero&#8230; de verdad que me dan picores <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /> cuando veo las inyecciones de código de los plugins de Wordpress&#8230; tanto trabajo cuesta restringir un poco la inyección???<br />
Siempre comento lo mismo:<br />
10 Plugins, cada uno con su CSS, su JS y hasta el copón divino&#8230; ale, todo en la Home por ejemplo sin, quizá, hacer falta.</p>
<p>Bien es cierto que cada plugin es un mundo:<br />
Algunos incorporan Widgets, otros código a bola, algunos se dirigen a secciones en concreto y otros en general&#8230; bien, pues si por ello es difícil que el desarrollador lo optimize Wordpress debería ir sentando unas pautas de trabajo en ese sentido:<br />
Clasificando plugins según a donde vayan dirigidos, etc.</p>
<p>Ultimamente veo que prácticamente la solución es DOM y JavaScript: para detectar código HTML que genere el plugin e incluir en consecuencia scripts y demás&#8230;. pero en otras ocasiones es evitable. Por ejemplo en plugins que solo trabajen en una página y sus hijos o en Widgets a través de funciones como: <code class="noblock">is_active_widget()</code>.</p>
<p>En fin&#8230; ^^</p>
<h4>Descarga</h4>
<p>Se puede descargar ya la RC1 desde el repositorio de versiones:<br />
<a href="http://wordpress.org/download/release-archive/">http://wordpress.org/download/release-archive/</a></p>
<p>PD: Por cierto, estoy hasta los cojones de Sync (<em>uno de otros tantos motivos de la dejadez del blog</em>), esto va como el culo, este año me mudo pero vamos&#8230;, sin duda alguna, nada recomendable por si interesa a alguien <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.culturadigital.org/desarrollo-web/wordpress-25-rc1-por-fin/feed</wfw:commentRss>
		</item>
		<item>
		<title>Jticker para JQuery, mejorado</title>
		<link>http://www.blog.culturadigital.org/desarrollo-web/jticker-para-jquery-mejorado</link>
		<comments>http://www.blog.culturadigital.org/desarrollo-web/jticker-para-jquery-mejorado#comments</comments>
		<pubDate>Sun, 16 Mar 2008 14:38:05 +0000</pubDate>
		<dc:creator>Covi</dc:creator>
		
		<category><![CDATA[Desarrollo Web]]></category>

		<category><![CDATA[Programación]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[AJAX]]></category>

		<category><![CDATA[jquery]]></category>

		<category><![CDATA[jticker]]></category>

		<guid isPermaLink="false">http://www.blog.culturadigital.org/desarrollo-web/jticker-para-jquery-mejorado</guid>
		<description><![CDATA[Jticker es un &#8220;plugin&#8221; que usa JQuery (como ya quizá sea más que notable: la librería JavaScript de mis amores), sencillo, limpio y eficaz para mostrar un canal RSS o XML en todo caso en tu sitio web usando un par de efectos prácticamente.
Como digo es un plugin sencillo, limpio y eficaz&#8230; así que no [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jasons-toolbox.com/JTicker/">Jticker</a> es un &#8220;plugin&#8221; que usa <a href="http://jquery.com/">JQuery</a> (como ya quizá sea más que notable: la librería JavaScript de mis amores), sencillo, limpio y eficaz para mostrar un canal RSS o XML en todo caso en tu sitio web usando un par de efectos prácticamente.<br />
Como digo es un plugin sencillo, limpio y eficaz&#8230; así que no le hace falta mucho más ya que hay otras opciones si quieres algo más sofisticado, además es muy personalizable a nivel de opciones o si le metes mano al código&#8230; como he hecho yo <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /> </p>
<p>En este caso,&#8230; lo cierto es que he perdido un poco (no uso SVN ni nada parecido para esto ^^) el hilo de mis modificaciones pero, la más importante por decirlo de alguna manera, es una opción que en mi opinión considero bastante relevante, que es la posibilidad de decidir sobre<br />
<strong>Mostrar la descripción de cada Item o no</strong></p>
<p>Así, ahora añadiremos al script dicha opción:<br />
1. Primero, añadiremos el parámetro a la función:<br />
Inicio del Script, variable opciones:</p>
<p>Añadimos el parámetro: <code class="noblock">showdesc: false,</code></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code"><pre class="javascript">	<span style="color: #009900; font-style: italic;">// TODO: Remove the newwindow option</span>
	<span style="color: #003366; font-weight: bold;">var</span> options = <span style="color: #66cc66;">&#123;</span>
	TickerID: <span style="color: #3366CC;">&quot;&quot;</span>,
	delay: <span style="color: #CC0000;">1000</span>,
	newwindow: <span style="color: #003366; font-weight: bold;">false</span>,
	showdesc: <span style="color: #003366; font-weight: bold;">false</span>,
	url: <span style="color: #3366CC;">&quot;tickerdata.xml&quot;</span>,
	transition: <span style="color: #3366CC;">&quot;slide&quot;</span>,
	speed: <span style="color: #3366CC;">&quot;slow&quot;</span>,
	contentcounter: <span style="color: #CC0000;">-1</span>,
	ArrayIndex: <span style="color: #CC0000;">-1</span>,
	dataXML: <span style="color: #66cc66;">&#123;</span>
<span style="color: #66cc66;">&#125;</span>,</pre></td></tr></table></div>

<p>Para después dejar los parámetros de inyección del HTML de la siguiente manera:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
</pre></td><td class="code"><pre class="javascript"><span style="color: #000066; font-weight: bold;">Item</span> = $<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;item&quot;</span>, options.<span style="color: #006600;">dataXML</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">get</span><span style="color: #66cc66;">&#40;</span>options.<span style="color: #006600;">contentcounter</span><span style="color: #66cc66;">&#41;</span>;
Title = $<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;title&quot;</span>, <span style="color: #000066; font-weight: bold;">Item</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">text</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
URL = $<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;link&quot;</span>, <span style="color: #000066; font-weight: bold;">Item</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">text</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
Desc = $<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;description&quot;</span>, <span style="color: #000066; font-weight: bold;">Item</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">text</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
TickerHTML = <span style="color: #3366CC;">'&lt;div class=&quot;JTickerTitle&quot;&gt;&lt;strong class=&quot;yellow&quot;&gt;Noticias:&lt;/strong&gt; &lt;a href=&quot;'</span> + URL + <span style="color: #3366CC;">'&quot;'</span>;
&nbsp;
<span style="color: #009900; font-style: italic;">// Options:</span>
<span style="color: #009900; font-style: italic;">// TODO: Remove this attribute!</span>
<span style="color: #009900; font-style: italic;">// New Window Option: Deprecated by Covi Mod, Not Accesible! and no valid to Standars Compliance W3C.</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>options.<span style="color: #006600;">newwindow</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	TickerHTML += <span style="color: #3366CC;">' target=&quot;_blank&quot;'</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #009900; font-style: italic;">// Description Option:</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>options.<span style="color: #006600;">showdesc</span> == <span style="color: #003366; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	TickerHTML += <span style="color: #3366CC;">' title=&quot;'</span> + Desc + <span style="color: #3366CC;">'&quot;&gt;'</span> + Title + <span style="color: #3366CC;">'&lt;/a&gt;&lt;/div&gt;'</span>;
<span style="color: #66cc66;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #66cc66;">&#123;</span>
	TickerHTML += <span style="color: #3366CC;">' title=&quot;Leer la noticia completa: '</span>+ Title +<span style="color: #3366CC;">'&quot;&gt;'</span> + Title + <span style="color: #3366CC;">'&lt;/a&gt;&lt;/div&gt;&lt;div&gt;'</span> + Desc + <span style="color: #3366CC;">'&lt;/div&gt;'</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #009900; font-style: italic;">// End Options.</span></pre></td></tr></table></div>

<p>Lo que hacemos simplemente es cambiar el código original (que era el último <code class="noblock">else</code> sin sentencias) para añadir la sentencia e inyectar un código u otro según la opción para la mostrar la descripción (<code class="noblock">showdesc</code>).</p>
<p>En mi caso, he optado por incluir la descripción en el atributo title del vínculo.<br />
Y&#8230; me queda también eliminar la opción de nueva ventana con el atributo no accesible e intrusivo <code class="noblock">target="_blank"</code>, recordemos que nuestra obligación en estos tiempos de la web es:<br />
&#8220;<strong>devolver el control al usuario</strong>&#8220;, es decir, que él mismo decida si quiere o no &#8220;<strong>abrir el enlace en una nueva ventana</strong>&#8221; (Ver primer nota inferior).</p>
<p>El uso, en mi caso, sería el siguiente:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="javascript"><span style="color: #66cc66;">&lt;</span>script type=<span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #66cc66;">&gt;</span>
	<span style="color: #009900; font-style: italic;">//&lt;![CDATA[</span>
	<span style="color: #009900; font-style: italic;">// Inicializando JQuery con documento renderizado:</span>
	$<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>
		<span style="color: #009900; font-style: italic;">// Ticker News RSS:</span>
		$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;#news_ticker&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">jticker</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span>
			delay: <span style="color: #CC0000;">10000</span>,
			showdesc: <span style="color: #003366; font-weight: bold;">false</span>, <span style="color: #009900; font-style: italic;">// Forcing not show the description.</span>
			url: <span style="color: #3366CC;">&quot;tickerdata.xml&quot;</span>,
			transition: <span style="color: #3366CC;">&quot;fade&quot;</span>,
			speed: <span style="color: #CC0000;">500</span>
		<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066FF;">/	/</span> Fin JQuery
<span style="color: #009900; font-style: italic;">//]]&gt;</span>
<span style="color: #66cc66;">&lt;/</span>script<span style="color: #66cc66;">&gt;</span></pre></td></tr></table></div>

<p><em>Nota 1</em>: Para el tema de accesibilidad y JavaScript no intrusivo podemos usar JQuery o CSS 2.1 como ya <a href="http://www.blog.culturadigital.org/desarrollo-web/accesibilidad-y-jquery-todos-los-enlaces-con-titulo">he comentado en otras ocasiones</a>:<br />
Un ejemplo sería, el ya comentado selector de CSS para vínculos externos, donde además uso una clase estándar de CSS para los navegadores sin soporte +CSS2.1 (<code class="noblock">.post a.external</code>):</p>
<p>(Nota: Es obvio que se puede o debe omitir la clase <code class="noblock">.post</code>):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="css"><span style="color: #cc00cc;">#content</span> <span style="color: #6666ff;">.post</span> a<span style="color: #66cc66;">&#91;</span>href^=<span style="color: #ff0000;">&quot;http:&quot;</span><span style="color: #66cc66;">&#93;</span>, <span style="color: #6666ff;">.post</span> a<span style="color: #6666ff;">.external</span> <span style="color: #66cc66;">&#123;</span>
	padding-right<span style="color: #3333ff;">:<span style="color: #933;">16px</span></span><span style="color: #66cc66;">;</span>
	background<span style="color: #3333ff;">:url</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;img/external.gif&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #66cc66;">;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/* Internos, anulamos: */</span>
<span style="color: #cc00cc;">#content</span> <span style="color: #6666ff;">.post</span> a<span style="color: #66cc66;">&#91;</span>href^=<span style="color: #ff0000;">&quot;http://culturadigital.org&quot;</span><span style="color: #66cc66;">&#93;</span>, <span style="color: #cc00cc;">#content</span> <span style="color: #6666ff;">.post</span> a<span style="color: #66cc66;">&#91;</span>href^=<span style="color: #ff0000;">&quot;http://www.culturadigital.org&quot;</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">&#123;</span>
	padding-right<span style="color: #3333ff;">:<span style="color: #933;">0px</span></span><span style="color: #66cc66;">;</span>
	background<span style="color: #3333ff;">:none</span><span style="color: #66cc66;">;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>Con JQuery es igual o más sencillo puesto que también usa <a href="http://es.wikipedia.org/wiki/Xpath">XPath</a> y las posibilidades son tan abrumadoras como divertidas:<br />
Imaginemos que tenemos una clase para vínculos en otro idioma (xml:lang debería ser un atributo obligatorio en relación a la accesibilidad):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="javascript"><span style="color: #009900; font-style: italic;">// Idiomas, icono para identificar el enlace más texto:</span>
$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'a'</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>index<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> $this = $<span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #003366; font-weight: bold;">var</span> languageLink = $this.<span style="color: #006600;">attr</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;xml:lang&quot;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>languageLink == <span style="color: #3366CC;">'en'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</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;">addClass</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;ukLink&quot;</span><span style="color: #66cc66;">&#41;</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;">attr</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span> title: <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">title</span> + <span style="color: #3366CC;">&quot;, en inglés&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>De esta manera añadimos la clase a los vínculos con el atributo de lenguaje en inglés&#8230; igualmente, pero mucho más pesado y complicado, sería intentar mediante PHP obtener el idioma del vínculo enlazado y añadir el atributo de lenguaje oportuno&#8230; pero se imagina, no?, pesadísimo chequear todos los vínculos de un documento y encima enlazar a ellos para comprobar su lenguaje.</p>
<p>En mi opinión es mejor establecer tu lenguaje predefinido para todo el sitio e informar de los vínculos en otro idioma&#8230;, es lo lógico.</p>
<p>Bien, el ejemplo anterior <strong>es la misma técnica para usar con enlaces externos</strong> (añadir la clase <code class="noblock">external</code> dependiendo del atributo <code class="noblock">href -> $(this).attr("href");</code>), así informamos e damos la posibilidad al usuario de decidir qué hacer sobre ese vínculo externo.</p>
<p><em>Nota 2</em>: El blog lo tengo bastante descuidado <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> pero en <a href="http://www.laguardiadejaen.com/web/">el sitio web que llevo</a> se pueden encontrar muchos ejemplos como éste, de accesibilidad, de JavaScript, Ajax y en concreto JQuery y de cómo convertir Wordpress en un CMS en toda regla <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>PD: Me hubiera gustado <a href="http://www.jasons-toolbox.com/?p=84">comunicarlo al autor</a> pero el registro en su blog no va y no hay otro medio de contacto, al menos, yo no lo he encontrado <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.culturadigital.org/desarrollo-web/jticker-para-jquery-mejorado/feed</wfw:commentRss>
		</item>
		<item>
		<title>Jaén, como siempre, en el culo del&#8230; yo que sé</title>
		<link>http://www.blog.culturadigital.org/actualidad/jaen-como-siempre-en-el-culo-del-yo-que-se</link>
		<comments>http://www.blog.culturadigital.org/actualidad/jaen-como-siempre-en-el-culo-del-yo-que-se#comments</comments>
		<pubDate>Tue, 26 Feb 2008 10:49:46 +0000</pubDate>
		<dc:creator>Covi</dc:creator>
		
		<category><![CDATA[Actualidad]]></category>

		<category><![CDATA[Desarrollo Web]]></category>

		<category><![CDATA[Internet]]></category>

		<category><![CDATA[accesibilidad]]></category>

		<category><![CDATA[estándares]]></category>

		<category><![CDATA[jaén]]></category>

		<category><![CDATA[marcado-basura]]></category>

		<category><![CDATA[paraíso-interior]]></category>

		<category><![CDATA[turismo]]></category>

		<guid isPermaLink="false">http://www.blog.culturadigital.org/actualidad/jaen-como-siempre-en-el-culo-del-yo-que-se</guid>
		<description><![CDATA[En fin&#8230; no pretendo escribir nada extenso, es más bien de lo que, en teoría, se supone que en principio se componía un blog: simples anotaciones breves.
El hecho es que me siento impotente al ver tanta y tanta &#8220;web de pacotilla&#8221; relacionada con Jaén o con la zona, exceptuando los sitios oficiales de la Junta [...]]]></description>
			<content:encoded><![CDATA[<p>En fin&#8230; no pretendo escribir nada extenso, es más bien de lo que, en teoría, se supone que en principio se componía un blog: simples anotaciones breves.</p>
<p>El hecho es que me siento impotente al ver tanta y tanta &#8220;web de pacotilla&#8221; relacionada con Jaén o con la zona, exceptuando los sitios oficiales de la Junta los cuales, casi todos, a decir verdad, &#8220;se salen&#8221; en casi todos los aspectos: volumen de información, calidad, atención al usuario, accesibilidad, semántica, estándares&#8230; los sitios que tratan sobre Jaén dan, primero pena y luego hasta un poco de asco.</p>
<p>Sitios turísticos con un gran volumen de acceso -imagino- hechos en Flash por completo y además inaccesible, agendas culturales cuyo texto son imágenes, en ASP e IIS (no por nada pero es una imagen bastante ilustrativa), botones de imágen, roll-over en JavaScript (sí, por increíble que parezca, sí).<br />
Pero lo más asombroso es lo sencillo que es implementar un sistema de suscripción en XML (ya sea RSS, Atom, lo que seaaa! <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> )&#8230;. y macho, no hay ni uno! (al margen de la web del Ayuntamiento creo).</p>
<p>O sea&#8230;. la web típica de los 90 ( <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /> ) o así, pfffff, que vergüenza por Dios, vaya empresas y a lo que voy: como no?, tenía que ser aquí, en Jaén <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> , pfffff. En fin.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.culturadigital.org/actualidad/jaen-como-siempre-en-el-culo-del-yo-que-se/feed</wfw:commentRss>
		</item>
		<item>
		<title>Miami Vice#como diría&#8230;</title>
		<link>http://www.blog.culturadigital.org/cine/miami-vicecomo-diria</link>
		<comments>http://www.blog.culturadigital.org/cine/miami-vicecomo-diria#comments</comments>
		<pubDate>Sun, 10 Feb 2008 10:58:31 +0000</pubDate>
		<dc:creator>Covi</dc:creator>
		
		<category><![CDATA[Cine]]></category>

		<category><![CDATA[Citas]]></category>

		<category><![CDATA[Crockett]]></category>

		<category><![CDATA[miami-vice]]></category>

		<category><![CDATA[Michael Mann]]></category>

		<category><![CDATA[Trudy]]></category>

		<guid isPermaLink="false">http://www.blog.culturadigital.org/cine/miami-vicecomo-diria</guid>
		<description><![CDATA[Como diría Trudy: &#8220;No estoy jugando&#8221;
Sony Crockett

Miami Vice#2006 - Michael Mann
Listening: &#8220;Who are You&#8221; - John Murphy &#038; &#8220;Wide Awake&#8221; - AudioSlam.
]]></description>
			<content:encoded><![CDATA[<blockquote><p>Como diría Trudy: &#8220;No estoy jugando&#8221;<br />
<em class="x-small">Sony Crockett</em></p></blockquote>
<p><a href='http://www.blog.culturadigital.org/cine/miami-vicecomo-diria/truddy-joplyn/' rel='attachment wp-att-350' title='Truddy Joplyn'><img src='http://www.blog.culturadigital.org/wp-content/photos/2008/02/trudyjoplin.jpg' alt='Truddy Joplyn' class="centered_noborder" /></a><br />
<a href="http://www.imdb.com/title/tt0430357/" title="Enlace a la magistral Miami Vice de Michael Mann en IMDB">Miami Vice#2006 - Michael Mann</a><br />
<strong>Listening:</strong> &#8220;<em>Who are You</em>&#8221; - John Murphy &#038; &#8220;<em>Wide Awake</em>&#8221; - AudioSlam.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.culturadigital.org/cine/miami-vicecomo-diria/feed</wfw:commentRss>
		</item>
		<item>
		<title>Wordpress como CMS#1</title>
		<link>http://www.blog.culturadigital.org/desarrollo-web/wordpress-como-cms1</link>
		<comments>http://www.blog.culturadigital.org/desarrollo-web/wordpress-como-cms1#comments</comments>
		<pubDate>Tue, 05 Feb 2008 13:52:06 +0000</pubDate>
		<dc:creator>Covi</dc:creator>
		
		<category><![CDATA[Desarrollo Web]]></category>

		<category><![CDATA[metadatos]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.blog.culturadigital.org/desarrollo-web/conviertiendo-wordpress-en-un-cms1</guid>
		<description><![CDATA[Bien, esta pretenderá ser la primera parte de una serie de post en los que explico mi experiencia en el intento, a decir verdad muy fructífero, de convertir o más bien usar Wordpress como un CMS, ya sabéis: &#8220;Content Management System&#8221; o para los más profanos: uno de esos que tanto os gustan Joomla o [...]]]></description>
			<content:encoded><![CDATA[<p>Bien, esta pretenderá ser la primera parte de una serie de post en los que explico mi experiencia en el intento, a decir verdad muy fructífero, de convertir o más bien usar Wordpress como un CMS, ya sabéis: &#8220;Content Management System&#8221; o para los más profanos: uno de esos que tanto os gustan Joomla o hace mucho tiempo PHP_Nuke&#8230; Post-Nuke, Xoops, Drupal, etc&#8230;</p>
<p>Se pueden encontrar algunas referencias de esta visión de Wordpress en la comunidad o buscando en google, por ejemplo, por &#8220;Wordpress as CMS&#8221; que creo es una referencia bastante importante.</p>
<p>Y es que como siempre he mencionado, en mi opinión Wordpress puede funcionar tanto o mejor que esos pesados sistemas gracias a su potencia y flexibilidad.</p>
<h4>Metadatos en los posts</h4>
<p>En este caso hablaremos de los poco conocidos <strong>meta-datos</strong> de las entradas y que Wordpress explota muchísimo de forma interna aunque a los usuarios se les suelen pasar desapercibidos. Por ejemplo, Wordpress los usa para saber los adjuntos (attachments) del post en particular junto a algunos plugins como reproductores de audio en Flash, etc&#8230;</p>
<p>Para probar los metadatos de tus entradas puedes intentar usar en tus plantillas o en los posts mismos (si puedes ejecutar PHP en ellos) la función <code class="noblock">the_meta();</code> por ejemplo así:</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span> the_meta<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Podéis leer la referencia del Codex de Wordpress <a href="http://codex.wordpress.org/Using_Custom_Fields">aquí</a></p>
<h4>Probémoslo</h4>
<p>Nosotros usaremos a continuación, describiremos un método algo trivial porqué no?, para proporcionar datos extra que no serán muy útiles desde otras funciones de nuestro CMS y más tarde un breve resumen de las posibilidades que ofrecen estos metadatos:</p>
<h5>Descripción de Páginas Estáticas</h5>
<p>La más trivial es el uso de una <strong>pequeña descripción para nuestras páginas estáticas</strong> que nos permitirá entre otras cosas situar dicha descripción en la parte que deseemos de nuestra plantilla de página por ejemplo. O usarla directamente en el texto de la entrada aunque yo recomendaría el uso de alguna plantilla para mantener la base de datos más limpia y que nuestras funciones partan desde sólo un origen: la plantilla, evitando posibles errores.</p>
<p>Lo que habría que hacer es incluir un metadato nuevo a la entrada, esto se hace desde el desplegable de la parte inferior (por defecto) llamado <strong>Campos Personalizados</strong>.<br />
Olvidaremos los metadatos existentes del desplegable <code class="noblock">Seleccionar</code> del Campo <code class="noblock">Clave</code> que no hayamos introducido nosotros (si nunca los usaste, todos ellos serán internos de Wordpress o de plugins).<br />
Agregaremos uno nuevo cuya Clave, ojo!, usaremos en todas nuestras entradas así que conviene pensarla bien pues será única para identificar esta funcionalidad o metadato. En mi caso la llamaré: <code class="noblock">PageDesc</code>.</p>
<p>Es decir:<br />
En Seleccionar no escogemos ninguno la primera vez.<br />
Luego introducimos nuestro nombre para la clave en Clave.<br />
Y, esto ya es en exclusiva para esta página, introducimos el valor de la clave PageDesc en mi caso.<br />
Por ejemplo:<br />
&#8220;Esta es la descripción de esta página.&#8221; (Se puede incluir HTML).</p>
<p>Bien, ya está <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> , ya hemos agregado un nuevo metadato PARA TODAS LAS ENTRADAS llamado PageDesc cuyo valor PARA ESTA ENTRADA es:<br />
&#8220;Esta es la descripción de esta página.&#8221;</p>
<p>Como vamos a mostrar ese metadato en la entrada?:<br />
Muy fácil, podemos listarlos todos con la función mencionada antes: <code class="noblock">the_meta();</code> que nos generará una lista HTML estándar, pero queremos sólo ese metadato, el PageDesc:<br />
Bien, pues tenemos varias funciones para ello desde recorrer el array de metadatos y seleccionar el que queramos hasta escoger la clave exacta que queremos de los metadatos, y esto haremos.</p>
<p>Generaremos, en la plantilla o el propio post, una variable que nos extraiga el metadato PageDesc (Para el fallo de la función uso simplemente <code class="noblock">the_title()</code>):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #ff0000">$PageDesc</span> <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000066;">function_exists</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'get_post_meta'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> ? get_post_meta<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$post</span><span style="color: #66cc66;">-&gt;</span><span style="color: #006600;">ID</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'PageDesc'</span><span style="color: #66cc66;">,</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">:</span> the_title<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Bien, ahora solo nos queda imprimirlo, como digo en la plantilla o por ejemplo en el propio post ^^!</p>
<p>En mi caso lo hago desde la plantilla de página estática: <code class="noblock">page.php</code> de la siguiente manera:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="xml">	<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!--story--&gt;</span></span>
&nbsp;
	<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Descipcion de pagina desde los metatags del post --&gt;</span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?php</span> $PageDesc = <span style="color: #66cc66;">&#40;</span>function_exists<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'get_post_meta'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> ? get_post_meta<span style="color: #66cc66;">&#40;</span>$post-<span style="font-weight: bold; color: black;">&gt;</span></span>ID, 'PageDesc', true) : the_title(); ?&gt;
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;p</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;page_desc&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?php</span> echo $PageDesc;<span style="font-weight: bold; color: black;">?&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/p<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;storycontent_page&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
&nbsp;
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?php</span> the_content<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<span style="font-weight: bold; color: black;">?&gt;</span></span>
&nbsp;
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/div<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
	<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!--end story--&gt;</span></span></pre></td></tr></table></div>

<p>Porqué lo hago así?:<br />
Porque puedo permitirme <strong>situar el metadato</strong> en cualquier lugar de la plantilla y, por ejemplo, escaparlo del flotante que uso como <a href="http://www.blog.culturadigital.org/desarrollo-web/tabla-de-contenidos-con-jquery-toc" title="Tabla de Contenidos con JQuery (ToC)">Tabla de Contenidos mediante JQuery</a>, quedando <strong>la descripción intacta al inicio de la página y el contenido publicado</strong> por otra parte sin mezclarse ambos.</p>
<h4>Otros usos</h4>
<p>Las posibilidades son desde luego abrumadoras, puedes generar infinidad de metadatos y relacionar tus posts de la forma que imagines con simples consultas a la base de datos: Situaciones en Google Maps, planos, archivos de audio (muy popular ahora y más con la llegada de WP2.5, datos para varios posts&#8230;)</p>
<p>Por ejemplo, en la web de La Guardia los uso para añadir datos de las concejalías, así puedo acceder con una simple línea de código desde a los datos de contacto, localización, etc&#8230; a las noticias generadas por esa concejalía, por ejemplo añadiendo un metadato sobre la categoría de noticias&#8230; pfff, como digo, muchísimas posibilidades que hace de Wordpress mucho más que un CMS <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>&#8230;me encanta Wordpress ^^!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.culturadigital.org/desarrollo-web/wordpress-como-cms1/feed</wfw:commentRss>
		</item>
		<item>
		<title>PHP: Gestión personalizada de errores</title>
		<link>http://www.blog.culturadigital.org/desarrollo-web/php-gestion-personalizada-de-errores</link>
		<comments>http://www.blog.culturadigital.org/desarrollo-web/php-gestion-personalizada-de-errores#comments</comments>
		<pubDate>Mon, 04 Feb 2008 11:13:49 +0000</pubDate>
		<dc:creator>Covi</dc:creator>
		
		<category><![CDATA[Desarrollo Web]]></category>

		<category><![CDATA[Programación]]></category>

		<category><![CDATA[errores]]></category>

		<category><![CDATA[php4]]></category>

		<category><![CDATA[set_error_handler]]></category>

		<guid isPermaLink="false">http://www.blog.culturadigital.org/desarrollo-web/php-gestion-personalizada-de-errores</guid>
		<description><![CDATA[Hace mucho tiempo que conocía la manera, o más bien la función para establecer el gestor de excepciones, con la que capturar errores en PHP4. Sí, muy tosco y tampoco es que se pudiera hablar de capturar excepciones tal y como lo hace ya PHP5.
El caso es que, aunque me curré cosas muy bonitas, nunca [...]]]></description>
			<content:encoded><![CDATA[<p>Hace mucho tiempo que conocía la manera, o más bien la función para establecer el gestor de excepciones, con la que <em>capturar errores</em> en PHP4. Sí, muy tosco y tampoco es que se pudiera hablar de capturar excepciones tal y como lo hace ya PHP5.</p>
<p>El caso es que, aunque me curré cosas muy bonitas, nunca me gustó pues los errores graves escapaban del control de <code class="noblock"><a href="http://es.php.net/manual/es/function.set-error-handler.php" title="la función en el manual de php en español">set_error_handler()</a></code>. Pero como en todo&#8230; nunca estamos limitados a lo que el propio lenguaje nos ofrece, quizá hemos caído demasiadas veces en la comodidad del uso de <em>frameworks</em> o quizá sea lo que viene inmediatamente y la encapsulación no nos deje ver un poco más allá&#8230; precisamente <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>El hecho es que si quieres gestionar tus propios errores en PHP4 con niveles de informe de usuario y administrador no es tan difícil como en un principio me parecía&#8230; solo era pensar un poco <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /><br />
<em>Sé que PHP4 está prácticamente muerto pero también sé que muchos servers aún no han migrado <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </em></p>
<h4>Controla la Gestión de Errores:</h4>
<p>Desde que me obligué a convertir el <a href="http://www.laguardiadejaen.com/web/" title="laguardiadejaen.com">sitio web de La Guardia</a> en un <acronym title="del inglés: Content Management System">CMS</acronym> en toda regla y me forcé a usar la metodología <acronym title="del inglés: Model View Controller, Modelo Vista Controlador">MVC</acronym>, debo decir que me gusta aún más programar para la web&#8230; es esa forma de &#8220;hacer las cosas bien&#8221;, elegantes&#8230; aunque mis scripts no lleguen a esos niveles el caso es intentarlo.</p>
<h5>El método</h5>
<p>Así, el método básico es, desde luego, tener un <strong>control de usuarios o al menos del administrador</strong>&#8230;. obviamente para elegir un nivel de informe de errores. Aunque casi es lo de menos, usaremos por ejemplo las funciones de sesión de usuario en Wordpress y sin tocar <code class="noblock">WP_error()</code> del que no he estudiado mucho aunque intuyo que sería muy útil.</p>
<p>El funcionamiento sería muy sencillo:<br />
Mediante las funciones de usuario de Wordpress o cualquier otro sistema, o el reconocimiento del nivel administrador, bien mediante IP (avanzada para ips dinámicas en su caso y no muy recomendable en realidad), <strong>generaremos dos tipos de nivel de errores</strong>:</p>
<ul>
<li>Nivel administrativo</li>
<li>Nivel de usuario.</li>
</ul>
<p>Primero procederemos a <strong>establecer el informe de errores en ninguno</strong>.<br />
Chequearemos el usuario y estableceremos los siguientes niveles:</p>
<ul>
<li>Admin: E_ALL ^ E_NOTICE (Todos los errores menos los avisos de PHP).</li>
<li>User: E_USER_NOTICE (Todos los avisos que generemos).</li>
</ul>
<p>A la vez que proporcionamos el nivel de error estableceremos la función que ofrecerá el reporte de errores para cada tipo:<br />
<code class="noblock">set_error_handler('miGestorErrores');</code></p>
<p>Y aquí vienen las carencias de PHP4 que nos obligan a escribir un poco más de código:<br />
En PHP5 solo necesitaríamos una única función de gestión de errores porque podríamos pasar a set_error_handler el nivel que queremos que muestre, en este caso para cada tipo de usuario, por ejemplo:</p>
<ul>
<li>Si es el administrador:<br />
	<code class="noblock">set_error_handler('MiGestorErrores',E_ALL);</code></li>
<li>Sino:<br />
	<code class="noblock">set_error_handler('MiGestorErrores',E_USER_NOTICE);</code></li>
</ul>
<p>Pero para PHP4 no podemos hacerlo, ya que no podemos pasarle parámetros a set_error_handler(), así que simplemente nos costará unas cuantas líneas más para crear una función más.<br />
Esto es: <strong>una función de gestión de errores de usuario y otra de administrador</strong>.<br />
Sí, es muy bruto y se puede y debe pulir&#8230; pero por ahora lo dejaremos así para ilustrar.</p>
<p>Así, ya tenemos montado el sistema de informes de error y que podemos usar sin miedo alguno a imprimir errores de php al usuario y sabiendo que tendremos información de todos los errores en modo administrador. Digamos que, omitiendo el tema de seguridad al funcionar como admin, tenemos un entorno de desarrollo y producción en uno <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<h5>El código:</h5>
<p>Bien, en el caso de Wordpress se puede hacer más o menos así:</p>
<div class="alert2"><strong>Muy importante:</strong><br />
(<tt>Línea 5</tt>) Usa tus propios métodos de chequeo del admin, estos son a modo de ejemplo.<br />
El código va bastante explicado y ojo!, le faltaría un poco más de depuración para controlar los datos que llegan a la función,etc,etc,etc&#8230;<br />
Si lo usas, es a modo de ejemplo sólo, compruébalo! <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </div>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
</pre></td><td class="code"><pre class="php"><span style="color: #000066;">error_reporting</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span> <span style="color: #808080; font-style: italic;">// Errores Off inicial.</span>
<span style="color: #000066;">global</span> <span style="color: #ff0000">$userdata</span><span style="color: #66cc66;">;</span>
get_currentuserinfo<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$userdata</span><span style="color: #66cc66;">-&gt;</span><span style="color: #006600;">user_level</span> <span style="color: #66cc66;">===</span> <span style="color: #ff0000;">'Nivel del admin'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&amp;&amp;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #808080; font-style: italic;">//Otros datos que consideres importantes para asegurarte: $userdata-&gt;user_login, $userdata-&gt;ID, $userdata-&gt;user_nicename, etc...) ) :</span>
	<span style="color: #000066;">error_reporting</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">E_ALL</span> ^ <span style="color: #000000; font-weight: bold;">E_NOTICE</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span> <span style="color: #808080; font-style: italic;">// Activamos los errores para el admin</span>
	<span style="color: #808080; font-style: italic;">// establecer el gestor de errores definido.</span>
	<span style="color: #000066;">set_error_handler</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'miAdminGestorErrores'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
<span style="color: #b1b100;">else</span> <span style="color: #66cc66;">:</span>
	<span style="color: #000066;">error_reporting</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">E_USER_NOTICE</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
	<span style="color: #808080; font-style: italic;">// establecer el gestor de errores de USUARIO, nivel mínimo: NOTICE.</span>
	<span style="color: #000066;">set_error_handler</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'miUserGestorErrores'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
<span style="color: #b1b100;">endif</span><span style="color: #66cc66;">;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">// función de gestión de errores NIVEL ADMIN:</span>
<span style="color: #000000; font-weight: bold;">function</span> miUserGestorErrores<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$num_err</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000">$cadena_err</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000">$archivo_err</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000">$linea_err</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #b1b100;">switch</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$num_err</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #808080; font-style: italic;">// USER: Este será el Nivel de errores que daremos a los usuarios.</span>
		<span style="color: #808080; font-style: italic;">// No debemos imprimir nada más que nuestra cadena de error.</span>
		<span style="color: #b1b100;">case</span> <span style="color: #000000; font-weight: bold;">E_USER_NOTICE</span><span style="color: #66cc66;">:</span>
			<span style="color: #000066;">echo</span> <span style="color: #ff0000;">'&lt;strong class=&quot;red&quot;&gt;Error:&lt;/strong&gt; '</span><span style="color: #66cc66;">.</span><span style="color: #ff0000">$cadena_err</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #66cc66;">;</span>
		<span style="color: #b1b100;">break</span><span style="color: #66cc66;">;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">// Para el resto nada.</span>
		<span style="color: #000000; font-weight: bold;">default</span><span style="color: #66cc66;">:</span>
			<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">;</span>
		<span style="color: #b1b100;">break</span><span style="color: #66cc66;">;</span>
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">/* MUY IMPORTANTE: No ejecutar el gestor de errores interno de PHP */</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">// función de gestión de errores NIVEL USER:</span>
<span style="color: #000000; font-weight: bold;">function</span> miAdminGestorErrores<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$num_err</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000">$cadena_err</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000">$archivo_err</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000">$linea_err</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #b1b100;">switch</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$num_err</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">// ADMIN: Error Grave:</span>
		<span style="color: #b1b100;">case</span> <span style="color: #000000; font-weight: bold;">E_USER_ERROR</span><span style="color: #66cc66;">:</span>
			<span style="color: #000066;">echo</span> <span style="color: #ff0000;">'&lt;div class=&quot;error&quot;&gt;&lt;h5&gt;DEBUG: Error Grave&lt;/h5&gt;
			&lt;p&gt;['</span><span style="color: #66cc66;">.</span><span style="color: #ff0000">$num_err</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">'] '</span><span style="color: #66cc66;">.</span><span style="color: #ff0000">$cadena_err</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">'&lt;br /&gt;
			Error fatal administrativo en la l&amp;iacute;nea '</span><span style="color: #66cc66;">.</span><span style="color: #ff0000">$linea_err</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">' del archivo '</span><span style="color: #66cc66;">.</span><span style="color: #ff0000">$archivo_err</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">'&lt;br /&gt;
			'</span> <span style="color: #66cc66;">.</span> PHP <span style="color: #66cc66;">.</span> <span style="color: #ff0000;">' '</span> <span style="color: #66cc66;">.</span> <span style="color: #000000; font-weight: bold;">PHP_VERSION</span> <span style="color: #66cc66;">.</span> <span style="color: #ff0000;">' ('</span> <span style="color: #66cc66;">.</span> <span style="color: #000000; font-weight: bold;">PHP_OS</span> <span style="color: #66cc66;">.</span> <span style="color: #ff0000;">')&lt;br /&gt;
			Abortando...&lt;/p&gt;&lt;/div&gt;'</span><span style="color: #66cc66;">;</span>
		<span style="color: #000066;">exit</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
		<span style="color: #b1b100;">break</span><span style="color: #66cc66;">;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">// ADMIN: Error Alerta:</span>
		<span style="color: #b1b100;">case</span> <span style="color: #000000; font-weight: bold;">E_USER_WARNING</span><span style="color: #66cc66;">:</span>
			<span style="color: #000066;">echo</span> <span style="color: #ff0000;">'&lt;div class=&quot;alert&quot;&gt;&lt;h5&gt;DEBUG: Advertencia&lt;/h5&gt;
			&lt;p&gt;['</span><span style="color: #66cc66;">.</span><span style="color: #ff0000">$num_err</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">'] '</span><span style="color: #66cc66;">.</span><span style="color: #ff0000">$cadena_err</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">'&lt;br /&gt;
			Advertencia administrativa en la l&amp;iacute;nea '</span><span style="color: #66cc66;">.</span><span style="color: #ff0000">$linea_err</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">' del archivo '</span><span style="color: #66cc66;">.</span><span style="color: #ff0000">$archivo_err</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">'&lt;br /&gt;
			'</span> <span style="color: #66cc66;">.</span> PHP <span style="color: #66cc66;">.</span> <span style="color: #ff0000;">' '</span> <span style="color: #66cc66;">.</span> <span style="color: #000000; font-weight: bold;">PHP_VERSION</span> <span style="color: #66cc66;">.</span> <span style="color: #ff0000;">' ('</span> <span style="color: #66cc66;">.</span> <span style="color: #000000; font-weight: bold;">PHP_OS</span> <span style="color: #66cc66;">.</span> <span style="color: #ff0000;">')&lt;/p&gt;&lt;/div&gt;'</span><span style="color: #66cc66;">;</span>
		<span style="color: #b1b100;">break</span><span style="color: #66cc66;">;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">// USER: Este será el Nivel de errores que daremos a los usuarios.</span>
		<span style="color: #808080; font-style: italic;">// No debemos imprimir nada más que nuestra cadena de error.</span>
		<span style="color: #b1b100;">case</span> <span style="color: #000000; font-weight: bold;">E_USER_NOTICE</span><span style="color: #66cc66;">:</span>
			<span style="color: #000066;">echo</span> <span style="color: #ff0000;">'&lt;strong class=&quot;red&quot;&gt;Error:&lt;/strong&gt; '</span><span style="color: #66cc66;">.</span><span style="color: #ff0000">$cadena_err</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #66cc66;">;</span>
		<span style="color: #b1b100;">break</span><span style="color: #66cc66;">;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">// Para el resto nada.</span>
		<span style="color: #000000; font-weight: bold;">default</span><span style="color: #66cc66;">:</span>
			<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">;</span>
		<span style="color: #b1b100;">break</span><span style="color: #66cc66;">;</span>
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">/* MUY IMPORTANTE: No ejecutar el gestor de errores interno de PHP */</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<h5>Conclusiones</h5>
<p>Hay que hacer notar que <em>en la función de reporte del administrador</em>, sigo usando E_USER_NOTICE aparte de que con el nivel establecido me llegarán todos menos los avisos de php (E_NOTICE) no cejo en el empeño de <strong>usar una única función!</strong> &#8230;pero será más tarde, ahora no hay tiempo <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Por lo demás, creo que el código por sí mismo se explica bastante bien.</p>
<p>En mis scripts simplemente genero mis errores con un simple:<br />
<code class="noblock">trigger_error('Cadena de Error', Nivel de Error);</code><br />
por ejemplo:<br />
<code class="noblock">trigger_error('No se encontró un archivo básico para el sistema', E_USER_ERROR);</code><br />
Y su versión administrativa:<br />
<code class="noblock">trigger_error('No se encontró el archivo básico para el sistema: '.$fileRequired, E_USER_ERROR);</code> // Usamos el nivel ERROR FATAL porque se supone el sistema se caería sin ese archivo pero se puede usar E_USER_WARNING para avisos no críticos. Por ejemplo yo lo hago para avisos de cacheos de archivos que sólo quiero ver yo&#8230; <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /> </p>
<h5>MVC</h5>
<p>Porqué mencioné MVC???&#8230; pues porque teniendo en cuenta que puedes establecer un preformato para tus avisos de error no necesitarás incrustar más código HTML para generar errores.<br />
La función inicial sería el <strong>Modelo de datos</strong>, las funciones de php, este caso trigger_error, serían los <strong>Controladores</strong> y tu formato de error predefinido sería la <strong>Vista</strong>, tu plantilla.<br />
De esta forma puedes llamar a los errores siempre desde funciones con búfer, por ejemplo con, el pesado, eso sí <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> , <code class="noblock">sprintf()</code> o guardándolos en búferes de salida, y luego aplicarles <strong>el formato de la Vista</strong>. Ej:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="php">	<span style="color: #808080; font-style: italic;">// Notices:</span>
	<span style="color: #ff0000">$msgError</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'&lt;strong&gt;No se realiz&amp;oacute; la cach&amp;eacute;!&lt;/strong&gt;&lt;br /&gt;
	No se pudo &lt;strong&gt;%1$s&lt;/strong&gt; en el archivo: %2$s'</span><span style="color: #66cc66;">;</span>
&nbsp;
	<span style="color: #ff0000">$msgNotice</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'&lt;strong&gt;Atenci&amp;oacute;n!&lt;/strong&gt;&lt;br /&gt;
	%1$s.'</span><span style="color: #66cc66;">;</span>
&nbsp;
	<span style="color: #ff0000">$msgOk</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'&lt;strong&gt;Cach&amp;eacute;!.&lt;/strong&gt;&lt;br /&gt;
	El archivo &lt;strong&gt;%1$s&lt;/strong&gt; se cache&amp;oacute; correctamente!'</span><span style="color: #66cc66;">;</span></pre></td></tr></table></div>

<p>Y luego generar un <strong>error formateado</strong> simplemente con:</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000066;">trigger_error</span><span style="color: #66cc66;">&#40;</span><span style="color: #000066;">sprintf</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$msgError</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'escribir'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000">$fileCached</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> <span style="color: #000000; font-weight: bold;">E_USER_WARNING</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span></pre></div></div>

<p>Sabiendo que tus errores tienen un formato HTML o una Vista del tipo:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="xml">			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;error&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;h5<span style="font-weight: bold; color: black;">&gt;</span></span></span>DEBUG: Error Grave<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/h5<span style="font-weight: bold; color: black;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;p<span style="font-weight: bold; color: black;">&gt;</span></span></span>[%NúmeroError%] %TextoError%<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;br</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
			Error fatal administrativo en la l<span style="color: #ddbb00;">&amp;iacute;</span>nea %LineaError% del archivo %ArchivoError%<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;br</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
			%DatosOpcionales%<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;br</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
			Abortando...<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/p<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/div<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></td></tr></table></div>

<p> con el que puede trabajar un Diseñador Web <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_confused.gif' alt=':?' class='wp-smiley' /> </p>
<p>O incluso puedes hacer otra función que gestione a trigger_error, o lo suyo, una clase&#8230; pero es ya es liar mucho la breva para eta entrada <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h4>Fin / EOF</h4>
<p>No soy ni siquiera un entendido&#8230; pero lo dicho, a mí me basta y me va muy bien <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
Es obvio que cualquier sugerencia será tremendamente bien recibida <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> pero eso sí, excepcionando las tipo: <em>Usa PHP5!!</em>, recordemos que no tiene porqué depender del administrador del software, repito, del software y que es un ejercicio práctico y de compatibilidad inversa <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>PD: Como es habitual en mí ya iré coorrigiendo fallos que haya tenido en la entrada y borrrando cagadas <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.culturadigital.org/desarrollo-web/php-gestion-personalizada-de-errores/feed</wfw:commentRss>
		</item>
		<item>
		<title>Otro ejemplo típico de divitis e identiditis! :)</title>
		<link>http://www.blog.culturadigital.org/desarrollo-web/otro-ejemplo-tipico-de-divitis-e-identiditis</link>
		<comments>http://www.blog.culturadigital.org/desarrollo-web/otro-ejemplo-tipico-de-divitis-e-identiditis#comments</comments>
		<pubDate>Sun, 03 Feb 2008 02:15:36 +0000</pubDate>
		<dc:creator>Covi</dc:creator>
		
		<category><![CDATA[Desarrollo Web]]></category>

		<category><![CDATA[clasitis]]></category>

		<category><![CDATA[divitis]]></category>

		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.blog.culturadigital.org/desarrollo-web/otro-ejemplo-tipico-de-clasitis-y-divitis</guid>
		<description><![CDATA[Volvamos al tema que he reabierto en estos días, el marcado (X)HTML válido &#8220;fullero&#8221; le llamaré yo.
En realidad, no debería ser considerado como marcado válido pues la semántica debería ser parte de ello. En este sentido, quizá sea un poco talibán desde que adquirí ciertas costumbres heredadas de la lectura de Zeldman y más tarde [...]]]></description>
			<content:encoded><![CDATA[<p>Volvamos al tema que he reabierto en estos días, el marcado (X)HTML válido &#8220;fullero&#8221; le llamaré yo.</p>
<p>En realidad, no debería ser considerado como marcado válido pues la semántica debería ser parte de ello. En este sentido, quizá sea un poco talibán desde que adquirí ciertas costumbres heredadas de la lectura de Zeldman y más tarde minid.net por ejemplo.</p>
<p>El código posterior que generaré es un sistema que uso en la web que administro, <a href="http://www.laguardiadejaen.com/web/">laguardiadejaen.com</a>, para generar unas citas aleatorias en la cabecera de la plantilla. Es una plantilla que adapté a Wordpress obra de <em>Collin Grasley</em> (de OpenDesigns.org), a decir verdad, un diseñador que me gusta bastante&#8230; pero, humildemente, considero que también peca del intento obsesivo de compatibilidad inversa en navegadores y, por qué no? e imagino: &#8220;<em>sea condescendiente con IE a toda costa</em>&#8220;.</p>
<p>La plantilla original es <a href="http://www.opendesigns.org/designs/1038/">esta</a>.</p>
<p>Consideremos este código:<br />
(He indexado el código para una mejor comprensión aunque el original no la tiene.)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;header&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;logo&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;logo&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>your logo here<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/span<span style="font-weight: bold; color: black;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/div<span style="font-weight: bold; color: black;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;headerloginbutton&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Log In | Sign Up<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/a<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/div<span style="font-weight: bold; color: black;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;menu&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ul<span style="font-weight: bold; color: black;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Contact Us&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Contact Us<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/a<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;About Us&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>About Us<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/a<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Clients&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Clients<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/a<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Our Work&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Our Work<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/a<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Home&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Home<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/a<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ul<span style="font-weight: bold; color: black;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/div<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/div<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></td></tr></table></div>

<p>Div, div, div, id, id, id&#8230;. pfffff por Dios&#8230; al menos hay una lista! <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Hagámoslo algo coherente, con sentido y útil:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;header&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;h1<span style="font-weight: bold; color: black;">&gt;</span></span></span>your logo here<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/h1<span style="font-weight: bold; color: black;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Log In | Sign Up<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/a<span style="font-weight: bold; color: black;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ul</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;menu&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Contact Us&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Contact Us<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/a<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;About Us&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>About Us<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/a<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Clients&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Clients<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/a<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Our Work&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Our Work<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/a<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Home&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Home<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/a<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ul<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/div<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></td></tr></table></div>

<p>Mucho mejor, no?&#8230; nos hemos ahorrado unas cuantas líneas, unos cuantos caracteres e identificadores innecesarios y el documento es más coherente y semántico. Ahora veremos los cambios y luego &#8220;<em>la magia CSS</em>&#8220;:</p>
<ul>
<li>Primero hemos eliminado el div, el span y la clase de logo.<br />
Es el logotipo principal, el título del sitio, un título de primer nivel cabe esperar así que pongamos nuestro inédito hasta ahora H1&#8230; simple y sencillo.</li>
<li>Le sigue un enlace&#8230;<br />
Para qué queremos otro div más con otro identificador más? (por lo visto se cree que todos los elementos HTML deben ir identificados&#8230; no lo entiendo).<br />
Bien, un enlace pues un enlace&#8230; punto.</li>
<li>Y lo que te rondaré morena:<br />
Oooootro DIV más&#8230; con el consiguiente identificador para englobar una lista que, por cierto, ahora que sería recomendable un identificador para algo tan importante como el menú&#8230; no lo tiene <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> El del DIV no cuenta o cuando menos no es del todo semántico pues el menú en concreto, exacto es una lista.<br />
Bien&#8230; una lista que será el menú. Pues eso mismo: una lista identificada como menú.</li>
</ul>
<h4>La magia:</h4>
<p>Pero&#8230; ¿como funcionará el nuevo código para un diseño idéntico?, bien, esto es la magia de CSS y sobre todo, <strong>la herencia de los elementos</strong>. Vamos allá:</p>
<p>Sabemos que tenemos una división o sección que es la cabecera: <code class="noblock">header</code>.<br />
Hasta ahora es correcto e incluso el identificador nos sirve para usar un marcador de posición superior.</p>
<p>Siendo así, todos los elementos será hijos únicos de esta división:<br />
Header h1<br />
Header a<br />
Header ul&#8230;<br />
Pues bien, no hay motivo para usar identificadores ni clases innecesarios, simplemente usemos la herencia CSS:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="css"><span style="color: #cc00cc;">#header</span> h1 <span style="color: #66cc66;">&#123;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #cc00cc;">#header</span> a <span style="color: #66cc66;">&#123;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #cc00cc;">#header</span> ul<span style="color: #cc00cc;">#menu</span> <span style="color: #66cc66;">&#123;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #cc00cc;">#header</span> ul<span style="color: #cc00cc;">#menu</span> li <span style="color: #66cc66;">&#123;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #cc00cc;">#header</span> ul<span style="color: #cc00cc;">#menu</span> li a <span style="color: #66cc66;">&#123;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p> etc, etc, etc&#8230;</p>
<p>También se puede ser un poco menos talibán y usar un div para el login:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;header&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;h1<span style="font-weight: bold; color: black;">&gt;</span></span></span>your logo here<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/h1<span style="font-weight: bold; color: black;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;div<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Log In | Sign Up<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/a<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/div<span style="font-weight: bold; color: black;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ul</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;menu&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Contact Us&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Contact Us<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/a<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;About Us&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>About Us<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/a<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Clients&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Clients<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/a<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Our Work&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Our Work<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/a<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Home&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Home<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/a<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ul<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/div<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></td></tr></table></div>

<p>Con otra regla CSS de herencia:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="css"><span style="color: #cc00cc;">#header</span> div a <span style="color: #66cc66;">&#123;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>Pero en resumen se puede mirar el código de la plantilla y observar que todo son DIVs, IDs, SPAN y clases&#8230; por un tubo&#8230; no son necesarias <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Con más tiempo extenderé el asunto con detalles <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> y en definitiva de lo que va todo esto:</p>
<h4>Conclusión</h4>
<p><em>Cómo hemos pasado de un marcado inválido y propietario a otro fullero</em>, volviendo a los trucos&#8230; antes eran trucos inválidos y ahora siguen siendo trucos, marcado sucio no semántico pero válido. Y además, de como algunos estilos que tanto llaman la atención, por ejemplo algunas plantillas Wordpress, al mirar sus entrañas se descubre más de lo mismo&#8230; muy triste no aprender de los errores pasados, pero&#8230; uno es libre de cometerlos, claro, solo que tus archivos pesarán un 50% más, tu sitio consumirá un 50% más de ancho y tu documento se renderizará un 50% más lento&#8230; eso sin contar con otro tipo de dispositivos como navegadores móviles, basados en estructura&#8230; texto, audio, etc&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.culturadigital.org/desarrollo-web/otro-ejemplo-tipico-de-divitis-e-identiditis/feed</wfw:commentRss>
		</item>
		<item>
		<title>Manías del marcado basura</title>
		<link>http://www.blog.culturadigital.org/desarrollo-web/manias-del-marcado-basura</link>
		<comments>http://www.blog.culturadigital.org/desarrollo-web/manias-del-marcado-basura#comments</comments>
		<pubDate>Sun, 03 Feb 2008 01:30:00 +0000</pubDate>
		<dc:creator>Covi</dc:creator>
		
		<category><![CDATA[Desarrollo Web]]></category>

		<category><![CDATA[diseño-web]]></category>

		<category><![CDATA[divitis]]></category>

		<category><![CDATA[marcado]]></category>

		<category><![CDATA[semántica]]></category>

		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.blog.culturadigital.org/querido-diario/manias-del-marcado-basura</guid>
		<description><![CDATA[BORRADOR RECUPERADO de 2007: No tengo mucho tiempo para extender esta entrada, así que haré algo rápido con unas capturas.
El hecho es que con la estandarización del marcado web a XML, las validaciones del W3C y todo este pollo, muchos de los diseñadores web han pasado del marcado basura de presentación HTML al marcado basura [...]]]></description>
			<content:encoded><![CDATA[<p><strong>BORRADOR RECUPERADO de 2007</strong>: No tengo mucho tiempo para extender esta entrada, así que haré algo rápido con unas capturas.</p>
<p>El hecho es que con la estandarización del marcado web a XML, las validaciones del W3C y todo este pollo, muchos de los diseñadores web han pasado del marcado basura de presentación HTML al marcado basura de presentación válido, estándar&#8230; pero basura y de presentación como digo.<br />
Una de los primeros sintomas es la famosa DIVITIS. Vemos como editar este tema que uso en el blog: 4u para pasar de un marcado basura de presentación a un marcado estructural:</p>
<p>Teníamos esto:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
</pre></td><td class="code"><pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;utombox&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;header&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;inside&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;utom&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;search&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
				<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;form</span> <span style="color: #000066;">method</span>=<span style="color: #ff0000;">&quot;get&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;sform&quot;</span> <span style="color: #000066;">action</span>=<span style="color: #ff0000;">&quot;&lt;?php bloginfo('home'); ?&gt;</span>/&quot;&gt;
 					<span style="color: #009900;">&lt;div class=&quot;</span>searchimg<span style="color: #ff0000;">&quot;&gt;</span><span style="color: #009900;">&lt;/div&gt;</span>
					<span style="color: #009900;">&lt;input type=&quot;</span>text<span style="color: #ff0000;">&quot; id=&quot;</span>q<span style="color: #ff0000;">&quot; value=&quot;</span><span style="font-weight: bold; color: black;">&lt;?php</span> echo wp_specialchars<span style="color: #66cc66;">&#40;</span>$s, <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>; <span style="font-weight: bold; color: black;">?&gt;</span></span>&quot; name=&quot;s&quot; size=&quot;15&quot; /&gt;
				<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/form<span style="font-weight: bold; color: black;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/div<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;h2<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;&lt;?php echo get_settings('home'); ?&gt;</span>/&quot; title=&quot;<span style="color: #009900;">&lt;?php bloginfo('description'); ?&gt;</span>&quot;&gt;<span style="color: #009900;">&lt;?php bloginfo('name'); ?&gt;</span><span style="color: #009900;">&lt;/a&gt;</span><span style="color: #009900;">&lt;/h2&gt;</span>
			<span style="color: #009900;">&lt;p class=&quot;</span>description<span style="color: #ff0000;">&quot;&gt;</span><span style="color: #009900;">&lt;?php bloginfo('description'); ?&gt;</span><span style="color: #009900;">&lt;/p&gt;</span>
		<span style="color: #009900;">&lt;/div&gt;</span>
		<span style="color: #009900;">&lt;/div&gt;</span>
	<span style="color: #009900;">&lt;/div&gt;</span>
	<span style="color: #009900;">&lt;!-- [END] #header --&gt;</span>
	<span style="color: #009900;">&lt;div id=&quot;</span>menu<span style="color: #ff0000;">&quot;&gt;</span>
		<span style="color: #009900;">&lt;div class=&quot;</span>utom_menu<span style="color: #ff0000;">&quot;&gt;</span>
&nbsp;
				<span style="color: #009900;">&lt;ul class=&quot;</span>menu<span style="color: #ff0000;">&quot;&gt;</span>
				<span style="color: #009900;">&lt;li class=&quot;</span><span style="font-weight: bold; color: black;">&lt;?php</span> if <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>is_home<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> &amp;&amp; !<span style="color: #66cc66;">&#40;</span>is_paged<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> or <span style="color: #66cc66;">&#40;</span>is_archive<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> or <span style="color: #66cc66;">&#40;</span>is_single<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> or <span style="color: #66cc66;">&#40;</span>is_paged<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> or <span style="color: #66cc66;">&#40;</span>is_search<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> <span style="font-weight: bold; color: black;">?&gt;</span></span>current_page_item<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?php</span> <span style="color: #66cc66;">&#125;</span> else <span style="color: #66cc66;">&#123;</span> <span style="font-weight: bold; color: black;">?&gt;</span></span>page_item<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?php</span> <span style="color: #66cc66;">&#125;</span> <span style="font-weight: bold; color: black;">?&gt;</span></span>&quot;&gt;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;&lt;?php echo get_settings('home'); ?&gt;</span>&quot;&gt;Blog<span style="color: #009900;">&lt;/a&gt;</span><span style="color: #009900;">&lt;/li&gt;</span>
				<span style="color: #009900;">&lt;?php wp_list_pages('sort_column=menu_order&amp;depth=1&amp;title_li='); ?&gt;</span>
				<span style="color: #009900;">&lt;?php wp_register('&lt;li class=&quot;</span>admintab<span style="color: #ff0000;">&quot;&gt;</span>','<span style="color: #009900;">&lt;/li&gt;</span>'); ?&gt;
				<span style="color: #009900;">&lt;li class=&quot;</span>utom_menu_b<span style="color: #ff0000;">&quot;&gt;</span><span style="color: #009900;">&lt;/li&gt;</span>
				<span style="color: #009900;">&lt;/ul&gt;</span>
&nbsp;
		<span style="color: #009900;">&lt;/div&gt;</span>
	  <span style="color: #009900;">&lt;/div&gt;</span></span></pre></td></tr></table></div>

<p>Sin acabar en absoluto aún, pasemos a esto:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
</pre></td><td class="code"><pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;container&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
&nbsp;
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;header&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
&nbsp;
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;inside&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
&nbsp;
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;utom&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
&nbsp;
				<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Busqueda --&gt;</span></span>
				<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;form</span> <span style="color: #000066;">method</span>=<span style="color: #ff0000;">&quot;get&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;searchform&quot;</span> <span style="color: #000066;">action</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Escribe y pulsa ENTER&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
					<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;input</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;&lt;?php _e('Search');?&gt;</span>: escribe y pulsa ENTER&quot; size=&quot;20&quot; name=&quot;s&quot; id=&quot;s&quot; onfocus=&quot;this.value=''&quot; tabindex=&quot;4&quot; /&gt;
					<span style="color: #009900;">&lt;input name=&quot;</span>Buscar<span style="color: #ff0000;">&quot; type=&quot;</span>hidden<span style="color: #ff0000;">&quot; id=&quot;</span>searchbutton<span style="color: #ff0000;">&quot; value=&quot;</span>Buscar<span style="color: #ff0000;">&quot; /&gt;</span>
				<span style="color: #009900;">&lt;/form&gt;</span>
				<span style="color: #009900;">&lt;!-- end Busqueda --&gt;</span>
&nbsp;
				<span style="color: #009900;">&lt;h2&gt;</span><span style="color: #009900;">&lt;a href=&quot;</span><span style="font-weight: bold; color: black;">&lt;?php</span> echo get_settings<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'home'</span><span style="color: #66cc66;">&#41;</span>; <span style="font-weight: bold; color: black;">?&gt;</span></span>/&quot; title=&quot;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?php</span> bloginfo<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'description'</span><span style="color: #66cc66;">&#41;</span>; <span style="font-weight: bold; color: black;">?&gt;</span></span>&quot;&gt;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?php</span> bloginfo<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'name'</span><span style="color: #66cc66;">&#41;</span>; <span style="font-weight: bold; color: black;">?&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/a<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/h2<span style="font-weight: bold; color: black;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;p</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;description&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?php</span> bloginfo<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'description'</span><span style="color: #66cc66;">&#41;</span>; <span style="font-weight: bold; color: black;">?&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/p<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
				<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ul</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;globalinks&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
					<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#content&quot;</span> <span style="color: #000066;">accesskey</span>=<span style="color: #ff0000;">&quot;S&quot;</span> <span style="color: #000066;">tabindex</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Ir al Contenido&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>IR AL CONTENIDO<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/a<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#sidebar_top&quot;</span> <span style="color: #000066;">accesskey</span>=<span style="color: #ff0000;">&quot;M&quot;</span> <span style="color: #000066;">tabindex</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Ir al Men&amp;uacute;&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>IR AL MEN<span style="color: #ddbb00;">&amp;Uacute;</span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/a<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#searchform&quot;</span> <span style="color: #000066;">accesskey</span>=<span style="color: #ff0000;">&quot;B&quot;</span> <span style="color: #000066;">tabindex</span>=<span style="color: #ff0000;">&quot;3&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Ir al Formulario&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>BUSCAR<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/a<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ul<span style="font-weight: bold; color: black;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/div<span style="font-weight: bold; color: black;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- end utom --&gt;</span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/div<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- end inside --&gt;</span></span>
&nbsp;
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/div<span style="font-weight: bold; color: black;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- end header --&gt;</span></span>
&nbsp;
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ul</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;menu&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;li</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;&lt;?php if (((is_home()) &amp;&amp; !(is_paged())) or (is_archive()) or (is_single()) or (is_paged()) or (is_search())) { ?&gt;</span>current_page_item<span style="color: #009900;">&lt;?php } else { ?&gt;</span>page_item<span style="color: #009900;">&lt;?php } ?&gt;</span>&quot;&gt;<span style="color: #009900;">&lt;a href=&quot;</span><span style="font-weight: bold; color: black;">&lt;?php</span> echo get_settings<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'home'</span><span style="color: #66cc66;">&#41;</span>; <span style="font-weight: bold; color: black;">?&gt;</span></span>&quot;&gt;Blog<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/a<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/li<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?php</span> wp_list_pages<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'sort_column=menu_order&amp;depth=1&amp;title_li='</span><span style="color: #66cc66;">&#41;</span>; <span style="font-weight: bold; color: black;">?&gt;</span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?php</span> wp_register<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'&lt;li class=&quot;admintab&quot;&gt;</span>','<span style="color: #009900;">&lt;/li&gt;</span>'); ?&gt;
	<span style="color: #009900;">&lt;/ul&gt;</span></span></pre></td></tr></table></div>

<p>No necesitamos un DIV para el menu&#8230; es una lista, usemosla en exclusiva, etc&#8230; etc&#8230; etc&#8230;<br />
Como digo es algo rápido, sin acabar, pero vuelve a ser un ejemplo de hacer las cosas mal.</p>
<p>En definitiva, el resultado haciendo las cosas bien es el mismo:</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.culturadigital.org/desarrollo-web/manias-del-marcado-basura/feed</wfw:commentRss>
		</item>
		<item>
		<title>Timofónica tenía que ser, maldito 4636</title>
		<link>http://www.blog.culturadigital.org/actualidad/timofonica-tenia-que-ser-maldito-4636</link>
		<comments>http://www.blog.culturadigital.org/actualidad/timofonica-tenia-que-ser-maldito-4636#comments</comments>
		<pubDate>Fri, 18 Jan 2008 18:21:54 +0000</pubDate>
		<dc:creator>Covi</dc:creator>
		
		<category><![CDATA[Actualidad]]></category>

		<category><![CDATA[Tecnología]]></category>

		<category><![CDATA[4636]]></category>

		<category><![CDATA[móvil]]></category>

		<category><![CDATA[Movistar]]></category>

		<category><![CDATA[SPAM]]></category>

		<guid isPermaLink="false">http://www.blog.culturadigital.org/actualidad/timofonica-tenia-que-ser-maldito-4636</guid>
		<description><![CDATA[Todo Dios con la misma historia:
Hola! hace unos dias recibia la llamda del 4636 y no lo cogí pero hoy me han vuelto a llamar y lo he cogido, no se escuchaba nada. Por lo que he leio nadie sabe nada, espero q no sea un virus…
http://www.sahw.com/wp/archivos/2006/04/25/virus-y-moviles-resena-en-expansion/#comment-36585
Pues después de estar toda la santa semana recibiendo [...]]]></description>
			<content:encoded><![CDATA[<p>Todo Dios con la misma historia:</p>
<blockquote><p>Hola! hace unos dias recibia la llamda del 4636 y no lo cogí pero hoy me han vuelto a llamar y lo he cogido, no se escuchaba nada. Por lo que he leio nadie sabe nada, espero q no sea un virus…<br />
<cite><a href="http://www.sahw.com/wp/archivos/2006/04/25/virus-y-moviles-resena-en-expansion/#comment-36585">http://www.sahw.com/wp/archivos/2006/04/25/virus-y-moviles-resena-en-expansion/#comment-36585</a></cite></p></blockquote>
<p>Pues después de estar toda la santa semana recibiendo perdidas en el curro del put* número este (que me sonaba un poco a publicidad, más bien SPAM), alrededor de la misma hora, ya estaba preocupado y este miércoles pude cogerla para comprobar yo también que &#8220;te cuelgan&#8221;&#8230;, así de simple.<br />
Digo: &#8221; <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_eek.gif' alt=':shock:' class='wp-smiley' /> &#8230;<em>Toma ya, tus cojones ahí</em>&#8221; ^^!</p>
<p>De modo que hoy ya tenía la intención de llamar a Movistar para ver qué cojones pasaba y he acabado por encontrar la solución (Vía comentarios del blog de <a href="http://www.sahw.com/wp/archivos/2006/04/25/virus-y-moviles-resena-en-expansion/">Sergio Hernando</a> -Seguridad de la Información y Auditoría de Sistemas- ), algo tediosa y pesada pero que aún, ahora mismo, no he probado:</p>
<p>La <strong>solución</strong> es el famoso <strong>derecho del usuario a cancelar los datos que una empresa o entidad guarda sobre ti</strong> cuando te presta un servicio. Lo que no sabía es que esto lo pudieran hacer con fines publicitarios y sobretodo de terceros.<br />
No puedo mirar el contrato porque no sé donde estará después de tanto tiempo (llevaré con Movistar del orden de 6 años creo) y tampoco sé si les afecta (en matería de telefonía móvil) la LOPD, la Ley Orgánica (no recuerdo el nº) de Protección de Datos.</p>
<p>Para ejercer tu derecho debes llamar al 4407 y seguir las instrucciones, menos mal que esta llamada, aunque parezca mentira, es gratuita si no ya es para cagarse.<br />
Ahora toca perder el tiempo por una nueva, de las muchas ya, injusticia para con el consumidor&#8230; y es que España y las Telecomunicaciones son la poll* macho, pfff <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Lo dicho, no he mirado el contrato pero me gustaría hacerlo para ver hasta que punto es legal que te saturen la línea con las putas llamadas y los mensajitos de publicidad.</p>
<p>PD: Cuesta creer algo en todo esto: prácticamente, la mayoría de los usuarios de internet sabemos que <strong>el SPAM en todas sus formas tiene más bien poco éxito</strong>, si algo ha demostrado Google ha sido precisamente esto devolviendo la lógica a la publicidad en Internet con propuestas de anuncios realmente útiles y no intrusivos.<br />
Pues cuesta creer que una compañía como Telefónica aún crea en el SPAM&#8230; porque cuesta creer que si me mandas un mensaje desde un puto número que desconozco y del que no me fío ni un pelo, anunciándome un Quad supermegaguay&#8230; pille y coja el anuncio, es altamente poco probable <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
Incluso si estoy en <em>la aceituna</em>, rompemos TODASSS las <em><a href="http://www.laguardiadejaen.com/guardiapedia/index.php/Piqueta">piquetas</a></em> gg y me mandas un anuncio de varas de fibra muy baratas y en Jaén <img src='http://www.blog.culturadigital.org/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.culturadigital.org/actualidad/timofonica-tenia-que-ser-maldito-4636/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
