By RWWood on
I created a block that shows content from another site, and it works like a charm in Firefox, but IE6 chokes on something in the javascript on the other site and won't load any part of the page including and after that block. Consequently, I'm looking for how to include some conditional php for that block that in essence says, "Check the user's browser and don't show this block if it's IE6."
Any help would be appreciated.
Comments
Should be able to use
You might* be able to use drupal_http_request() to check that stuff on the server side.
Did you try using css to "hide" the offending block via conditional comments? If IE is choking on JS, then the CSS solution may very well fail.
I will look more into the request and see what is there...
If you run the devel module, you can call krumo($whatever); within your templates and include files to basically view the contents of any variable. That's what I am about to do at a test site...
I will be letting you know what is found out though.
Derek
http://collectivecolors. com
* Edited : Actually I think thats the $_HTTP variable...
...
Cant seem to get it to work at the moment...
Just getting a white screen. Odd, I was doing this just a few hours ago.
...
OK...
So this: $_SERVER["HTTP_USER_AGENT"] is what you will want to look at.
You will need to find out the value of this for IE 6. Hopefully it is different from IE7+. If not, there may be alternatives...
I have IE7 and FF3 and the value that it returns for me on these two are as follows:
FF3: string(113) "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729)"
IE7: string(157) "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.2; .NET CLR 3.5.30729; .NET CLR 3.0.30618)"
I am not certain how "SAFE" using some conditional of that sort would be. But it might work for you.
Derek
$_SERVER not $_HTTP...
Been a long day...
What actually works for not
What actually works for not displaying a block to IE 6 browsers is: the following in the specific pages block:
HTH
Thank You
You are awesome, this was a huge help.
Have a good one!