Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all,
Vanilla are planning an update to the site on April 24th (next Wednesday). It is a major PHP8 update which is expected to boost performance across the site. The site will be down from 7pm and it is expected to take about an hour to complete. We appreciate your patience during the update.
Thanks all.

Mobile version of website

  • 22-12-2011 2:45pm
    #1
    Registered Users Posts: 3,056 ✭✭✭


    Hi all,

    *Red Face* - possibly silly question here - I’ve created a mobile version of my website using a mobile theme template and assigned it to a “m” directory on my hosting – it is not showing up on my smart phone. Do I need to specify or alter settings on my hosting panel for mobile devices to automatically see the mobile version on the "m" directory?

    Thanks in advance!


Comments

  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    You'll need to sniff the browser making the request and redirect any coming from a mobile device to /m.

    StackOverflow thread on how to do this with htaccess on Apache.


  • Registered Users Posts: 3,056 ✭✭✭sticker


    You'll need to sniff the browser making the request and redirect any coming from a mobile device to /m.

    StackOverflow thread on how to do this with htaccess on Apache.

    Thanks for the reply - Seems quite involved! - so is it a server side change or code added or both?


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    It could be either. You could use the server to redirect to a different codebase, use PHP or ASP to deliver modified versions of the same site, or even design the HTML & CSS to adapt depending on the screen size (Responsive Design).


  • Registered Users Posts: 11,977 ✭✭✭✭Giblet


    It could be either. You could use the server to redirect to a different codebase, use PHP or ASP to deliver modified versions of the same site, or even design the HTML & CSS to adapt depending on the screen size (Responsive Design).

    Responsive Design > UA sniffing.

    How do you choose between a mobile site or full site for something like an iPad?
    And how to do you keep up with the latest UA's?

    The answer is to create one website that works for everything.


  • Banned (with Prison Access) Posts: 188 ✭✭pixeldesign


    Giblet wrote: »
    Responsive Design > UA sniffing.

    How do you choose between a mobile site or full site for something like an iPad?
    And how to do you keep up with the latest UA's?

    The answer is to create one website that works for everything.

    Giblet is right. I was thinking to build a separate template for mobile devices, but then i realised the easiest and best way is to create another stylesheet for mobile devices.


  • Advertisement
  • Registered Users Posts: 3,056 ✭✭✭sticker


    I have a client that has a perfectly good site that works on ipad/iphone but simply wants a mobile "calling card" f contact details in a mobile framework - I've downloaded a straightforward mobile template from Theme Forest and simply want it to apply when a mobile device access it.

    I assumed it was so simply place the files in an "m" fodler on the root of the domain hosting, but it looks far more involved now...


  • Banned (with Prison Access) Posts: 188 ✭✭pixeldesign


    Ok you might want to use javascript for that like this http://css-tricks.com/snippets/javascript/redirect-mobile-devices/

    But what if they dont support javascript?Then the safest way is to use php and check the user agent like this http://www.9lessons.info/2010/09/redirect-mobile-devices-with-php.html


  • Registered Users Posts: 3,056 ✭✭✭sticker


    Ok you might want to use javascript for that like this http://css-tricks.com/snippets/javascript/redirect-mobile-devices/

    But what if they dont support javascript?Then the safest way is to use php and check the user agent like this http://www.9lessons.info/2010/09/redirect-mobile-devices-with-php.html

    Thanks for that! much appreciated!


  • Registered Users Posts: 2,343 ✭✭✭Kavrocks


    sticker wrote: »
    I assumed it was so simply place the files in an "m" fodler on the root of the domain hosting, but it looks far more involved now...
    Assumption is the mother of all f**k ups.


  • Registered Users Posts: 3,056 ✭✭✭sticker


    Kavrocks wrote: »
    Assumption is the mother of all f**k ups.

    Thanks for the insight Kavrocks -


  • Advertisement
Advertisement