Smart YouTube PRO - Version 3.3

Version Description

  • Supports migrated blogs from Wordpress.com replacing [youtube=youtubeadresss]
Download this release

Release Info

Developer freediver
Plugin Icon 128x128 Smart YouTube PRO
Version 3.3
Comparing to
See all releases

Code changes from version 3.2 to 3.3

Files changed (2) hide show
  1. readme.txt +10 -14
  2. smartyoutube.php +13 -2
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: freediver
3
  Donate link: https://www.networkforgood.org/donation/MakeDonation.aspx?ORGID2=520781390
4
  Tags: youtube, video, play, media, Post, posts, admin
5
  Requires at least: 2.0
6
- Tested up to: 2.8
7
  Stable tag: trunk
8
 
9
  Smart Youtube plugin allows you to insert full featured YouTube videos into your post, comments and in RSS feed.
@@ -27,29 +27,25 @@ Main Features:
27
  * Allows full YouTube customization (colors, border, full screen...)
28
  * Supports video deep linking (starting at desired point with &start=time parameter)
29
  * Works on iPod and iPhone
 
30
  * Provides a sidebar widget for videos as well
31
  * Produces xHTML valid code
32
  * Very fast and light, no extra scripts needed
33
 
 
34
 
35
- Change Log:
36
-
37
- v3.2
38
- - Added title to widget, fixed HTML code issue with widget
39
 
40
- v3.1.1
41
- - param closed properly for HTML validation (thanks Jan Eberl)
42
 
43
- v3.1
44
- - wmode transparent parameter updated to better handle transparancy
45
 
46
- v3.0
47
- - Added video template, option to set sidebar video size, fixed sidebar widget code, fixed video syntax issue
48
 
49
- v2.8.1
50
- - Added option to remove Annotations
51
 
52
- Plugin by Vladimir Prelovac. Looking for <a href="http://www.prelovac.com/vladimir/services">WordPress Consulting</a>?
53
 
54
  == Credits ==
55
 
3
  Donate link: https://www.networkforgood.org/donation/MakeDonation.aspx?ORGID2=520781390
4
  Tags: youtube, video, play, media, Post, posts, admin
5
  Requires at least: 2.0
6
+ Tested up to: 2.8.4
7
  Stable tag: trunk
8
 
9
  Smart Youtube plugin allows you to insert full featured YouTube videos into your post, comments and in RSS feed.
27
  * Allows full YouTube customization (colors, border, full screen...)
28
  * Supports video deep linking (starting at desired point with &start=time parameter)
29
  * Works on iPod and iPhone
30
+ * Supports migrated blogs from Wordpress.com replacing [youtube=youtubeadresss]
31
  * Provides a sidebar widget for videos as well
32
  * Produces xHTML valid code
33
  * Very fast and light, no extra scripts needed
34
 
35
+ Plugin by Vladimir Prelovac. Looking for <a href="http://www.prelovac.com/vladimir/services">WordPress Consulting</a>?
36
 
 
 
 
 
37
 
38
+ == Changelog ==
 
39
 
40
+ = 3.3 =
41
+ * Supports migrated blogs from Wordpress.com replacing [youtube=youtubeadresss]
42
 
43
+ = 3.2 =
44
+ * Added title to widget, fixed HTML code issue with widget
45
 
46
+ = 3.1.1 =
47
+ * param closed properly for HTML validation (thanks Jan Eberl)
48
 
 
49
 
50
  == Credits ==
51
 
smartyoutube.php CHANGED
@@ -4,10 +4,11 @@ Plugin Name: Smart Youtube
4
  Plugin URI: http://www.prelovac.com/vladimir/wordpress-plugins/smart-youtube
5
  Description: Insert YouTube videos in posts, comments and RSS feeds with ease and full customization.
6
  Author: Vladimir Prelovac
7
- Version: 3.2
8
  Author URI: http://www.prelovac.com/vladimir/
9
 
10
  Updates:
 
11
  3.2 - Added title to widget, fixed HTML code issue with widget
12
  3.1.1 - param closed properly for validation
13
  3.1 - wmode transparent parameter updated to better handle transparancy
@@ -364,6 +365,8 @@ text-decoration:none;
364
  <p>If you want to embed high quality video (for videos that have them) use httpvh:// instead (Video High).</p>
365
  <p>If you want to embed HD Quality (DVD quality 720p) video use httpvhd:// instead (Video High Defintion).</p>
366
  <p>To embed playlists use httpvp:// (eg. httpvp://www.youtube.com/view_play_list?p=528026B4F7B34094)</p>
 
 
367
  <ul>
368
  <li>httpv:// - regular video</li>
369
  <li>httpvh:// - high quality</li>
@@ -558,7 +561,15 @@ function yte_check($the_content, $side=0) {
558
 
559
  }
560
 
561
-
 
 
 
 
 
 
 
 
562
  return $the_content;
563
  }
564
 
4
  Plugin URI: http://www.prelovac.com/vladimir/wordpress-plugins/smart-youtube
5
  Description: Insert YouTube videos in posts, comments and RSS feeds with ease and full customization.
6
  Author: Vladimir Prelovac
7
+ Version: 3.3
8
  Author URI: http://www.prelovac.com/vladimir/
9
 
10
  Updates:
11
+ 3.3 - Supports migrated blogs from Wordpress.com replacing [youtube=youtubeadresss]
12
  3.2 - Added title to widget, fixed HTML code issue with widget
13
  3.1.1 - param closed properly for validation
14
  3.1 - wmode transparent parameter updated to better handle transparancy
365
  <p>If you want to embed high quality video (for videos that have them) use httpvh:// instead (Video High).</p>
366
  <p>If you want to embed HD Quality (DVD quality 720p) video use httpvhd:// instead (Video High Defintion).</p>
367
  <p>To embed playlists use httpvp:// (eg. httpvp://www.youtube.com/view_play_list?p=528026B4F7B34094)</p>
368
+ <p>Smart Youtube also supports migrated blogs from Wordpress.com using [youtube=youtubeadresss]</p>
369
+
370
  <ul>
371
  <li>httpv:// - regular video</li>
372
  <li>httpvh:// - high quality</li>
561
 
562
  }
563
 
564
+ // to work with migrated blogs from Wordpress.com replacing [youtube=youtubeadresss]
565
+ if(strpos($the_content, "[youtube")!==FALSE ) {
566
+ preg_match_all("/\[youtube\=http:\/\/([a-zA-Z0-9\-\_]+\.|)youtube\.com\/watch(\?v\=|\/v\/)([a-zA-Z0-9\-\_]{11})([^<\s]*)\]/", $the_content, $matches, PREG_SET_ORDER);
567
+ foreach($matches as $match) {
568
+ $the_content = preg_replace("/\[youtube\=http:\/\/([a-zA-Z0-9\-\_]+\.|)youtube\.com\/watch(\?v\=|\/v\/)([a-zA-Z0-9\-\_]{11})([^\s<]*)\]/", yte_tag($match[3], '', $match[4], $side), $the_content, 1);
569
+ }
570
+ }
571
+
572
+
573
  return $the_content;
574
  }
575