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

    Auto switching theme on iOS and Blackberry

    Scheduled Pinned Locked Moved webGUI
    2 Posts 2 Posters 1.5k 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.
    • J
      jamesc
      last edited by

      Hi all,

      I'm working on my own theme and i'm trying to locate the code that automatically switches the theme to 'pfSense' when accessing the WebGUI from an iPad/Blackberry.  I would like to get the standard themes working with these devices, I believe the problem is because of the mouse hover event in the CSS doesn't work on iPads because they are touchscreen.

      I'd like to comment out the code that does the theme switch so I can do some testing on an iPad.

      EDIT: I found the below on line 76 of guiconfig.inc but commenting it out doesn't seem to work:

      $apple_ua = array("iPhone","iPod", "iPad");
      foreach($apple_ua as $useragent)
      	if(strstr($_SERVER['HTTP_USER_AGENT'], $useragent))
      		$g['theme'] = "pfsense"; 
      

      EDIT 2: I found the code in head.inc  :)

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

        That's a fairly old version of the code, but yeah that's the part.

        It actually works fine on Android which is odd because Android's browser and the iOS browser are both webkit.

        Though the theme may work, the other theme does tend to handle better on small screen devices anyhow, it's really easy to miss the menus when they drop-down.

        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.