Mobile Theme Switcher iPad

Permalink
Hi everyone. I've been trying to figure this out but I can't get it to work for the life of me. I've upgraded to 5.6.0.1 and I see that the mobile switcher is incorporated into the core files but now my site switches to the mobile theme for both mobile and tablet devices. How can I get it so that it switches to the mobile site for mobile but to the regular site for ipad and other tablets like it used to before the upgrade?

Any help would be appreciated. Thanks.

 
muhlegg replied on at Permalink Best Answer Reply
You need to override Mobile_Detect->is_mobile(). The class is located in libraries/3rdparty/

Tablet's should not be treated as mobile by default in my opinion, or at least there should be an easy option for this in the dashboard. I guess we'll have a checkbox next to the mobile theme selector in the next update :)

public function isMobile()
{
     return ($this->isMobile && !$this->isTablet());
}
aurashz replied on at Permalink Reply
worked like a charm. Thank you!
bryanlewis replied on at Permalink Reply
bryanlewis
thank you! that worked great!
Malko replied on at Permalink Reply
Thanks! it worked perfect!!


I also wonder if i can to use a sub-domain as a small website just html site.

But i want to redirect the mobile users to it automatically i've tried a lot of redirection codes but in vain :S

Any help pls?

thx
juddc replied on at Permalink Reply
juddc
I've tried this but got nothing - I replaced lines 196-199 in mobile-detect.php. Any other advice? Its driving me around the bend.

On v 5.6.1
juddc replied on at Permalink Reply
juddc
Nevermind - its working. Duh.
webtodesigns replied on at Permalink Reply
webtodesigns
Hi,

Is there a solution for this for 5.6.2.1 as the mobile_detect.php seems to have changed.

-Garen
muhlegg replied on at Permalink Reply
Well
if($md->isMobile() && !$md->isTablet()) { ... }
should work but that is quite ugly.
AccountDisabled replied on at Permalink Reply
Another option to redirect just mobile or mobile and tablet devices to a mobile page or even a separate domain is Mobile Home. More info on the concrete5 Marketplacehttp://www.concrete5.org/marketplace/addons/mobile-home/...

Cheers!