[SPIP] +2.1.12
[velocampus/web/www.git] / www / extensions / msie_compat / msie_compat.php
1 <?php
2
3 if (!defined("_ECRIRE_INC_VERSION")) return;
4
5 function msie_compat_insert_head($flux) {
6
7
8 $iecompat = $GLOBALS['meta']["iecompat"];
9
10
11 if ($iecompat == "ifixpng") {
12 $flux .= "<!--[if lt IE 7]>
13 <script src='".find_in_path('javascript/jquery.ifixpng.js')."'></script>
14 <script type='text/javascript'>//<![CDATA[
15 jQuery.ifixpng('rien.gif');
16 function fixie() {
17 jQuery('img').ifixpng();
18 }
19 $(document).ready(function() { fixie(); });
20 onAjaxLoad(fixie);
21 //]]></script>
22 <![endif]-->
23 ";
24 } else if ($iecompat == "IE7") {
25 $flux .= "<!--[if lt IE 7]>
26 <script type='text/javascript'>//<![CDATA[
27 var IE7_PNG_SUFFIX = '.png';
28 //]]></script>
29 <script src='".find_in_path('javascript/IE7.js')."'></script>
30 <![endif]-->
31 ";
32
33 } else if ($iecompat == "IE7squish") {
34 $flux .= "<!--[if lt IE 7]>
35 <script type='text/javascript'>//<![CDATA[
36 var IE7_PNG_SUFFIX = '.png';
37 //]]></script>
38 <script src='".find_in_path('javascript/IE7.js')."'></script>
39 <script src='".find_in_path('javascript/ie7-squish.js')."'></script>
40 <![endif]-->
41 ";
42
43 } else if ($iecompat == "IE8") {
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 <![endif]-->
50 ";
51
52 } else if ($iecompat == "IE8squish") {
53 $flux .= "<!--[if lt IE 8]>
54 <script type='text/javascript'>//<![CDATA[
55 var IE7_PNG_SUFFIX = '.png';
56 //]]></script>
57 <script src='".find_in_path('javascript/IE8.js')."'></script>
58 <script src='".find_in_path('javascript/ie7-squish.js')."'></script>
59 <![endif]-->
60 ";
61
62 } /* else if ($iecompat == "IE9") {
63 $flux .= "<!--[if lt IE 9]>
64 <script type='text/javascript'>//<![CDATA[
65 var IE7_PNG_SUFFIX = '.png';
66 //]]></script>
67 <script src='".find_in_path('javascript/IE9.js')."'></script>
68 <![endif]-->
69 ";
70
71 } else if ($iecompat == "IE9squish") {
72 $flux .= "<!--[if lt IE 9]>
73 <script type='text/javascript'>//<![CDATA[
74 var IE7_PNG_SUFFIX = '.png';
75 //]]></script>
76 <script src='".find_in_path('javascript/IE9.js')."'></script>
77 <script src='".find_in_path('javascript/ie7-squish.js')."'></script>
78 <![endif]-->
79 ";
80
81 } */
82
83 return $flux;
84 }
85
86 function msie_compat_affiche_milieu ($flux) {
87
88 if ($flux["args"]["exec"] == "config_fonctions") {
89
90 $configurer = charger_fonction('ie6config', 'configuration');
91
92 $flux["data"] .= $configurer();
93 }
94
95 return $flux;
96
97 }
98
99
100 function msie_compat_configurer_liste_metas ($metas) {
101 $metas['iecompat']='ifixpng';
102
103 return ($metas);
104 }
105
106 ?>