How do I use one theme for all devices instead of using a separate mobile theme?
Greetings.
My apologies if this question has already been asked. I couldn't find anything like it on the forums.
I have tweaked the Auro2 theme for my forums which are located here. I am hosting them through 1&1. The site is still in the works, but it's responsive, so there's no need to have a separate site for mobile devices.
So, my question is: How do I make this theme display on mobile devices? I'd like one theme to rule them all, so to speak.
I deleted the Mobile theme from the server; in fact, I deleted all the themes other than Auro2 (I saved the files on my computer in case I needed them later), but I'm still seeing the Vanilla default theme on my cell phone.
I realize there is probably some php involved in doing this. I don't know php, but I know enough about webdesign to edit a php file in Notepad ++ and upload it to a server.
Any help would be greatly appreciated.
Thanks!
Answers
You need to add @media css rules to your theme so that when a device of a certain size is detected the css rules apply to it.
http://www.w3schools.com/cssref/css3_pr_mediaquery.asp
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Thank you for your response. However, that has already been done. As I mentioned in my original post, the forums are responsive. You can test my site to see that this is the case.
My problem is not that the theme I'm using is not being displayed properly on mobile devices. The problem is that it's not being displayed at all. The default Vanilla theme is being displayed on mobile devices instead.
That is because you need to set the mobile theme in the config.php not in the dashboard...please read the documentation if you don't understand how to do something or search the forum because this is a common question that has come up before.
$Configuration['Garden']['MobileTheme']= 'nameofthethemeyouwant';
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
vrijvlinder: Perhaps I'm not phrasing my question correctly. I don't want to set the Vanilla Forums mobile theme. I don't want to have a Vanilla mobile theme at all. I simply want the theme I am using to be displayed on all devices, including mobile devices. This is a common practice with web design. A website can be created so that it is responsive, meaning it will adjust to any resolution size. Hence, there is no need to have separate themes for different devices; e.g., pc, cell phone, iPad, etc. My forums are responsive. Therefore, they can be displayed properly on any device; mobile or otherwise.
So, I simply want to bypass the editing of the config.php file and have the existing theme display as it is on all devices.
Does that make sense? Perhaps this isn't possible with Vanilla.
Just so you know you're not talking to a complete newbie: I've created dozens of websites that do exactly what I'm trying to accomplish with Vanilla.
Rewording the title of my original post may be helpful, but the time limit for editing posts prohibits me from doing so.
No you don't seem to understand the solution. Ignore it if you want to continue failing in your approach.Otherwise PAY ATTENTION!! because I am not going to say it again.
Add this to your config.php if you want to set the mobile theme...
$Configuration['Garden']['MobileTheme']= 'Auro2';
That is the dumbest thing I ever read... It makes no sense at all... the config.php IS where the settings are of everything!!!
Exactly, by adding that configuration with the name of your chosen theme WHAT EVER IT IS .
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
vrijvlinder: You're a class act. Thanks for the kind response.
You've provided me with a solution, but the not solution I am looking for. If what I'm trying to do isn't possible with Vanilla, simply say so. There's no need to insult me.
You obviously don't understand my question.
Good. Now move along.
@Ellsworth
The response you have been given is correct assuming that:
you have a single theme which you want to display in both desktop and mobile devices.
By default, Vanilla assigns a basic mobile theme for mobile devices.
You have to 'tell' Vanilla you don't want this.
To change it, you can
create a custom theme, and set it as your mobile theme in config.php (you don't want to do this.)
'force' Vanilla to load your 'desktop' theme, by setting it as your mobile theme in config.php
You seem to want to do the 2nd, so you have to set your current theme as the mobile theme in config.php.
It isn't clear to me why you are so resistant to this solution, but that may just be me not understanding.
You really shouldn't delete or alter any core files. Just leave them alone if you do not need them.
There is a (very small) problem with Auro2: folder name and the theme name in the about.php must be the same and the folder is written in lower case while the name is starting with an upper case "A". So you should change the folder name to be "Auro2", but that has nothing to do with your question...
Vanilla has a lot of features. If you do not want to use them, you simply turn them off. You do not "remove" them by deleting code or anything like that. Some configuration can be done in the dashboard, some must be done by editing
/conf/config.php
. That file is created after you have installed Vanilla, so it doesn't count as a core file that you shouldn't touch. In fact you need to change some settings in there.Vanilla detects if the device is a mobile device. That is a feature that you do not need, but others use it to show different themes. You cannot turn it off by something like
$Configuration['Garden']['MobileTheme'] = false;
. Instead you "trick" Vanilla by telling it to use no different theme at all:$Configuration['Garden']['MobileTheme'] = 'Auro2';
.That way you can achieve what you like and Vanilla stays a flexible forum script.
Excellent write up RJ, but He said he did not want to do that and is looking for a way to by pass the config.php completely . Which is Something that can't be done in vanilla and in most if not all other software. We are not thinking outside the box enough to understand that he wants to use the same theme for desktop as with mobile but without having to set it because that is how he has built dozens of websites.
There seems to be a need for a way to be able to select mobile themes in the dashboard or an option to be able to select the same theme for mobile via a checkbox on the theme in the themes page in the dashboard . It would simply add the mobile configuration to the config.php automatically upon selection.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Against all odds or what at least i think: Responsive and SEO is a complex artform to master for half time webdevs. I have made one portal (not a forum) that was incredibly smart in beeing responsive and sending to every client only the proper information load in KBs and MBs to be speedy enough and get a good Page Speed SEO criteria. Retina Pictures, Banners, Custom JS for Navigation, CSS, everything just made responsive will drag your mobile or your desktop speed down if not delivery sensitive. That is a lot of work and only good web devs and a designer can put this together.
For everyone else i recommend the use of 2 themes. It's easier, faster and smarter in many handlings and mobile specifics. If you are not willing to implement a bunch of libraries on template base that help you sort out which client is appearing choose 2 themes. Also look at your mobile user rate. We got here almost 78% on some of my boards. Concentration and work should go into a separate UI perfect mobile theme instead of cluttering around with media queries, device sensitive CSS files and so on.
I'm having the exact same problem. I've edited the config file but still, shows the default theme. I'm on Vanilla 2.3.1 too
Have you taken this into account?
Also, you have 'auro2' set as your theme, and 'Auro2' as your mobile theme. I would try to set your mobile theme to 'auro2' to see if that helps.