<div dir="ltr"><div>OK,<br><br></div>THANKS!!!<br><br>:-)<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 12, 2014 at 7:20 AM, Jamie Holly <span dir="ltr"><<a href="mailto:hovercrafter@earthlink.net" target="_blank">hovercrafter@earthlink.net</a>></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>Put the actual banner HTML at the
bottom of your theme's page.tpl.php file or add it to page_bottom
in a page_alter hook in your theme. Then just include the
javascript on any path/page you want it to load on.<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/12/2014 10:10 AM, Néstor wrote:<br>
</div></div></div><div><div class="h5">
<blockquote type="cite">
<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"><<a href="mailto:hovercrafter@earthlink.net" target="_blank">hovercrafter@earthlink.net</a>></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't really a great idea. You end
up frustrating more people than it's worth. The better
option is a banner that displays at the top of the page.
Here's how I've done it in the past for clients:<br>
<br>
<body><br>
<br>
<div id="my-app-banner">yada yada yada</div><br>
</body><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>
$('body').addClass('show-app-banner');<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><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> On 3/11/2014 7:09 PM, Néstor wrote:<br>
</div>
</div>
</div>
<div>
<div>
<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
"APP store" (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>
<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>