Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: iPhone intergration

  1. #1
    Join Date
    Nov 2003
    Location
    NYC
    Posts
    115

    Default iPhone intergration

    has anyone converted OR to an iPhone web app page ?

  2. #2
    Join Date
    May 2004
    Location
    Long Island, NY
    Age
    49
    Posts
    9,796

    Default Re: iPhone intergration

    I don't think there is anything special for the iphone, you just need to create a css file for mobile devices.

    You would copy your regualr css file, convert it to mobile standards, and save it as something like mobile.css. Then in your main.html you would have 2 css links. Instead of using the {load_css_XXX} tag in your main.html file use:

    <link rel="stylesheet" href="style.css" media="screen">
    <link rel="stylesheet" href="mobile.css" media="handheld">

    This should load style.css for regular browsers and mobile.css for mobile browsers.

  3. #3
    Join Date
    Jan 2006
    Posts
    253

    Arrow Re: iPhone intergration

    Stepping off-base here, my understanding is that the Safari browser used on iPhone/iPod Touch declares itself as a full-sized browser rather than as a handheld device and as such designers need to predicate their considerations upon screen-size rather than "agent".

    PBFlash's observations as sound though; we tend to have one style-sheet for "handheld" that uses styles that devices like Nokia phones (with their crippled browser functionality) can use, another for "small-screen" devices optimised at between 480-800px for iPhone, iPod Touch and devices like the 7" Asus EEEPC, and then full full-screen devices.

    I have attached here a very crude (and largely untested) example; create a duplicate of cms_integration and unpack the contents of example.zip being careful to only replace main.html (and not the whole images folder).

    Test. This example uses an Addon (from PB as I recall) called Classmenu. Based upon a clean install this gives a link to Homes, Land, Farms, Commercial and Rental. The drop-down menu icon on the right-hand-side gives access to the standard O-R links in a drop down list.

    CAVEAT. This uses the standard O-R templates for search, results, listings details etc and these (based as they are upon table layouts, etc) may need hacking to get right.

    You can use iPhoney from Marketcircle to test your designs on a Mac and (maybe) Safari3 (or the iPhone Developers SDK from Apple?) for Windows.

    As I say, with a hack or two this will work for most screen sizes and help you optimise for both symbian/palm/nokia type devices, mini-screen devices like iPhone and small-screen like the new crop of Asus/HP/Dell palmtops.

    I'm sure me and many other would like to know how you get on; could you please let us know how this develops for you?

    JiF

    Zudos: With thanks to the guys at Realmacsoftware.com for the stock iPhone browser template used in this example (you didn't think it was all my own work did you...
    Attached Files Attached Files

  4. #4
    Join Date
    May 2006
    Posts
    200

    Default Re: iPhone intergration

    2 lines needed for iPhone

    Code:
    <link rel="apple-touch-icon" href="http://www.websiteaddress.com/apple-touch-icon.png"/>
    This places an iPhones icon (which u need to design) onto your iphone if you bookmark the site.

    Code:
    <meta name="viewport" content="width=808" />
    This resizes the browser window for safari mobike devices

    These DO work as i have optimized my own site for iPhone

    Ad.

  5. #5
    Join Date
    Jan 2006
    Posts
    253

    Default Re: iPhone intergration

    Great tips; Adamck.

    Anyone else?

    jiF

  6. #6
    Join Date
    May 2006
    Posts
    200

    Default Re: iPhone intergration

    What the "viewport" does is lock the width of the site to the screen size of the iPhone so that you dont need a horizontal scrollbar
    I know sites like ebay and facebook have iPhone specific templates which you are redirected to automatically,
    Have a view or the source codes on facebook and ebay
    and try repeat the sizing / layour of there iPhone templates.

    http://iphone.facebook.com
    https://iphone.ebay.com/index.asp

    This code will redirect your visitors to an iPhone friendly page
    Code:
    <script language=javascript>
    <!--
    if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)))
    {
    location.replace("iphone-version.html");
    }
    -->
    </script>
    I know for my site i edited a core file which allows me to have &template=iphone in my url which changes the template on that page to whatever i add to the template variable in the url
    This could work out helpful! (CORE mods are not reccommended but was the only simple way i could find to do this)

  7. #7
    Join Date
    May 2006
    Posts
    200

    Default Re: iPhone intergration

    ok i have managed a full iPhone integration now.
    The screensize fits perfect, all features work and the hompage auto send the iphone to the iphone template
    i may upload the template at some point but as above i did have to core mod it to get it to work (not reccomended) but it was only +2 lines of code which can be easily added after an update.
    if im allowed to upload it (asks for permission) then i will.

  8. #8
    Join Date
    May 2004
    Location
    Long Island, NY
    Age
    49
    Posts
    9,796

    Default Re: iPhone intergration

    if im allowed to upload it (asks for permission) then i will.
    You can upload the template but you cannot post the core changes. You could submit a feature request to have the changes added for future versions.

  9. #9
    Join Date
    Jan 2006
    Posts
    253

    Thumbs up Re: iPhone intergration

    Quote Originally Posted by pbflash View Post
    You can upload the template but you cannot post the core changes. You could submit a feature request to have the changes added for future versions.
    You beat me to it PBF; I was about to suggest the feature-request option, or possibly for Adamck to post a suggestion in the Addons forum for someone to "help him" create the code as a template extension?

    JiF

  10. #10
    Join Date
    May 2006
    Posts
    200

    Default Re: iPhone intergration

    I'll post a feature request
    Ad.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •