Browse Source

Logiciel: Anomalie #1018: HTTPS et piwik: Desactivation piwik si https

Bastien Sevajol 10 years ago
parent
commit
99aea716db

+ 0 - 4
src/Muzich/CoreBundle/Resources/public/css/main.css View File

@@ -2542,10 +2542,6 @@ div.social_buttons ul li
2542 2542
   float:left;
2543 2543
 }
2544 2544
 
2545
-div.social_buttons ul li.googleplus {
2546
-    margin-left: -25px;
2547
-}
2548
-
2549 2545
 a.button.toplist:visited
2550 2546
 {
2551 2547
   color: white;

+ 4 - 3
src/Muzich/CoreBundle/Resources/public/js/muzich.js View File

@@ -3414,9 +3414,10 @@ var facebook_like_rendereds_autoplay = new Array();
3414 3414
 
3415 3415
 function refresh_social_buttons(autoplay)
3416 3416
 {
3417
-  proceed_facebook_like_buttons(autoplay);
3418
-  gapi.plusone.go();
3419
-  twttr.widgets.load();
3417
+  // On n'utilise plus ca
3418
+//  proceed_facebook_like_buttons(autoplay);
3419
+//  gapi.plusone.go();
3420
+//  twttr.widgets.load();
3420 3421
 }
3421 3422
 
3422 3423
 function proceed_facebook_like_buttons(autoplay)

+ 0 - 31
src/Muzich/CoreBundle/Resources/views/Layout/head_js.html.twig View File

@@ -2,7 +2,6 @@
2 2
   {% set userecho = true %}
3 3
 {% endif %}
4 4
 
5
-
6 5
 <script type="text/javascript" src="//apis.google.com/js/plusone.js">
7 6
   {parsetags: 'explicit'}
8 7
 </script>
@@ -11,7 +10,6 @@
11 10
 
12 11
 <script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
13 12
 
14
-
15 13
 {% javascripts
16 14
   'js/jquery-1.8.2.prod.js'
17 15
   'js/jquery-ui-1.10.1.custom.min.js'
@@ -55,35 +53,6 @@
55 53
   });
56 54
 </script>
57 55
 
58
-{% if userecho %}
59
-  <script type='text/javascript'>
60
-
61
-    var _ues = {
62
-    host:'muzich.userecho.com',
63
-    forum:'17651',
64
-    lang:'fr',
65
-    tab_corner_radius:5,
66
-    tab_font_size:20,
67
-    tab_image_hash:'Vm9zIHJldG91cnM%3D',
68
-    tab_chat_hash:'Y2hhdA%3D%3D',
69
-    tab_alignment:'right',
70
-    tab_text_color:'#000000',
71
-    tab_text_shadow_color:'#66666655',
72
-    tab_bg_color:'#F4F4F4',
73
-    tab_hover_color:'#D5D5D5'
74
-    };
75
-
76
-  $(document).ready(function(){  
77
-  (function() {
78
-      var _ue = document.createElement('script'); _ue.type = 'text/javascript'; _ue.async = true;
79
-      _ue.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'cdn.userecho.com/js/widget-1.4.gz.js';
80
-      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(_ue, s);
81
-    })();
82
-  });
83
-
84
-  </script>
85
-{% endif %}
86
-
87 56
 <script type="text/javascript">
88 57
   {% if app.user %}
89 58
     visitor = false;

+ 20 - 18
src/Muzich/CoreBundle/Resources/views/layout.html.twig View File

@@ -57,24 +57,26 @@
57 57
     
58 58
   </div>
59 59
     
60
-    {% if  app.environment == 'prod' %} 
61
-      <!-- Piwik -->
62
-      <script type="text/javascript"> 
63
-        var _paq = _paq || [];
64
-        _paq.push(['trackPageView']);
65
-        _paq.push(['enableLinkTracking']);
66
-        (function() {
67
-          //var u=(("https:" == document.location.protocol) ? "https" : "http") + "://analytics.muzi.ch//"; # pas de certif sur analytics.muzi.ch pour le moment
68
-          var u=(("https:" == document.location.protocol) ? "http" : "http") + "://analytics.muzi.ch//";
69
-          _paq.push(['setTrackerUrl', u+'piwik.php']);
70
-          _paq.push(['setSiteId', 1]);
71
-          var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript';
72
-          g.defer=true; g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
73
-        })();
74
-      
75
-      </script>
76
-      <noscript><p><img src="http://analytics.muzi.ch/piwik.php?idsite=1" style="border:0" alt="" /></p></noscript>
77
-      <!-- End Piwik Code -->
60
+    {% if not app.request.secure %}
61
+      {% if  app.environment == 'prod' %} 
62
+        <!-- Piwik -->
63
+        <script type="text/javascript"> 
64
+          var _paq = _paq || [];
65
+          _paq.push(['trackPageView']);
66
+          _paq.push(['enableLinkTracking']);
67
+          (function() {
68
+            //var u=(("https:" == document.location.protocol) ? "https" : "http") + "://analytics.muzi.ch//"; # pas de certif sur analytics.muzi.ch pour le moment
69
+            var u=(("https:" == document.location.protocol) ? "https" : "http") + "://analytics.muzi.ch//";
70
+            _paq.push(['setTrackerUrl', u+'piwik.php']);
71
+            _paq.push(['setSiteId', 1]);
72
+            var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript';
73
+            g.defer=true; g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
74
+          })();
75
+
76
+        </script>
77
+        <noscript><p><img src="https://analytics.muzi.ch/piwik.php?idsite=1" style="border:0" alt="" /></p></noscript>
78
+        <!-- End Piwik Code -->
79
+      {% endif %}
78 80
     {% endif %}
79 81
   </body>
80 82
 </html>