I've been confused because my site wasn't switching over to the mobile theme, even though I have mobile_theme and browscap installed. I got curious and did a little digging - browscap is indeed grabbing all the user agents, but for some reason mine isn't marked as being a mobile browser, so the switch doesn't happen.

Is there a way to mark a browser as being mobile from the web interface, or does it need to be manually toggled in the database?

Comments

robloach’s picture

I believe it would have to be toggled in the database. Another thing you could do is take a look at #264001: Add switching theme based on browser. in the Switch Theme module.

domesticat’s picture

That makes sense. I'll poke around with switchtheme. In the meantime, I suppose I should ask the larger question: how do we correct info in browscap if it's wrong? Doing the correction you suggested fixes it for me, but doesn't fix it for everyone else.

The user-agent string for me is "Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5G77 Safari/525.20"

tignux’s picture

I have the same problem?
I've tried to set Switch Theme but doesn't work

Any solution?