msie_compat.php 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. if (!defined('_ECRIRE_INC_VERSION')) return;
  3. function msie_compat_insert_head($flux) {
  4. $iecompat = $GLOBALS['meta']["iecompat"];
  5. if ($iecompat == "ifixpng") {
  6. $flux .= "<!--[if lt IE 7]>
  7. <script src='".find_in_path('javascript/jquery.ifixpng.js')."'></script>
  8. <script type='text/javascript'>//<![CDATA[
  9. jQuery.ifixpng('rien.gif');
  10. function fixie() {
  11. jQuery('img').ifixpng();
  12. }
  13. $(document).ready(function() { fixie(); });
  14. onAjaxLoad(fixie);
  15. //]]></script>
  16. <![endif]-->
  17. ";
  18. } else if ($iecompat == "IE7") {
  19. $flux .= "<!--[if lt IE 7]>
  20. <script type='text/javascript'>//<![CDATA[
  21. var IE7_PNG_SUFFIX = '.png';
  22. //]]></script>
  23. <script src='".find_in_path('javascript/IE7.js')."'></script>
  24. <![endif]-->
  25. ";
  26. } else if ($iecompat == "IE7squish") {
  27. $flux .= "<!--[if lt IE 7]>
  28. <script type='text/javascript'>//<![CDATA[
  29. var IE7_PNG_SUFFIX = '.png';
  30. //]]></script>
  31. <script src='".find_in_path('javascript/IE7.js')."'></script>
  32. <script src='".find_in_path('javascript/ie7-squish.js')."'></script>
  33. <![endif]-->
  34. ";
  35. } else if ($iecompat == "IE8") {
  36. $flux .= "<!--[if lt IE 8]>
  37. <script type='text/javascript'>//<![CDATA[
  38. var IE7_PNG_SUFFIX = '.png';
  39. //]]></script>
  40. <script src='".find_in_path('javascript/IE8.js')."'></script>
  41. <![endif]-->
  42. ";
  43. } else if ($iecompat == "IE8squish") {
  44. $flux .= "<!--[if lt IE 8]>
  45. <script type='text/javascript'>//<![CDATA[
  46. var IE7_PNG_SUFFIX = '.png';
  47. //]]></script>
  48. <script src='".find_in_path('javascript/IE8.js')."'></script>
  49. <script src='".find_in_path('javascript/ie7-squish.js')."'></script>
  50. <![endif]-->
  51. ";
  52. } /* else if ($iecompat == "IE9") {
  53. $flux .= "<!--[if lt IE 9]>
  54. <script type='text/javascript'>//<![CDATA[
  55. var IE7_PNG_SUFFIX = '.png';
  56. //]]></script>
  57. <script src='".find_in_path('javascript/IE9.js')."'></script>
  58. <![endif]-->
  59. ";
  60. } else if ($iecompat == "IE9squish") {
  61. $flux .= "<!--[if lt IE 9]>
  62. <script type='text/javascript'>//<![CDATA[
  63. var IE7_PNG_SUFFIX = '.png';
  64. //]]></script>
  65. <script src='".find_in_path('javascript/IE9.js')."'></script>
  66. <script src='".find_in_path('javascript/ie7-squish.js')."'></script>
  67. <![endif]-->
  68. ";
  69. } */
  70. return $flux;
  71. }
  72. function msie_compat_affiche_milieu ($flux) {
  73. if ($flux["args"]["exec"] == "configurer_avancees")
  74. $flux["data"] .= recuperer_fond('prive/squelettes/inclure/configurer',array('configurer'=>'configurer_vieux_butineurs'));
  75. return $flux;
  76. }
  77. function msie_compat_configurer_liste_metas ($metas) {
  78. $metas['iecompat']='non';
  79. return ($metas);
  80. }
  81. ?>