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 is the New Mobile Functionality Supposed to Work?

edited October 2010 in Vanilla 2.0 - 2.8
I upgraded to 2.0.13 from 2.0.11 for the new "automatic mobile theme" functionality. However, when I visit my forum from my iPhone, it displays the default Vanilla theme. This is true whether my current applied theme is a custom theme that I designed, or the default Vanilla theme.

So, the code seems to recognize that it is being visited by a mobile browser (Safari/iPhone), yet it always displays the default Vanilla theme in that case - not the mobile theme.

As a test, I activated the Mobile Theme as my default. In this case, visiting the forum from my phone still displayed the default Vanilla theme, while visiting from my desktop showed the mobile theme.

It seems to think the default theme is the mobile theme. Any one else experiencing this? How to fix it?


  • Figured it out. The problem was that I had not updated my config-defaults.php file after upgrading.
  • RaizeRaize vancouver ✭✭
    edited October 2010
    What needs to be updated about it? I'm having the same issue
  • don't forget to upload the mobile theme (themes directory) also
  • RaizeRaize vancouver ✭✭
    Heads up...

    In the upgrade instructions it says to leave the "conf" folder intact, but the mobile theme will not work if you do that.

    In order for the mobile theme to kick in on mobile phones, you have to over write the old "config-defaults.php" file with the new one in the 2.0.13 package.

    Thanks @artagesw
  • Doesn't seem to work for me, trying this on an Android phone :(.
  • rayk, I was having the same problem with Android. Vanilla did not have a rule for Android in its mobile browser detection. I added one and submitted it via Github, and It was accepted into Vanilla. It should be in the next release, but if you want Android mobile support now and don't mind getting your hands dirty, you can see the change on Github here:
  • LincLinc Detroit Admin
    edited November 2010
    @Raize You should always overwrite config-defaults.php during an upgrade. It's config.php that you do not overwrite (hence why it isn't in the package).
  • edited November 2010
    There's a pretty serious issue I found with the new Mobile functionality.

    I have my forum set where you can only read discussions if you are an approved member (signed in). Otherwise it just redirects you to the login page. This works fine on a browser, but it does NOT work on Mobile/Mobile Theme. So anyone who goes to my forum on a mobile can have full access to read everything.

    This is a pretty serious security issue. Is there a way to fix this? Or a way to disable the mobile functionality until it gets fixed??
  • RaizeRaize vancouver ✭✭
    I think you can disable the mobile theme by going to the config.php and changing the setting from "TRUE" to "FALSE"
  • I'm not getting the mobile theme to work either. It just shows my normal theme. And even if I choose Mobile as the forum's main theme, it shows up on my Android phone like a desktop theme, i.e. waaay to wide and not properly scaled. The forums here look fine with my phone, though.

    Any checks I can do to narrow down the problem on my end?
  • I get a bonk screen when I try to access my Vanilla forum on my iPhone. I haven't modified the mobile theme at all. I am useing 2.0.13.
  • when disabling mobile theme, vanilla uses the default theme on mobile instead of my custom theme.

    i placed this in the config file:

    $Configuration['Garden']['MobileTheme'] = FALSE;

    how can i have my theme used for any device?
  • MarkMark Vanilla Staff
    @glow - Just specify the name of your theme folder in that same setting instead of "FALSE".
  • working fine, thank you @Mark
  • I'm having the same issue that android users where seeing on my webOS device. I wonder if it would be possible to just add another loop there to check for that user agent string as well. My php is horrid but I may open it up tomorrow and dig around a bit.
Sign In or Register to comment.