Преглед на файлове

Merge remote-tracking branch 'origin/prod/v0.9.8.3' into stable/v0.9.9

Bastien Sevajol преди 9 години
родител
ревизия
6abfdf7895

+ 1 - 0
src/Muzich/CoreBundle/Command/MineTagsDataCommand.php Целия файл

@@ -101,6 +101,7 @@ class MineTagsDataCommand extends ContainerAwareCommand
101 101
   
102 102
   protected function mineDiffusions()
103 103
   {
104
+    $this->output->writeln('<info>Retriving users ...</info>');
104 105
     $users = $this->getUsersToProceed(User::DATA_DIFF_UPDATED);
105 106
     $this->output->writeln('<info>Diffusions: '.count($users).' utilisateurs</info>');
106 107
     $this->progress->start($this->output, count($users));

+ 16 - 7
src/Muzich/CoreBundle/Mining/Tag/TagData.php Целия файл

@@ -13,9 +13,14 @@ class TagData extends Base
13 13
         return array();
14 14
     }
15 15
     
16
-   if (count($tags_ordereds = $user_tags->getElementFavoriteTags()))
17
-     return $tags_ordereds;
18
-   
16
+    if ($user_tags)
17
+    {
18
+      if (count($tags_ordereds = $user_tags->getElementFavoriteTags()))
19
+      {
20
+        return $tags_ordereds;
21
+      }
22
+    }
23
+    
19 24
    return array();
20 25
   }
21 26
   
@@ -25,10 +30,14 @@ class TagData extends Base
25 30
         return array();
26 31
     }
27 32
     
28
-   if (count($tags_ordereds = $user_tags->getElementDiffusionTags()))
29
-     return $tags_ordereds;
30
-   
31
-   return array();
33
+    if ($user_tags)
34
+    {
35
+      if (count($tags_ordereds = $user_tags->getElementDiffusionTags()))
36
+      {
37
+        return $tags_ordereds;
38
+      }
39
+    }
40
+    return array();
32 41
   }
33 42
   
34 43
   protected function getUserTagsTags(User $user, $field)

+ 0 - 4
src/Muzich/CoreBundle/Resources/public/css/main.css Целия файл

@@ -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 Целия файл

@@ -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)

+ 12 - 3
src/Muzich/CoreBundle/Resources/public/js/player/SoundCloudPlayer.js Целия файл

@@ -3,7 +3,16 @@ function SoundCloudPlayer(ref_id, object_for_player, finish_callback, autoplay)
3 3
   autoplay = typeof autoplay !== 'undefined' ? autoplay : false;
4 4
   var _autoplay = autoplay;
5 5
   var _iframe_id = '';
6
-  var _ref_id = ref_id;
6
+  
7
+  if (typeof(ref_id) == 'string')
8
+  {
9
+    var _ref_id = ref_id.replace('http://', 'https://');
10
+  }
11
+  else
12
+  {
13
+    var _ref_id = ref_id
14
+  }
15
+  
7 16
   var _object_for_player = object_for_player;
8 17
   var _player = null;
9 18
   var _sounds_count = 0;
@@ -30,13 +39,13 @@ function SoundCloudPlayer(ref_id, object_for_player, finish_callback, autoplay)
30 39
     _iframe_id = 'soundcloud_player_'+new Date().getTime();
31 40
     if (!_autoplay)
32 41
     {
33
-      _object_for_player.html('<iframe id="'+_iframe_id+'" src="http://w.soundcloud.com/player/?url='
42
+      _object_for_player.html('<iframe id="'+_iframe_id+'" src="https://w.soundcloud.com/player/?url='
34 43
             +_ref_id+'&show_artwork=false&auto_play=true" width="100%" '
35 44
             +'height="350" scrolling="no" frameborder="no"></iframe>');
36 45
     }
37 46
     else
38 47
     {
39
-      $('#autoplay_player_soundcloud').append('<iframe id="'+_iframe_id+'" src="http://w.soundcloud.com/player/?url='
48
+      $('#autoplay_player_soundcloud').append('<iframe id="'+_iframe_id+'" src="https://w.soundcloud.com/player/?url='
40 49
         +_ref_id+'&show_artwork=false&auto_play=true" width="100%" '
41 50
         +'height="350" scrolling="no" frameborder="no"></iframe>');
42 51
     }

+ 8 - 1
src/Muzich/CoreBundle/Resources/public/js/player/YoutubePlayer.js Целия файл

@@ -86,7 +86,14 @@ function YoutubePlayer(ref_id, object_for_player, finish_callback)
86 86
     {
87 87
       if(typeof(_yt_player.stopVideo)!=='undefined')
88 88
       {
89
-        _yt_player.stopVideo();
89
+        try
90
+        {
91
+          _yt_player.stopVideo();
92
+        }
93
+        catch (e)
94
+        {
95
+          
96
+        }
90 97
       }
91 98
     }
92 99
   }

+ 0 - 31
src/Muzich/CoreBundle/Resources/views/Layout/head_js.html.twig Целия файл

@@ -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;

+ 13 - 21
src/Muzich/CoreBundle/Resources/views/SearchElement/element.html.twig Целия файл

@@ -412,34 +412,26 @@
412 412
       
413 413
       {% endif %}
414 414
       
415
-      {% if display_social_buttons and app.environment == 'prod' %}
415
+      {% if display_social_buttons %}
416
+        {% set permalink = 'https:' ~ url('element_show_one', {
417
+          'element_id' : element.id,
418
+          'element_slug' : element.slug
419
+        }, true) %}
420
+       {% set element_title = 'Muzich - ' ~ element.name %}
421
+
416 422
         <div class="social_buttons">
417 423
           <ul>
418 424
             <li class="facebook">
419
-              {{ facebookButton( {
420
-                'locale': 'fr_FR', 
421
-                'url': 'http:' ~ url('element_show_one', {
422
-                  'element_id' : element.id,
423
-                  'element_slug' : element.slug
424
-                }, true) })
425
-              }}
425
+               <a target="_blank" title="Facebook" href="https://www.facebook.com/sharer.php?u={{ permalink }}&t={{ element_title }}" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=700');return false;"><img src="{{ asset('/img/1387489343_facebook_square.png') }}" alt="Facebook" /></a>
426 426
             </li>
427 427
             <li class="twitter">
428
-              {{ twitterButton( {
429
-                'locale': 'fr_FR', 
430
-                'url': 'http:' ~ url('element_show_one', {
431
-                  'element_id' : element.id
432
-                }, true) }) 
433
-              }}
428
+              <a target="_blank" title="Twitter" href="https://twitter.com/share?url={{ permalink }}&text={{ element_title }}&via=Muzich_Official" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=400,width=700');return false;"><img src="{{ asset('/img/1387489330_twitter_square.png') }}" alt="Twitter" /></a>
434 429
             </li>
435 430
             <li class="googleplus">
436
-              {{ googlePlusButton( {
437
-                'locale': 'fr_FR', 'url': 
438
-                'http:' ~ url('element_show_one', {
439
-                  'element_id' : element.id,
440
-                  'element_slug' : element.slug
441
-                }, true) }) 
442
-              }}
431
+               <a target="_blank" title="Google +" href="https://plus.google.com/share?url={{ permalink }}&hl=fr" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=450,width=650');return false;"><img src="{{ asset('/img/1387489316_google_square.png') }}" alt="Google Plus" /></a>
432
+            </li>
433
+            <li class="mail">
434
+               <a target="_blank" title="Envoyer par mail" href="mailto:?subject={{ element_title }}&body={{ permalink }}" rel="nofollow"><img src="{{ asset('/img/1387489139_aiga_mail.png') }}" alt="email" /></a>
443 435
             </li>
444 436
           </ul>
445 437
         </div>

+ 20 - 18
src/Muzich/CoreBundle/Resources/views/layout.html.twig Целия файл

@@ -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>

+ 1 - 1
src/Muzich/CoreBundle/Resources/views/layout_iframe.html.twig Целия файл

@@ -3,7 +3,7 @@
3 3
   <head>
4 4
     <title>Muzi.ch - {% block title %}{% endblock %}</title>
5 5
     {% include 'MuzichCoreBundle:Layout:head.html.twig' with {
6
-      'userecho' : false
6
+      'userecho' : true
7 7
     } %}
8 8
     {% block css %}{% endblock %}
9 9
     {% block js %}{% endblock %}

+ 2 - 2
web/app_dev.php Целия файл

@@ -1,5 +1,5 @@
1 1
 <?php
2
-
2
+die();
3 3
 use Symfony\Component\HttpFoundation\Request;
4 4
 
5 5
 // If you don't want to setup permissions the proper way, just uncomment the following PHP line
@@ -14,7 +14,7 @@ if (isset($_SERVER['HTTP_CLIENT_IP'])
14 14
         '127.0.0.1',
15 15
         '::1',
16 16
     ))
