Has anyone considered making a browser detection module with some limited scripting control?
Reasons I had thought of this were pocketIE renders differently than Desktop IE which has CSS bugs that arent present in Mozilla/Opera, but those have some CSS differences that arent in IE (yes there are hacks to get around different bugs, the "\"}\"" trick for IE5 for example, but stick with me for a second).
Pocket IE uses IE 4,5 & 6 components, depending on what it does. IE 6 for scripting IE 5 for CSS and IE 4 for basic rendering (if memory serves that is the break down). Palm users have simmilar issues. I am not even going to get into the differences with WML which some cell phones require (although the gateway technology for those are improving).
Given the huge variety of browsers, and the fact that it would be handy to be able to have at least limited scripting based on browser type I think this may be somewhat handy.
What does everyone else think? Is anyone else working on this already?
browser detection plugin
-
trixter
scripting control
the problem is that you would need some way to make a decision based on the useragent data. Sure you could try a brute force approach for things like stylesheets:
if stylesheet-mozille not exist then get default
and so on making a conditional list for each browser type that you know about, but that is very ugly, and could lead to problems. Granted it would be 1 additional query for each request (unless you do have a custom stylesheet for that browser), but that would not solve the problems with stuff like WML (which is in some regards a pain due to the different browser implementations, memory restrictions on the size of a deck, etc).
Upon reflection this is a somewhat silly idea anyway, if you want programatic control over content rendering you would be classified as a programmer, and as such should be able to modify the PHP. My original concept was to be able to add the programatic control so that you could embed code into a document and have it parsed somehow. That in itself becomes tricky and would most likely be beyond the scope of what CMSMS is.
if stylesheet-mozille not exist then get default
and so on making a conditional list for each browser type that you know about, but that is very ugly, and could lead to problems. Granted it would be 1 additional query for each request (unless you do have a custom stylesheet for that browser), but that would not solve the problems with stuff like WML (which is in some regards a pain due to the different browser implementations, memory restrictions on the size of a deck, etc).
Upon reflection this is a somewhat silly idea anyway, if you want programatic control over content rendering you would be classified as a programmer, and as such should be able to modify the PHP. My original concept was to be able to add the programatic control so that you could embed code into a document and have it parsed somehow. That in itself becomes tricky and would most likely be beyond the scope of what CMSMS is.
browser detection plugin
Yeah, I agree. I believe this is outside of the scope of what we're trying to achieve. Though, I will be adding some module hooks to the rendering process, and it might be possible to do some things there totally in modules to achieve the desired effects.

