<div dir="ltr"><div><div><div><div><div>Jaime,<br><br></div>That sounds like the right solution.<br><br></div>Is there a better place to put that code than on the main page?<br></div>Because I want to display the banner to any mobile devices that come<br>

in to any of the pages in the site.<br><br></div>Thanks,<br><br></div>Rotsen<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 11, 2014 at 4:24 PM, Jamie Holly <span dir="ltr">&lt;<a href="mailto:hovercrafter@earthlink.net" target="_blank">hovercrafter@earthlink.net</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>Redirecting them isn&#39;t really a great
      idea. You end up frustrating more people than it&#39;s worth. The
      better option is a banner that displays at the top of the page.
      Here&#39;s how I&#39;ve done it in the past for clients:<br>
      <br>
      &lt;body&gt;<br>
      <br>
      &lt;div id=&quot;my-app-banner&quot;&gt;yada yada yada&lt;/div&gt;<br>
      &lt;/body&gt;<br>
      <br>
      css:<br>
      <br>
      #my-app-banner {<br>
      display:none;<br>
      position:absolute;<br>
      top:0;<br>
      left:0;<br>
      width:100%;<br>
      (whatever else you want)<br>
      }<br>
      <br>
      .show-app-banner {<br>
          padding-top: {same height as your banner}<br>
      }<br>
      <br>
      .show-app-banner #my-app-banner {<br>
      display:block;<br>
      }<br>
      <br>
      Javascript:<br>
      <br>
      if (navigator.userAgent.match(/Android|iPhone|iPad|iPod/i)) {<br>
          $(&#39;body&#39;).addClass(&#39;show-app-banner&#39;);<br>
      } <br>
      <br>
      <br>
      Depending on your theme you will have to play with the css. Best
      thing about this approach is you can easily do it in a module or
      the theme and even exclude pages by path. And since this is
      targetting smartphones with support for modern CSS, you can really
      design something nice in pure CSS (gradients, shadows, border
      radius, etc.), plus use CSS3 transitions to animate things.<br>
      <br>
      Also adding a close button is considered very friendly.<span class="HOEnZb"><font color="#888888"><br>
      <pre cols="72">Jamie Holly
<a href="http://hollyit.net" target="_blank">http://hollyit.net</a></pre></font></span><div><div class="h5">
      On 3/11/2014 7:09 PM, Néstor wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div>
                      <div>
                        <div>I need information on how to detect mobile
                          devices on our desktop site and <br>
                          once detected then display a splash or page or
                          redirect the user to a page <br>
                          <br>
                          <br>
                        </div>
                        The page or splash will have information that
                        will ask the user to either continue to<br>
                        the desktop site or to go to the &quot;APP store&quot; 
                        (android, Iphone).  I will also set a cookie<br>
                      </div>
                      so the user does not get this page/splas over and
                      over.<br>
                      <br>
                    </div>
                    Now, I managed to add some code on my <a href="http://page.tpl.ph" target="_blank">page.tpl.ph</a>
                    that check the HTTP_USER_AGENT<br>
                  </div>
                  it will set a cookie and then it will redirect them to
                  another page (mobileandoir or mobileiphone)<br>
                  <br>
                </div>
                This is working fine but I was wondering if there are
                site out there done in Drupal that have<br>
              </div>
              a similar system set in place.<br>
              <br>
            </div>
            <div>Can anyone provide information about this and how other
              people have done it..<br>
            </div>
            <div><br>
            </div>
            I am using Drupal 6<br>
            <br>
          </div>
          Thanks,<br>
          <br>
        </div>
        Rotsen<br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
    </blockquote>
    <br>
  </div></div></div>

<br>--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br></blockquote></div><br></div>