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.

How do I redirect old browsers to the Mobile theme?

edited February 2011 in Vanilla 2.0 - 2.8

I have a lot of users that are forced to use old versions of IE in corporate environments. How do I redirect these guys to the Mobile theme so it's more functional for them?



  • Options
    I think that you must find a plcae in Vanilla where it determinates if mobile browser is used and add regulas expression ot include your IE version to it.
  • Options
    Here is details:

    Look for this code in library\core\functions.general.php
    function IsMobile() { $Mobile = 0; $AllHttp = strtolower(GetValue('ALL_HTTP', $_SERVER)); $HttpAccept = strtolower(GetValue('HTTP_ACCEPT', $_SERVER)); $UserAgent = strtolower(GetValue('HTTP_USER_AGENT', $_SERVER)); if (preg_match('/(up.browser||mmp|symbian|smartphone|midp|wap|phone|opera m)/i', $UserAgent)) $Mobile++;

    I think that you get and idea how to change this.
  • Options
    Thanks but how would I match only MSIE 6.0?
Sign In or Register to comment.