<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">

    <channel>
    
    <title>Motor de Expresiones</title>
    <link>http://www.motordeexpresiones.com/</link>
    <description></description>
    <dc:language>en</dc:language>
    <dc:rights>Copyright 2009</dc:rights>
    <dc:date>2009-11-12T01:27:28+00:00</dc:date>
    <admin:generatorAgent rdf:resource="http://expressionengine.com/" />
    

    <item>
      <title>Browser Sniff</title>
      <dc:creator>Admin</dc:creator>
      <link>http://www.motordeexpresiones.com/addon/browser_sniff/</link>
      <guid>http://www.motordeexpresiones.com/addon/browser_sniff/#When:01:27:28Z</guid>

      <description><![CDATA[<p>Simple plugin para detectar el sistema operativo y el navegador. Muy útil para evitar tener multiples hojas de estilo para Internet Exlporer 6, IE 7, etc.. Si tu hoja de estilo esta dentro de una plantilla en ExpressionEngine el código del plugin puede situarse en ella, por ejemplo:</p>

<pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #009900;">&#123;</span> <a href="http://www.php.net/exp"><span style="color: #990000;">exp</span></a><span style="color: #339933;">:</span>browser_sniff <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#123;</span><span style="color: #b1b100;">if</span> os<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;win&quot;</span> AND browser_name<span style="color: #339933;">==</span><span style="color: #0000ff;">&quot;ie&quot;</span><span style="color: #009900;">&#125;</span>
    <span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://browsehappy.com/&quot;</span><span style="color: #339933;">&gt;</span>Cambia a un navegador seguro<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;</span>
<span style="color: #009900;">&#123;</span><span style="color: #b1b100;">if</span><span style="color: #339933;">:</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#125;</span>
    <span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;</span>Gracias por visitar nuestra web<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;</span>
<span style="color: #009900;">&#123;</span><span style="color: #339933;">/</span><span style="color: #b1b100;">if</span><span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#123;</span> <span style="color: #339933;">/</span><a href="http://www.php.net/exp"><span style="color: #990000;">exp</span></a><span style="color: #339933;">:</span>browser_sniff <span style="color: #009900;">&#125;</span>
&nbsp;</pre>

<h3>Forma de Uso</h3>
Inserta las siguientes etiquetas en tus plantillas:

<pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #009900;">&#123;</span> <a href="http://www.php.net/exp"><span style="color: #990000;">exp</span></a><span style="color: #339933;">:</span>browser_sniff <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#123;</span> <span style="color: #339933;">/</span><a href="http://www.php.net/exp"><span style="color: #990000;">exp</span></a><span style="color: #339933;">:</span>browser_sniff <span style="color: #009900;">&#125;</span>
&nbsp;</pre>

<p>Entre ellas, inserta el código de detección como:</p>

<pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #009900;">&#123;</span><span style="color: #b1b100;">if</span> os<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;win&quot;</span> AND browser_name<span style="color: #339933;">==</span><span style="color: #0000ff;">&quot;ie&quot;</span><span style="color: #009900;">&#125;</span>
        <span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://browsehappy.com/&quot;</span><span style="color: #339933;">&gt;</span>Cambia a un navegador seguro<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;</span>
<span style="color: #009900;">&#123;</span><span style="color: #339933;">/</span><span style="color: #b1b100;">if</span><span style="color: #009900;">&#125;</span>
&nbsp;</pre>

<p>Variables disponibles:</p>

<ul>
	<li><strong>browser_name</strong>: navegador</li>
	<li><strong>browser_version</strong>: versión del navegador</li>
	<li><strong>os</strong>: sistema operativo</li>
</ul>

<p>Los posibles valores para la variable del navegador son: ie (internet explorer), op (opera), konq (konqueror), saf (safari), moz (Gecko browsers), ns4 (mozilla/4), other (other browsers).</p>
 
<p>Los posibles valores para la variable de los diferentes sistemas operativos son: win (windows), mac (Macintosh), linux (Linux), other (other OS).</p>

<p>Nota sobre los números de las versiones: Para Safari se detecta el número de la versión de Webkit y para navegadores basados en Gecko el de la versión de Gecko correspondiente.</p>]]></description>
      <dc:subject></dc:subject>
      <dc:date>2009-11-12T01:27:28+00:00</dc:date>
    </item>

    
    </channel>
</rss>
