This topic is locked

iPhone and CSS

4/13/2009 9:33:10 AM
PHPRunner General questions
G
glen author

Good morning:
I can go ahead and adjust the size of the display and output using PHPRunner, however, the iPhone does not detect that the display was generated for it, and displays a full width version on the browser.
What changes do I make and where do I make them so that the iPhone will access the PHPRunner page and display appropriately?
Thanks

Glen

hichem 4/13/2009

Good morning:

I can go ahead and adjust the size of the display and output using PHPRunner, however, the iPhone does not detect that the display was generated for it, and displays a full width version on the browser.
What changes do I make and where do I make them so that the iPhone will access the PHPRunner page and display appropriately?
Thanks

Glen


Sounds like a great feature request for the PHPR team.

The answer is twofold:

1- Detection of mobile phone

2- Applying mobile specific CSS for PHPR project
The first part can be tacked in a few ways and here's a couple of interesting options I came across, there is probably more:

http://www.phpdevblog.net/tag/wurfl.html

http://www.russellbeattie.com/blog/mobile-...etection-in-php

http://detectmobilebrowsers.mobi/#usage
Besides auto-detecting mobile devices, you could also offer a link for users to click on and get redirected to a mobile version of your site.
The second part is where we'd have to ask Jane and Sergey nicely to include for every PHPR existing template a mobile one. may be also include this feature in next release to allow us to define the mobile page content from within PHPR. This can get tricky (at least for my skill set) as it involves menu adjustement, resizing charts or may be converting these to images before loading these on a mobile etc.
It would definitly be great to have this included in PHPR as it would make it more maintaneable solution

Hope this helps
Hich

G
glen author 4/13/2009



Sounds like a great feature request for the PHPR team.

The answer is twofold:

1- Detection of mobile phone

2- Applying mobile specific CSS for PHPR project
The first part can be tacked in a few ways and here's a couple of interesting options I came across, there is probably more:

http://www.phpdevblog.net/tag/wurfl.html

http://www.russellbeattie.com/blog/mobile-...etection-in-php

http://detectmobilebrowsers.mobi/#usage
Besides auto-detecting mobile devices, you could also offer a link for users to click on and get redirected to a mobile version of your site.
The second part is where we'd have to ask Jane and Sergey nicely to include for every PHPR existing template a mobile one. may be also include this feature in next release to allow us to define the mobile page content from within PHPR. This can get tricky (at least for my skill set) as it involves menu adjustement, resizing charts or may be converting these to images before loading these on a mobile etc.
It would definitly be great to have this included in PHPR as it would make it more maintaneable solution

Hope this helps
Hich


Thank you Hich - I appreciate your time and hope Jane and Sergey are able to help out with mobile inclusion. Glen

S
spoilar 4/23/2009

To change the width of page when viewed with an iPhone, just add this line to the <head> of the page.
[codebox]<meta name="viewport" content="width=800"; />[/codebox]
You can change the width to suit your needs.
All other browsers besides MobileSafari will ignore this.

cyberjas2001 4/23/2009

Thanks Spoilar, very usefull tip!!!