Theme Picker Criterion is not recognized

Topics: Administration, General, Writing themes
Jul 2, 2013 at 2:35 PM
I am trying to use the Vandelay.Theme.Picker Module for switching themes between mobile and normal browser version of my website.
I installed the module, the module is there, I am also able to add new theme selection criterions but whatever constilation of browser agents I use the theme never switches.

Can you please give me an advice how I should handle mobile devices or how a criterion for phones should look like.

I would already be happy if I could test the switch with the current version IE10.

Did I miss some component ?

br AL
Jul 2, 2013 at 3:06 PM
Perhaps an error is occurring. Could you check the log files (App_Data/Logs)?
Jul 2, 2013 at 3:29 PM
I checked the logs, no error is occuring. I think that my criteria(s) are not formed correct. This is what I use currently for testing:

^Mozilla\/4.0 (compatible; MSIE [678910].0; Windows NT \d.\d(.*))$

should handle all IE browsers from 6 to 10 or not ?
Jul 3, 2013 at 10:05 AM
No, your regular expression seems too restrictive, and there is a lot more variation in user agent strings. Also, [678910] means 6 or 7 or 8 or 9 or 1 or 0.
Jul 10, 2013 at 9:29 AM
Hi Bertrand,
I managed to get it working, at least I can now say that it works ;), e.g.: IE 10:

^Mozilla\/5.0 (compatible; MSIE 10.0; Windows NT \d.\d(.*))$

Another question is how to detect all the different Mobile browsers ?
Do I have to add a Criterion for each browser separately, or is there any list file like for example WURFL is using ?

Jul 10, 2013 at 10:49 AM
this does the job up to 98% ;).

Criterion for Mobile browsers:
/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/

greetz AL