My site looks quite wierd in IE 6. And I don't want to spend my time on adjusting these problems. (png's with no tranparency, several div's are misplaced causing the entire site to look wierd).
I figured that I can create at block that tell's IE 6 users to update their browser and make life easier for lazy webdesigners, like me.
The problem is that I can't find a php-snippet that would do this. I do know that it has to do with the function "get-browser" (
http://us3.php.net/manual/en/function.get-browser.php). And here http://drupal.org/node/65903 there is a snippet to detect which browser is used. But I can't figure out how to get both the browser and the version.
What i need is actually some sort of filter that filters out any browser that is older than IE6.
Comments
Don't forget that a large
Don't forget that a large proportion of your web traffic will be using IE6 for a long time still.
Anyway this page http://www.theregister.co.uk/2008/06/26/avg_disguises_fake_traffic_as_ie6/ suggests the user agent string for IE6 is Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1). Maybe easiest just to check for MSIE 6.0 in
$_SERVER['HTTP_USER_AGENT']
.
gpk
----
www.alexoria.co.uk
gpk
----
www.alexoria.co.uk
IE Destroyer Module
The IE Destroyer Module may be worth looking at.
Hope this helps.
Because IE 7 shows most of
Because IE 7 shows most of my css theming correctly I want to treat it as any browser.
But in IE6 and older there are several quite serious problems when it comes to theming. So unless IE Destroyer has a capability to select witch versions of IE to "Destroy" I would rather make a block that shows up only in IE 6 and older.
For now I solved the issue with my theme. But I still wish I could have this functionality to tell visitors to upgrade before they complain bout broken design.
Been there done
Been there done that...
---
Yuriy Babenko
www.yubastudios.com
My Drupal tutorials: http://yubastudios.com/blog/tag/tutorials
---
Yuriy Babenko | Technical Consultant & Senior Developer
http://yuriybabenko.com
Thanks! I'll try that. As I
Thanks! I'll try that.
As I understand you put this in your page.tpl.php, right?
And as far as I understand the site won't show anything but the message.
There is a snippet to show which browser is used, here: http://drupal.org/node/65903
But this shows the browser in the block. Not the version. Because i have problems with older versions of IE this is not the approach I am looking for.
I have an idea for a slightly different approach. I want to create a block were I have a similar message:
Then i would use a similar code in the visibility settings:
This would show the block only if the browser version is older then 7.0.
Using a block, and visibility, makes it much easier to place the message in a more appropriate way. It doesn't "kill" the site for those using older versions, but works more like warning.