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

  • That worked! Thanks!

Sign In or Register to comment.