17
-) {
17
+&& false) {
18 18
     header('HTTP/1.0 403 Forbidden');
19 19
     exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
20 20
 }

+ 0 - 4
web/bundles/muzichcore/css/main.css Целия файл

@@ -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
web/bundles/muzichcore/js/muzich.js Целия файл

@@ -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)

+ 12 - 3
web/bundles/muzichcore/js/player/SoundCloudPlayer.js Целия файл

@@ -3,7 +3,16 @@ function SoundCloudPlayer(ref_id, object_for_player, finish_callback, autoplay)
3 3
   autoplay = typeof autoplay !== 'undefined' ? autoplay : false;
4 4
   var _autoplay = autoplay;
5 5
   var _iframe_id = '';
6
-  var _ref_id = ref_id;
6
+  
7
+  if (typeof(ref_id) == 'string')
8
+  {
9
+    var _ref_id = ref_id.replace('http://', 'https://');
10
+  }
11
+  else
12
+  {
13
+    var _ref_id = ref_id
14
+  }
15
+  
7 16
   var _object_for_player = object_for_player;
8 17
   var _player = null;
9 18
   var _sounds_count = 0;
@@ -24,13 +33,13 @@ function SoundCloudPlayer(ref_id, object_for_player, finish_callback, autoplay)
24 33
     _iframe_id = 'soundcloud_player_'+new Date().getTime();
25 34
     if (!_autoplay)
26 35
     {
27
-      _object_for_player.html('<iframe id="'+_iframe_id+'" src="http://w.soundcloud.com/player/?url='
36
+      _object_for_player.html('<iframe id="'+_iframe_id+'" src="https://w.soundcloud.com/player/?url='
28 37
             +_ref_id+'&show_artwork=false&auto_play=true" width="100%" '
29 38
             +'height="350" scrolling="no" frameborder="no"></iframe>');
30 39
     }
31 40
     else
32 41
     {
33
-      $('#autoplay_player_soundcloud').append('<iframe id="'+_iframe_id+'" src="http://w.soundcloud.com/player/?url='
42
+      $('#autoplay_player_soundcloud').append('<iframe id="'+_iframe_id+'" src="https://w.soundcloud.com/player/?url='
34 43
         +_ref_id+'&show_artwork=false&auto_play=true" width="100%" '
35 44
         +'height="350" scrolling="no" frameborder="no"></iframe>');
36 45
     }

+ 8 - 1
web/bundles/muzichcore/js/player/YoutubePlayer.js Целия файл

@@ -78,7 +78,14 @@ function YoutubePlayer(ref_id, object_for_player, finish_callback)
78 78
     {
79 79
       if(typeof(_yt_player.stopVideo)!=='undefined')
80 80
       {
81
-        _yt_player.stopVideo();
81
+        try
82
+        {
83
+          _yt_player.stopVideo();
84
+        }
85
+        catch (e)
86
+        {
87
+          
88
+        }
82 89
       }
83 90
     }
84 91
   }

BIN
web/img/1387489139_aiga_mail.png Целия файл


BIN
web/img/1387489316_google_square.png Целия файл


BIN
web/img/1387489330_twitter_square.png Целия файл


BIN
web/img/1387489343_facebook_square.png Целия файл