MyBB Community Forums

Full Version: CSS3 and HTML5
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
Switching themes based on the user agent in PHP is nasty and not needed. That kind of thing should be decoupled.

If you stick to a principle of graceful degradation then you only need one theme for all browsers.
how is it nasty? if user-agent = "old and crappy" then type = basic else type = advanced. then the template/theme engine will apply the correct items based on the type.

think of all the bandwidth you can save by not sending the CSS that is ignored and all the extra <--IF IE6 bits are not used. it should also increase page output times for the users (very tiny bit it is there)
It's nasty because the theme and the application should be decoupled imho. Also, it means maintaining (and supporting) two different themes.

If want to do it to space bandwidth then use javascript, to keep it separate from the application logic.
(2012-10-23, 03:53 PM)Nitrus Wrote: [ -> ]It's nasty because the theme and the application should be decoupled imho. Also, it means maintaining (and supporting) two different themes.

If want to do it to space bandwidth then use javascript, to keep it separate from the application logic.

This is the main reason not to go with your suggestion pavemen.

You'd also have to ensure google didn't get the "light" mode too as they frown upon sites serving different content to different browsers.
Yeah, I could only imagine the drop in the amount of themes, as well as complete ones if every one had to include two versions (Not to mention double the work for the dev team).
well, not really two themes, but some smart way to limit the amount of content being sent. perhaps just a set of JS and CSS files that are browser specific that are linked based on the user-agent.

and what I meant was having something like "postbit" and "postbit_advanced" in the places where such an advantage can be used. i know it can add overhead in other places and could eat up whatever was saved by separating them.

i just hate having to support "old and crappy" browsers and the bloat and complexity they add to the HTML/CSS.
I have long given up on trying to support IE in my custom made themes. Users that view my forum in IE, any version (10 or below), will get a message that the forum/theme isn't very compatible with IE becuz of its limited CSS and html displayability. That message will only go away IF they use another browser. I design my themes in Firefox, with absolutely no regard for IE. If they don't agree to this then that's their problem.

IE is given out for free with every Windows installation, that says enough.
Then, immediately, you're preventing ~45% of the world's connected users from interacting with your site. If people are using it, regardless of percentage, then you should build it for them.
(2012-10-28, 09:29 AM)darkhorus Wrote: [ -> ]IE is given out for free with every Windows installation, that says enough.

And they still have commercials on TV and ads on other sites for it. That says even more.
(2012-10-28, 11:21 AM)Tomm M Wrote: [ -> ]Then, immediately, you're preventing ~45% of the world's connected users from interacting with your site. If people are using it, regardless of percentage, then you should build it for them.

It's not that the site is unusable or looks like crap in IE, it's just that those people using IE don't have all the fancy effects of the site.
Pages: 1 2 3 4 5