mani313 Posted August 27, 2013 Share Posted August 27, 2013 Hi there, i have great issue that my new module's java script files makes my sites dirty on IE (see attached) so i have to disable the module or script file on IE9. is it possible to disable the module or only those scripts for IE ? thanx in adv Link to comment Share on other sites More sharing options...
El Patron Posted August 27, 2013 Share Posted August 27, 2013 depends on how the module works. if it call's a .tpl file, then you could add php code to check for IE, and if so not call the .tpl file Link to comment Share on other sites More sharing options...
mani313 Posted August 27, 2013 Author Share Posted August 27, 2013 oh! its problem solved through jquery..thanx to patron n 1 Link to comment Share on other sites More sharing options...
vekia Posted August 27, 2013 Share Posted August 27, 2013 may i know how the condition looks like in PHP ? Link to comment Share on other sites More sharing options...
evolution.x Posted September 24, 2013 Share Posted September 24, 2013 Hi, I'm also interested in this function, i have a module which displays wrong on IE8 and wish to disable just for this module or call a different TPL. Regards Adam Link to comment Share on other sites More sharing options...
vekia Posted September 24, 2013 Share Posted September 24, 2013 anyone can explain it? please? Link to comment Share on other sites More sharing options...
evolution.x Posted September 24, 2013 Share Posted September 24, 2013 (edited) I think i have the answer vekia. You have to add this to your module PHP file. <?php //echo $_SERVER['HTTP_USER_AGENT']; if(preg_match('/(?i)msie [1-8]/',$_SERVER['HTTP_USER_AGENT'])) { // if INTERNET EXPLORER IS VERSION 1 - 8 ***** ENTER ALL OF YOUR MODULE.PHP FOR IE VERSIONS 1-8 ***** } else { // if ANY OTHER BROWSER ***** ENTER ALL OF YOUR MODULE.PHP FOR ANY OTHER BROWSER HERE ***** } ?> You would need 2 versions of the module.php, 1 for IE 1-8 and 1 for any other browser. With this method you can call different CSS and TPL files Edited September 24, 2013 by evolution.x (see edit history) 1 Link to comment Share on other sites More sharing options...
vekia Posted September 24, 2013 Share Posted September 24, 2013 hope that microsoft will not change the USER_AGENT headers thank you fro the solution! im going to check it, i need to turn on one module especially in IE Link to comment Share on other sites More sharing options...
mani313 Posted September 24, 2013 Author Share Posted September 24, 2013 (edited) hi, i don't be sure how much its possible passing user agent on module expressions (i didn t tried it in php). hope should work coz no idea than UA to find IE. my bit of issue was only module's scripts conflicts on IE 7 , 8 and IE 10 . i fixed it by stop the script execution i did it in jquery, usual code to target specific version if (!$.support.leadingWhitespace) { // your stuff for IE 7 or 8 }elseif(/*@cc_on!@*/false){ // your stuff for IE10 }elseif ($.browser.msie && parseInt($.browser.version, 9) > 8) { // your stuff for IE 9 } Edited September 24, 2013 by mani313 (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted September 24, 2013 Share Posted September 24, 2013 for non-java php solution also see php get_browser there are some good examples including classes http://php.net/manual/en/function.get-browser.php Link to comment Share on other sites More sharing options...
mani313 Posted September 24, 2013 Author Share Posted September 24, 2013 (edited) for non-java php solution also see php get_browser there are some good examples including classes http://php.net/manual/en/function.get-browser.php yes it of course! js is much familiar for me though java codes always better to choose for DOM solutions Edited September 24, 2013 by mani313 (see edit history) 1 Link to comment Share on other sites More sharing options...
Recommended Posts