theme switching, redirects, style sheets, etc.

Permalink
Hi, I've been playing with Andrew's c5Touch theme and theme switching with C5. It's all working well but it has me wondering about some things.

I'll preface by saying I'm kind of a PHP hack, but usually get things figured out. So before I started spending time on this I thought I would throw it out here.

We have a global 'on_start' event and we can call a method like ThemeSwitcher that gets the HTTP_USER_AGENT to load a specific theme.

This brings me to my two thoughts:

Could we create a class that's called from the on_start that would detect all the different browsers and assign stylesheets for each browser. Then all this would be called into the themes so that if we detect browser type X and stylesheet X is in the themes directory we include the stylesheet in the theme.

Then we have a way to do those little cross browsers tweaks just by adding a stylesheet when needed into the theme's directory.

Thought 2:

Detect the browser then direct to a page other than the default home page. Can I detect it is Iphone, Blackberry, Android, etc. and direct to a specific page for each?

Can I detect default language and direct to a specific page?

Would this work? If so any of you seasoned PHP people want to help make it work?

Ihanks

pvernaglia