PDA

View Full Version : iPhone/iPod [+REP]



Calvin
04-08-2010, 01:09 PM
Hey, i've done a little mobile website thing, well just a simple page so listeners can go on there on their iPod/iPhone or Blackberries but theres one problem. I'm loading the page on my iPod and it looks small, where as some mobile websites are fine on the iPod. What do I add to the style to make it the size of the iPod?

Here is what it looks like on my iPod:
http://rbguides.com/screenshots/22a0f8c9.png

Heres what I want it to look like:
http://rbguides.com/screenshots/ba7cd7db.png

Thanks. :)

Jamesy
04-08-2010, 01:12 PM
Heres a nice guide for mobile devices :) http://labs.thesedays.com/2010/07/16/10-tips-for-designing-mobile-websites/

in particular:
<meta id="viewport" name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />

Calvin
04-08-2010, 01:16 PM
Heres a nice guide for mobile devices :) http://labs.thesedays.com/2010/07/16/10-tips-for-designing-mobile-websites/

in particular:
<meta id="viewport" name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />Thanks Jamesy, that's perfect! :D +Rep! And i'll bookmark that guide, it's quite useful for when designing mobile websites. :)

Also any idea of a code to automatically send a user to the mobile page if they go to http://stancefm.com (http://stancefm.com/)?

Jamesy
04-08-2010, 01:23 PM
I think you'd check their browser agent, I think there are many guides on t'internet :)

Apolva
04-08-2010, 04:01 PM
Here's a quickie (not tested).


<?php
$ua=strtolower($_SERVER['HTTP_USER_AGENT']);

if(strpos($ua,"ipod")!==FALSE || strpos($ua,"iphone")!===FALSE) {header("http://mobile.stancefm.com/iphone/");die();}
if(strpos($ua,"blackberry")!==FALSE) {header("http://mobile.stancefm.com/blackberry/");die();}
?>

Jordan
04-08-2010, 04:22 PM
Whats this for btw? :L

Apolva
04-08-2010, 05:01 PM
Whats this for btw? :L
I'd imagine online radio?

Just to add to my last post, here's an improved version with support for iPad and android devices:



<?php
$ua=strtolower($_SERVER['HTTP_USER_AGENT']);

if(strpos($ua,"ipod")!==FALSE || strpos($ua,"iphone")!===FALSE) {header("http://mobile.stancefm.com/iphone/");die();}
if(strpos($ua,"ipad")!==FALSE) {header("http://mobile.stancefm.com/ipad/");die();}
if(strpos($ua,"blackberry")!==FALSE) {header("http://mobile.stancefm.com/blackberry/");die();}
if(strpos($ua,"android")!==FALSE) {header("http://mobile.stancefm.com/android/");die();}
?>

Calvin
04-08-2010, 05:31 PM
I'd imagine online radio?

Just to add to my last post, here's an improved version with support for iPad and android devices:



<?php
$ua=strtolower($_SERVER['HTTP_USER_AGENT']);

if(strpos($ua,"ipod")!==FALSE || strpos($ua,"iphone")!===FALSE) {header("http://mobile.stancefm.com/iphone/");die();}
if(strpos($ua,"ipad")!==FALSE) {header("http://mobile.stancefm.com/ipad/");die();}
if(strpos($ua,"blackberry")!==FALSE) {header("http://mobile.stancefm.com/blackberry/");die();}
if(strpos($ua,"android")!==FALSE) {header("http://mobile.stancefm.com/android/");die();}
?>
Thanks so much, I searched it but couldn't find anything decent. Thanks! +REP.

kk.
04-08-2010, 05:41 PM
http://stancefm.com/m/ I'd perhaps use sharper images

Want to hide these adverts? Register an account for free!