Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Is there a URL path to get to the 'mobile' version of my forum?

whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP
edited June 2011 in Vanilla 2.0 - 2.8
I understand that the mobile theme is served to most mobile devices, but wondered if there was a way to find it from a Kindle, for example?

Thanks.

Best Answer

  • lucluc ✭✭
    Answer ✓
    You shouldn't add the line, find the first line and replace it with the second line.

    I put the lines in the comment so it's easier to understand where and how you add the "|kindle" part.

Answers

  • lucluc ✭✭
    What's the user agent like from a kindle?
  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP
    luc - by that do you mean the web browser?

    It's a proprietary format which delivers pages OK, without Flash support.

    My main site comes up fine on the Kindle, but to be seen properly you need to zoom.

  • lucluc ✭✭
    The web browser has a signature (user-agent), and that's what's used to provide the mobile version to the mobile web browser, the one for the kindle is surely not in there, that's why you're presented with the standard theme.
  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP
    luc

    I understand that, but, for example, on the BBC or Guardian you have the option of choosing the mobile url.

    I just wondered if i could 'force' the mobile url onto the Kindle.
  • lucluc ✭✭
    That's not possible yet.
    If you provide it, there's a good chance it will be added in the version (2.0.18b3 is just around the corner), so the full release might not take too long now.
  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP
    Thanks luc -

    I assume you mean the 'user-agent' for Kindle.

    How would I provide it?

  • lucluc ✭✭
    Use this for instance: http://whatsmyuseragent.com/
  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP
    OK luc (thanks for taking the time here!)

    It is this:

    Kindle 3 User Agent:

    Mozilla/5.0 (Linux; U; en-US) AppleWebKit/528.5+ (KHTML, like Gecko, Safari/538.5+) Version/4.0 Kindle/3.0 (screen 600x800; rotate)

    Who do I report it to?
  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP
    Slight quirk in this 'Question' format is that I'm having to 'reject' perfectly good, and very helpful responses, because the issue isn't fully resolved.
  • lucluc ✭✭
    Here is OK, hopefully I'll find some time on a proper PC and find where it should and do a pull request to the devs, unless they beat me to it.
  • lucluc ✭✭
    edited June 2011
    For the moment, you can try to edit your library/core/functions.general.php and in the IsMobile function (around line 1046 for latest stable), after "opera m" add "|kindle"

    if (preg_match('/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|opera m)/i', $UserAgent))
    if (preg_match('/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|opera m|kindle)/i', $UserAgent))

    If it works OK, I'll do the changes once back home and do a pull request so it goes into the next version.
  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP
    luc

    Thanks very much for your help.

    I've added that line as you suggested, but as far as I can tell it is still the standard page that is served up to the Kindle atm.

    I've 'rejected' your answer - but think this may have gone as far as it can here.

    If that is the case, if you let me know I'll accept your next answer and the question can be closed.

    Thanks again for your help.
  • lucluc ✭✭
    Answer ✓
    You shouldn't add the line, find the first line and replace it with the second line.

    I put the lines in the comment so it's easier to understand where and how you add the "|kindle" part.
  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP
    Genius!

    That did the trick.

    Thanks so much for your time and help.
  • Okay, so my understanding is that there isn't just a mobile url for each install? I'm having an issue with mobile vs forced embed that i'm trying to find a workaround for.

    Example: We can't just go to mysite.com/forums/mobile.php as opposed to mysite.com/forums/index.php?
  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP
    JiveDig - since I marked this as 'answered' you may not get much of a response.

    Maybe start a new question and reference this one?
Sign In or Register to comment.