Changeset 585525
- Timestamp:
- 08/14/2012 08:30:17 PM (14 years ago)
- Location:
- youtube-sidebar-widget
- Files:
-
- 6 edited
- 1 copied
-
tags/1.3.1 (copied) (copied from youtube-sidebar-widget/trunk)
-
tags/1.3.1/readme.txt (modified) (3 diffs)
-
tags/1.3.1/script.js (modified) (1 diff)
-
tags/1.3.1/youtube-sidebar-widget.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/script.js (modified) (1 diff)
-
trunk/youtube-sidebar-widget.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
youtube-sidebar-widget/tags/1.3.1/readme.txt
r583051 r585525 4 4 Requires at least: 2.0.2 5 5 Tested up to: 3.4.1 6 Stable tag: 1.3 7 Version: 1.3 6 Stable tag: 1.3.1 7 Version: 1.3.1 8 8 9 9 List video thumbnails from a Youtube video, account, or playlist in your WordPress theme using widgets. Play the videos right on your theme! … … 90 90 * Added .ysw-youtube class that can be added to elements along with an id attribute with a value equal to the YouTube video's ID hash. Clicking these elements will cause the video to appear. 91 91 92 = 1.3.1 = 93 * Fixed major bug with both ssl and the .ysw-youtube class 94 92 95 == Upgrade Notice == 93 96 … … 123 126 * Added an autoplay widget setting 124 127 * Added .ysw-youtube class that can be added to elements along with an id attribute with a value equal 128 = 1.3.1 = 129 * This version fixes a major bug in ssl functionality and the .yws-youtube class. -
youtube-sidebar-widget/tags/1.3.1/script.js
r583051 r585525 1 /* 2 * Version: 1.3.1 3 */ 1 4 jQuery(function($){ 2 5 $("#youtube-sidebar-widget li div.play_arrow, #youtube-sidebar-widget li a, .ysw-youtube").click(function(){ 3 var el = $(this).parent(); 6 if($(this).is(".ysw-youtube")) { 7 var el = $(this); 8 } else { 9 var el = $(this).parent(); 10 } 4 11 var hash = el.attr('id'); 5 12 var autoplay = el.attr('data-autoplay'); 6 $('body').prepend("<div id='ysw-overlay'></div><div id='ysw-viewer'><a href='#'>close</a><iframe title='YouTube video player' width='640' height='390' src='http://www.youtube.com/embed/" + hash + "?autoplay=" + autoplay + "' frameborder='0' allowfullscreen></iframe></div>"); 13 var ssl = document.location.protocol; 14 console.log(ssl); 15 $('body').prepend("<div id='ysw-overlay'></div><div id='ysw-viewer'><a href='#'>close</a><iframe title='YouTube video player' width='640' height='390' src='" + ssl + "//www.youtube.com/embed/" + hash + "?autoplay=" + autoplay + "' frameborder='0' allowfullscreen></iframe></div>"); 7 16 var win = $(window); 8 17 var overlay = $("#ysw-overlay"); -
youtube-sidebar-widget/tags/1.3.1/youtube-sidebar-widget.php
r583051 r585525 4 4 Plugin URI: http://wordpress.org/extend/plugins/youtube-sidebar-widget/ 5 5 Description: List video thumbnails from a Youtube account or playlist in your WordPress theme using widgets. Play the videos right on your theme! 6 Version: 1.3 6 Version: 1.3.1 7 7 Author: Stephen Coley 8 8 Author URI: http://coley.co … … 34 34 } 35 35 36 function ssl() { 37 if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') { 38 return "https"; 39 } else { 40 return "http"; 41 } 42 } 43 36 44 class YoutubeSidebarWidget extends WP_Widget { 37 45 … … 58 66 $height = ($width * 3) / 4; 59 67 $key = "AI39si4egIgiaFaxxolUNjk1Iw4ip4GHWJMt44ZpnWXidiFLjlX1_kSwUYUI-bhtK9oW3bvZ7CFe7syG__AtokRmrTMDYHdXvA"; 60 $vidid_url = "http://gdata.youtube.com/feeds/api/videos/$ident?v=2&key=$key";61 $username_url = "http://gdata.youtube.com/feeds/base/users/$ident/uploads?alt=rss&v=2&orderby=published&client=ytapi-youtube-profile&key=$key";62 $playlist_url = "http://gdata.youtube.com/feeds/api/playlists/$ident?v=2&key=$key";68 $vidid_url = ssl() . "://gdata.youtube.com/feeds/api/videos/$ident?v=2&key=$key"; 69 $username_url = ssl() . "://gdata.youtube.com/feeds/base/users/$ident/uploads?alt=rss&v=2&orderby=published&client=ytapi-youtube-profile&key=$key"; 70 $playlist_url = ssl() . "://gdata.youtube.com/feeds/api/playlists/$ident?v=2&key=$key"; 63 71 echo $before_widget; 64 72 if($title) { … … 90 98 $link = explode("/watch?v=", $item->link); 91 99 $hash = explode("&", $link[1]); 92 $img = "http://i2.ytimg.com/vi/$hash[0]/0.jpg";100 $img = ssl() . "://i2.ytimg.com/vi/$hash[0]/0.jpg"; 93 101 94 102 if($titles == "yes") { … … 107 115 $link = explode("/watch?v=", $item->link); 108 116 $hash = explode("&", $link[1]); 109 $img = "http://i2.ytimg.com/vi/$hash[0]/0.jpg";117 $img = ssl() . "://i2.ytimg.com/vi/$hash[0]/0.jpg"; 110 118 111 119 if($titles == "yes") { … … 146 154 $link = explode("watch?v=", $item->link['href']); 147 155 $hash = explode("&", $link[1]); 148 $img = "http://i2.ytimg.com/vi/$hash[0]/0.jpg";156 $img = ssl() . "://i2.ytimg.com/vi/$hash[0]/0.jpg"; 149 157 150 158 if($titles == "yes") { … … 179 187 $link = explode("/watch?v=", $link_url['href']); 180 188 $hash = explode("&", $link[1]); 181 $img = "http://i2.ytimg.com/vi/$hash[0]/0.jpg";189 $img = ssl() . "://i2.ytimg.com/vi/$hash[0]/0.jpg"; 182 190 183 191 if($titles == "yes") { -
youtube-sidebar-widget/trunk/readme.txt
r583051 r585525 4 4 Requires at least: 2.0.2 5 5 Tested up to: 3.4.1 6 Stable tag: 1.3 7 Version: 1.3 6 Stable tag: 1.3.1 7 Version: 1.3.1 8 8 9 9 List video thumbnails from a Youtube video, account, or playlist in your WordPress theme using widgets. Play the videos right on your theme! … … 90 90 * Added .ysw-youtube class that can be added to elements along with an id attribute with a value equal to the YouTube video's ID hash. Clicking these elements will cause the video to appear. 91 91 92 = 1.3.1 = 93 * Fixed major bug with both ssl and the .ysw-youtube class 94 92 95 == Upgrade Notice == 93 96 … … 123 126 * Added an autoplay widget setting 124 127 * Added .ysw-youtube class that can be added to elements along with an id attribute with a value equal 128 = 1.3.1 = 129 * This version fixes a major bug in ssl functionality and the .yws-youtube class. -
youtube-sidebar-widget/trunk/script.js
r583051 r585525 1 /* 2 * Version: 1.3.1 3 */ 1 4 jQuery(function($){ 2 5 $("#youtube-sidebar-widget li div.play_arrow, #youtube-sidebar-widget li a, .ysw-youtube").click(function(){ 3 var el = $(this).parent(); 6 if($(this).is(".ysw-youtube")) { 7 var el = $(this); 8 } else { 9 var el = $(this).parent(); 10 } 4 11 var hash = el.attr('id'); 5 12 var autoplay = el.attr('data-autoplay'); 6 $('body').prepend("<div id='ysw-overlay'></div><div id='ysw-viewer'><a href='#'>close</a><iframe title='YouTube video player' width='640' height='390' src='http://www.youtube.com/embed/" + hash + "?autoplay=" + autoplay + "' frameborder='0' allowfullscreen></iframe></div>"); 13 var ssl = document.location.protocol; 14 console.log(ssl); 15 $('body').prepend("<div id='ysw-overlay'></div><div id='ysw-viewer'><a href='#'>close</a><iframe title='YouTube video player' width='640' height='390' src='" + ssl + "//www.youtube.com/embed/" + hash + "?autoplay=" + autoplay + "' frameborder='0' allowfullscreen></iframe></div>"); 7 16 var win = $(window); 8 17 var overlay = $("#ysw-overlay"); -
youtube-sidebar-widget/trunk/youtube-sidebar-widget.php
r583051 r585525 4 4 Plugin URI: http://wordpress.org/extend/plugins/youtube-sidebar-widget/ 5 5 Description: List video thumbnails from a Youtube account or playlist in your WordPress theme using widgets. Play the videos right on your theme! 6 Version: 1.3 6 Version: 1.3.1 7 7 Author: Stephen Coley 8 8 Author URI: http://coley.co … … 34 34 } 35 35 36 function ssl() { 37 if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') { 38 return "https"; 39 } else { 40 return "http"; 41 } 42 } 43 36 44 class YoutubeSidebarWidget extends WP_Widget { 37 45 … … 58 66 $height = ($width * 3) / 4; 59 67 $key = "AI39si4egIgiaFaxxolUNjk1Iw4ip4GHWJMt44ZpnWXidiFLjlX1_kSwUYUI-bhtK9oW3bvZ7CFe7syG__AtokRmrTMDYHdXvA"; 60 $vidid_url = "http://gdata.youtube.com/feeds/api/videos/$ident?v=2&key=$key";61 $username_url = "http://gdata.youtube.com/feeds/base/users/$ident/uploads?alt=rss&v=2&orderby=published&client=ytapi-youtube-profile&key=$key";62 $playlist_url = "http://gdata.youtube.com/feeds/api/playlists/$ident?v=2&key=$key";68 $vidid_url = ssl() . "://gdata.youtube.com/feeds/api/videos/$ident?v=2&key=$key"; 69 $username_url = ssl() . "://gdata.youtube.com/feeds/base/users/$ident/uploads?alt=rss&v=2&orderby=published&client=ytapi-youtube-profile&key=$key"; 70 $playlist_url = ssl() . "://gdata.youtube.com/feeds/api/playlists/$ident?v=2&key=$key"; 63 71 echo $before_widget; 64 72 if($title) { … … 90 98 $link = explode("/watch?v=", $item->link); 91 99 $hash = explode("&", $link[1]); 92 $img = "http://i2.ytimg.com/vi/$hash[0]/0.jpg";100 $img = ssl() . "://i2.ytimg.com/vi/$hash[0]/0.jpg"; 93 101 94 102 if($titles == "yes") { … … 107 115 $link = explode("/watch?v=", $item->link); 108 116 $hash = explode("&", $link[1]); 109 $img = "http://i2.ytimg.com/vi/$hash[0]/0.jpg";117 $img = ssl() . "://i2.ytimg.com/vi/$hash[0]/0.jpg"; 110 118 111 119 if($titles == "yes") { … … 146 154 $link = explode("watch?v=", $item->link['href']); 147 155 $hash = explode("&", $link[1]); 148 $img = "http://i2.ytimg.com/vi/$hash[0]/0.jpg";156 $img = ssl() . "://i2.ytimg.com/vi/$hash[0]/0.jpg"; 149 157 150 158 if($titles == "yes") { … … 179 187 $link = explode("/watch?v=", $link_url['href']); 180 188 $hash = explode("&", $link[1]); 181 $img = "http://i2.ytimg.com/vi/$hash[0]/0.jpg";189 $img = ssl() . "://i2.ytimg.com/vi/$hash[0]/0.jpg"; 182 190 183 191 if($titles == "yes") {
Note: See TracChangeset
for help on using the changeset viewer.