Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

In this Discussion

Switch back to mobile theme

A user accesses our site via mobile. He switched to the Full Site version at the link at bottom, but can't seem to switch back.

I've tried doing the same myself and similarly there's no way I can see of doing it.

Any advice anyone?

(P.S. i'd have searched but the site search isn't bringing up any results, few for simpler queries)

Best Answer

Answers

  • Thanks hbf. I advised user to do this but being fairly tech-phobic they're still using normal version.

    Might be a suggestion for later release to add a 'revert' link.

  • lucluc ✭✭

    OnlyAnExcuse said: Thanks hbf. I advised user to do this but being fairly tech-phobic they're still using normal version.

    Might be a suggestion for later release to add a 'revert' link.

    Already added.

  • SheilaSheila ✭✭

    luc said:

    Might be a suggestion for later release to add a 'revert' link.

    Already added.

    Hi! Does this mean that the 'revert' link has already been added or that it is gonna be included in the future release?

    Don't find the option when testing my site with phone. Meanwhile, is it possible how to add manually a link to footer with switching back to mobile site -option?

  • A side question - Is there a way to use firefox or chrome and spoof to pretend you are a mobile device to see what it would look like to mobile users (in the case where you don't have a mobile device to test on).

    never mind: found this http://stackoverflow.com/questions/464089/simulators-emulators-for-mobile-browser-testing


    factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!

    Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant

  • hbfhbf wiki guy? MVP

    Sheila said:

    luc said:

    Might be a suggestion for later release to add a 'revert' link.

    Already added.

    Hi! Does this mean that the 'revert' link has already been added or that it is gonna be included in the future release?

    Don't find the option when testing my site with phone. Meanwhile, is it possible how to add manually a link to footer with switching back to mobile site -option?

    Its part of the next release.

  • Hi guys,

    I had the same problem. Here is how i solved it:

    Just go to applications/dashboard/controllers/class.profilecontroller.php and look for this: function NoMobile, should be at line 363. Copy that function under it, change the name to "Mobile", and at Expiration variable, put this: $Expiration = time() - 172800;

    So replace the + with a - This will destroy the cookie, and you can add a link to your default.master.tpl for the desktop version of your forum, this link: www.yoursite.com/profile/mobile

    That's it.

    Regards, Vali.

    vrijvlinder
  • vrijvlindervrijvlinder CSS Addict MVP

    @valizr said: Hi guys,

    I had the same problem. Here is how i solved it:

    Just go to applications/dashboard/controllers/class.profilecontroller.php and look for this: function NoMobile, should be at line 363. Copy that function under it, change the name to "Mobile", and at Expiration variable, put this: $Expiration = time() - 172800;

    So replace the + with a - This will destroy the cookie, and you can add a link to your default.master.tpl for the desktop version of your forum, this link: www.yoursite.com/profile/mobile

    That's it.

    Regards, Vali.

    thanks for that, can you be a bit more specific about what to copy ? do I copy the entire function from this:

    public function NoMobile() { $Expiration = time() + 172800; $Expire = 0; $UserID = ((Gdn::Session()->IsValid()) ? Gdn::Session()->UserID : 0); $KeyData = $UserID."-{$Expiration}"; Gdn_CookieIdentity::SetCookie('VanillaNoMobile', $KeyData, array($UserID, $Expiration, 'force'), $Expire); Redirect("/", 302);

    to this ?:

    public function Mobile() { $Expiration = time() - 172800; $Expire = 0; $UserID = ((Gdn::Session()->IsValid()) ? Gdn::Session()->UserID : 0); $KeyData = $UserID."-{$Expiration}"; Gdn_CookieIdentity::SetCookie('VanillaNoMobile', $KeyData, array($UserID, $Expiration, 'force'), $Expire); Redirect("/", 302);

    |̲̅̅●̲̅̅|̲̅̅=̲̅̅|̲̅̅●̲̅̅| - ☊ - ♫ ♪ ♪ ♫ ♩ ♬ ♬ ♮ ♯ ♫ ♪ ♪ ♫ ♩ ♬ ♭ ....... (•̪●)(•̪●)

  • vrijvlindervrijvlinder CSS Addict MVP

    Ok since no one got back to me I experimented with the above. I placed the second function in the class.profilecontroller.php. I added a link back to the mobile version in my Main forum page . This works very well. However I have one small bug in one of the forums where the link works to take me back to mobile version but auto refreshes back to the full site.

    The code is exactly the same. Works great on three forums . Got to figure out why the one refreshes back....

    |̲̅̅●̲̅̅|̲̅̅=̲̅̅|̲̅̅●̲̅̅| - ☊ - ♫ ♪ ♪ ♫ ♩ ♬ ♬ ♮ ♯ ♫ ♪ ♪ ♫ ♩ ♬ ♭ ....... (•̪●)(•̪●)

  • vrijvlindervrijvlinder CSS Addict MVP

    @peregrine said: A side question - Is there a way to use firefox or chrome and spoof to pretend you are a mobile device to see what it would look like to mobile users (in the case where you don't have a mobile device to test on).

    never mind: found this http://stackoverflow.com/questions/464089/simulators-emulators-for-mobile-browser-testing

    All you need to do is change the **User Agent **of the Browser to whatever you want. :)

    |̲̅̅●̲̅̅|̲̅̅=̲̅̅|̲̅̅●̲̅̅| - ☊ - ♫ ♪ ♪ ♫ ♩ ♬ ♬ ♮ ♯ ♫ ♪ ♪ ♫ ♩ ♬ ♭ ....... (•̪●)(•̪●)

  • Set your browser User-Agent string to:

    Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3

  • Украдено у дизайнера из Украины.

    HalfCatvrijvlinderkasperisager
  • phreakphreak VanillaSkins.com ✭✭

    There is not yet a solution for this i guess. Deleting cookies or waiting till they are deleted isn't a way comunities without tech-savvy can go. An inbuilt solution would be very important.

    VanillaSkins.com Themes / Custom Themes / Design & Graphics for Vanilla

Sign In or Register to comment.