Manual patch to facilitate iPad use with 1.2.3-RELEASE
-
I realize that development has stopped on 1.2.3, but thought someone else might be able to use this information. The only "theme" that will work with the iPhone/iPod/iPad touch screen is "pfsense". There is code in the WebGui that automatically switches to this theme for the iPhone and iPod, but it hasn't been updated for the iPad.
To change, edit the file /usr/local/www/head.inc and add "iPad" to the line beginning "$apple_ua = array…" (about line #11)
$apple_ua = array("iPhone","iPod","iPad"); foreach($apple_ua as $useragent) if(strstr($_SERVER['HTTP_USER_AGENT'], $useragent)) $g['theme'] = "pfsense";
(This same code appears in /usr/local/www/guiconfig.inc but changing it doesn't seem to have any effect.)
-
Thank you for that, worked great.
-
You should grab the code from 2.0 which also handles Android and isn't Apple-specific:
$lowres_ua = array("iPhone","iPod", "iPad", "Android"); foreach($lowres_ua as $useragent) if(strstr($_SERVER['HTTP_USER_AGENT'], $useragent)) $g['theme'] = empty($g['theme_lowres']) ? "pfsense" : $g['theme_lowres'];
Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.