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.

Mobile Theme Selection

I've been setting up a copy of Vanilla forums on my webserver, and so far so good. I even found a great theme that works as both a desktop and mobile theme. I've only run into one problem. Vanilla just won't use it as it's mobile theme If I request the desktop theme it gives me the mobile version on my phone, but if I just have it give the mobile them, it gives me the default. I removed all themes but the one I want, and it still uses the default. I'm stumped. How do I tell Vanilla to use a theme as the mobile theme?

Comments

  • R_JR_J Ex-Fanboy Munich Admin

    Add the following line to /conf/config.php:
    $Configuration['Garden']['MobileTheme'] = 'YourDesiredThemeName';

  • That did not work. Now instead of using the default mobile theme, it's using he default desktop theme, rather than the one I wanted. Here's the configuration for reference.

    //Already in the config
    $Configuration['Garden']['ThemeOptions']['Name'] = 'Bootstrap';
    $Configuration['Garden']['ThemeOptions']['Styles']['Key'] = 'Slate';
    $Configuration['Garden']['ThemeOptions']['Styles']['Value'] = '%s_slate';
    //Added by me
    $Configuration['Garden']['MobileTheme'] = 'Bootstrap';

    That didn't work.

    With that not working, I tried changing it, thinking mobile theme might work in a way consistent with theme options.

    //Already in the config
    $Configuration['Garden']['ThemeOptions']['Name'] = 'Bootstrap';
    $Configuration['Garden']['ThemeOptions']['Styles']['Key'] = 'Slate';
    $Configuration['Garden']['ThemeOptions']['Styles']['Value'] = '%s_slate';
    //Added by me
    $Configuration['Garden']['MobileTheme']['Name'] = 'Bootstrap';
    $Configuration['Garden']['MobileTheme']['Styles']['Key'] = 'Slate';
    $Configuration['Garden']['MobileTheme']['Styles']['Value'] = '%s_slate';

    That didn't work either.

  • hgtonighthgtonight ∞ · New Moderator
    edited July 2014

    I used the following config options:

    $Configuration['Garden']['Theme'] = 'bootstrap';
    $Configuration['Garden']['ThemeOptions']['Name'] = 'Bootstrap';
    $Configuration['Garden']['ThemeOptions']['Styles']['Key'] = 'Slate';
    $Configuration['Garden']['ThemeOptions']['Styles']['Value'] = '%s_slate';
    $Configuration['Garden']['MobileTheme'] = 'bootstrap';
    

    In a fresh install of Vanilla 2.1 and saw the proper theme with all user agents.

    The key is the lower case bootstrap is the theme's key in the theme info array.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • That worked! Thanks!

Sign In or Register to comment.