Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Manual patch to facilitate iPad use with 1.2.3-RELEASE

    Scheduled Pinned Locked Moved webGUI
    3 Posts 3 Posters 2.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • X
      Xyzzy
      last edited by

      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.)

      1 Reply Last reply Reply Quote 0
      • T
        tebeve
        last edited by

        Thank you for that, worked great.

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          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'];
          
          

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.