Home > HowTo's > HowTo: Deactivate mobile theme detection

HowTo: Deactivate mobile theme detection

September 11th, 2009 Leave a comment Go to comments

Since gregarius won’t be updated anymore, new errors occur in combination with browsers like Internet Explorer 8. For example if you browse with Internet Explorer 8 on your Gregarius site, Gregarius shows the mobile theme.
An easy workaround is disabling the mobile detection of Gregarius.


1. Backup your existing themes.php located in your Gregarius root directory.
2. Uncomment LINE 135 of themes.php:

from

elseif (isset($_SESSION['mobile']) || isset($_REQUEST['mobile']) || isMobileDevice()) {
        $media = 'mobile';
    }

to

 /**  elseif (isset($_SESSION['mobile']) || isset($_REQUEST['mobile']) || isMobileDevice()) {
        $media = 'mobile';
    }
    */

3. save, upload and overwrite themes.php
4. done, now you can browse with internet explorer 7-8 without showing the mobile theme.


Download

modified themes.php


Categories: HowTo's
  1. afif
    November 8th, 2009 at 10:26 | #1

    I found that if you remove just the “Tablet” from isMobileDevice() function in themes.php it is sufficient.

    Just remove the line
    || (strpos($ua, ‘Windows CE’) !== FALSE)

    from the function.

  2. afif
    November 8th, 2009 at 15:21 | #2

    @afif
    I meant remove this line:
    || (strpos($ua, ‘Tablet’) !== FALSE)

    sorry wrong cut/paste…

    I think the problem is with Windows that has Tablet functions installed.

  1. No trackbacks yet.