Browse Source

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

Bastien Sevajol 9 years ago
parent
commit
6abfdf7895

+ 1 - 0
src/Muzich/CoreBundle/Command/MineTagsDataCommand.php View File

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

+ 16 - 7
src/Muzich/CoreBundle/Mining/Tag/TagData.php View File

13
         return array();
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
    return array();
24
    return array();
20
   }
25
   }
21
   
26
   
25
         return array();
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
   protected function getUserTagsTags(User $user, $field)
43
   protected function getUserTagsTags(User $user, $field)

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

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

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

3414
 
3414
 
3415
 function refresh_social_buttons(autoplay)
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
 function proceed_facebook_like_buttons(autoplay)
3423
 function proceed_facebook_like_buttons(autoplay)

+ 12 - 3
src/Muzich/CoreBundle/Resources/public/js/player/SoundCloudPlayer.js View File

3
   autoplay = typeof autoplay !== 'undefined' ? autoplay : false;
3
   autoplay = typeof autoplay !== 'undefined' ? autoplay : false;
4
   var _autoplay = autoplay;
4
   var _autoplay = autoplay;
5
   var _iframe_id = '';
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
   var _object_for_player = object_for_player;
16
   var _object_for_player = object_for_player;
8
   var _player = null;
17
   var _player = null;
9
   var _sounds_count = 0;
18
   var _sounds_count = 0;
30
     _iframe_id = 'soundcloud_player_'+new Date().getTime();
39
     _iframe_id = 'soundcloud_player_'+new Date().getTime();
31
     if (!_autoplay)
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
             +_ref_id+'&show_artwork=false&auto_play=true" width="100%" '
43
             +_ref_id+'&show_artwork=false&auto_play=true" width="100%" '
35
             +'height="350" scrolling="no" frameborder="no"></iframe>');
44
             +'height="350" scrolling="no" frameborder="no"></iframe>');
36
     }
45
     }
37
     else
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
         +_ref_id+'&show_artwork=false&auto_play=true" width="100%" '
49
         +_ref_id+'&show_artwork=false&auto_play=true" width="100%" '
41
         +'height="350" scrolling="no" frameborder="no"></iframe>');
50
         +'height="350" scrolling="no" frameborder="no"></iframe>');
42
     }
51
     }

+ 8 - 1
src/Muzich/CoreBundle/Resources/public/js/player/YoutubePlayer.js View File

86
     {
86
     {
87
       if(typeof(_yt_player.stopVideo)!=='undefined')
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 View File

2
   {% set userecho = true %}
2
   {% set userecho = true %}
3
 {% endif %}
3
 {% endif %}
4
 
4
 
5
-
6
 <script type="text/javascript" src="//apis.google.com/js/plusone.js">
5
 <script type="text/javascript" src="//apis.google.com/js/plusone.js">
7
   {parsetags: 'explicit'}
6
   {parsetags: 'explicit'}
8
 </script>
7
 </script>
11
 
10
 
12
 <script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
11
 <script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
13
 
12
 
14
-
15
 {% javascripts
13
 {% javascripts
16
   'js/jquery-1.8.2.prod.js'
14
   'js/jquery-1.8.2.prod.js'
17
   'js/jquery-ui-1.10.1.custom.min.js'
15
   'js/jquery-ui-1.10.1.custom.min.js'
55
   });
53
   });
56
 </script>
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
 <script type="text/javascript">
56
 <script type="text/javascript">
88
   {% if app.user %}
57
   {% if app.user %}
89
     visitor = false;
58
     visitor = false;

+ 13 - 21
src/Muzich/CoreBundle/Resources/views/SearchElement/element.html.twig View File

412
       
412
       
413
       {% endif %}
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
         <div class="social_buttons">
422
         <div class="social_buttons">
417
           <ul>
423
           <ul>
418
             <li class="facebook">
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
             </li>
426
             </li>
427
             <li class="twitter">
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
             </li>
429
             </li>
435
             <li class="googleplus">
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
             </li>
435
             </li>
444
           </ul>
436
           </ul>
445
         </div>
437
         </div>

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

57
     
57
     
58
   </div>
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
     {% endif %}
80
     {% endif %}
79
   </body>
81
   </body>
80
 </html>
82
 </html>

+ 1 - 1
src/Muzich/CoreBundle/Resources/views/layout_iframe.html.twig View File

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

+ 2 - 2
web/app_dev.php View File

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

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

+ 4 - 3
web/bundles/muzichcore/js/muzich.js View File

3414
 
3414
 
3415
 function refresh_social_buttons(autoplay)
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
 function proceed_facebook_like_buttons(autoplay)
3423
 function proceed_facebook_like_buttons(autoplay)

+ 12 - 3
web/bundles/muzichcore/js/player/SoundCloudPlayer.js View File

3
   autoplay = typeof autoplay !== 'undefined' ? autoplay : false;
3
   autoplay = typeof autoplay !== 'undefined' ? autoplay : false;
4
   var _autoplay = autoplay;
4
   var _autoplay = autoplay;
5
   var _iframe_id = '';
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
   var _object_for_player = object_for_player;
16
   var _object_for_player = object_for_player;
8
   var _player = null;
17
   var _player = null;
9
   var _sounds_count = 0;
18
   var _sounds_count = 0;
24
     _iframe_id = 'soundcloud_player_'+new Date().getTime();
33
     _iframe_id = 'soundcloud_player_'+new Date().getTime();
25
     if (!_autoplay)
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
             +_ref_id+'&show_artwork=false&auto_play=true" width="100%" '
37
             +_ref_id+'&show_artwork=false&auto_play=true" width="100%" '
29
             +'height="350" scrolling="no" frameborder="no"></iframe>');
38
             +'height="350" scrolling="no" frameborder="no"></iframe>');
30
     }
39
     }
31
     else
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
         +_ref_id+'&show_artwork=false&auto_play=true" width="100%" '
43
         +_ref_id+'&show_artwork=false&auto_play=true" width="100%" '
35
         +'height="350" scrolling="no" frameborder="no"></iframe>');
44
         +'height="350" scrolling="no" frameborder="no"></iframe>');
36
     }
45
     }

+ 8 - 1
web/bundles/muzichcore/js/player/YoutubePlayer.js View File

78
     {
78
     {
79
       if(typeof(_yt_player.stopVideo)!=='undefined')
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 View File


BIN
web/img/1387489316_google_square.png View File


BIN
web/img/1387489330_twitter_square.png View File


BIN
web/img/1387489343_facebook_square.png View File