Version Description
Download this release
Release Info
Developer | freediver |
Plugin | Smart YouTube PRO |
Version | 2.4 |
Comparing to | |
See all releases |
Code changes from version 2.3.2 to 2.4
- readme.txt +7 -16
- smartyoutube.php +6 -5
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.6.
|
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.
|
@@ -20,8 +20,10 @@ From version 2.0 Smart youtube also supports playback of high quality videos, wo
|
|
20 |
The plugin is designed to be small and fast and not use any external resources. It has a number of customizable options.
|
21 |
|
22 |
Main Features:
|
|
|
23 |
* Easily embeds YouTube videos
|
24 |
* Supports YouTube high quality video protocol
|
|
|
25 |
* Has an option to show video thumbnail picture in your RSS feed
|
26 |
* Works on iPod and iPhone
|
27 |
* Produces xHTML valid code
|
@@ -30,28 +32,17 @@ Main Features:
|
|
30 |
|
31 |
|
32 |
Change Log:
|
|
|
|
|
|
|
33 |
v2.3:
|
34 |
- xHTML valid code is now an option because it breaks videos in some browsers and feeds
|
35 |
|
36 |
v2.2:
|
37 |
- Full xHTML validation
|
38 |
|
39 |
-
v2.1:
|
40 |
-
- Smart Youtube videos are compatible with iPhone.
|
41 |
-
- Fullscreen enabled
|
42 |
-
|
43 |
-
v2.0.1:
|
44 |
-
Fixed high qualiy video issue.
|
45 |
-
|
46 |
-
v2.0:
|
47 |
-
Suport for high quality videos from youtube
|
48 |
-
|
49 |
-
v1.91:
|
50 |
-
Rewritten old parts of plugin and general tweaks.
|
51 |
-
|
52 |
-
v1.9:
|
53 |
-
Added video autoplay option.
|
54 |
|
|
|
55 |
|
56 |
== Credits ==
|
57 |
|
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.6.3
|
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.
|
20 |
The plugin is designed to be small and fast and not use any external resources. It has a number of customizable options.
|
21 |
|
22 |
Main Features:
|
23 |
+
|
24 |
* Easily embeds YouTube videos
|
25 |
* Supports YouTube high quality video protocol
|
26 |
+
* Supports video deep linking (starting at desired point with &start=time parameter)
|
27 |
* Has an option to show video thumbnail picture in your RSS feed
|
28 |
* Works on iPod and iPhone
|
29 |
* Produces xHTML valid code
|
32 |
|
33 |
|
34 |
Change Log:
|
35 |
+
v2.4:
|
36 |
+
- Supports video deep linking. Just add &start=time parameter at the end of url. For example httpv://www.youtube.com/watch?v=OWfksMD4PAg&start=30 will start the video 30 seconds in
|
37 |
+
|
38 |
v2.3:
|
39 |
- xHTML valid code is now an option because it breaks videos in some browsers and feeds
|
40 |
|
41 |
v2.2:
|
42 |
- Full xHTML validation
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
+
Plugin by Vladimir Prelovac. Need a <a href="http://www.prelovac.com/vladimir/services">WordPress Consultant</a>?
|
46 |
|
47 |
== Credits ==
|
48 |
|
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: Easily insert YouTube videos in posts, comments and RSS feeds.
|
6 |
Author: Vladimir Prelovac
|
7 |
-
Version: 2.
|
8 |
Author URI: http://www.prelovac.com/vladimir/
|
9 |
|
10 |
Updates:
|
|
|
11 |
2.2 - Full xHTML validaiton
|
12 |
2.1 - Made the application iPhone compatible and allowed full screen
|
13 |
2.0 - Support for playback high quality YouTube videos
|
@@ -401,7 +402,7 @@ add_action('admin_menu', 'yte_add_pages');
|
|
401 |
|
402 |
|
403 |
|
404 |
-
function yte_tag($file, $high=0) {
|
405 |
global $CustomColors;
|
406 |
|
407 |
$width=$high ? get_option('smart_yt_widthhq') : get_option('smart_yt_width');
|
@@ -428,9 +429,9 @@ global $CustomColors;
|
|
428 |
// if ( strpos($_SERVER['HTTP_USER_AGENT'], "iPhone") || strpos($_SERVER['HTTP_USER_AGENT'], "iPod") )
|
429 |
|
430 |
if ($valid=="off")
|
431 |
-
$yte_tag = '<!-- Smart Youtube --><span class="youtube"><object width="'.$width.'" height="'.$height.'"><param name="movie" value="'.htmlspecialchars('http://www.youtube.com/v/'.$file.'&rel='.$disp_rel.'&color1='.$CustomColors[$disp_color][0].'&color2='.$CustomColors[$disp_color][1].'&border='.$disp_border.'&fs=1&autoplay='.$autoplay.$high, ENT_QUOTES).'"></param><param name="allowFullScreen" value="true"></param><embed src="'.htmlspecialchars('http://www.youtube.com/v/'.$file.'&
|
432 |
else
|
433 |
-
$yte_tag = '<!-- Smart Youtube --><span class="youtube"><object type="application/x-shockwave-flash" width="'.$width.'" height="'.$height.'" data="'.htmlspecialchars('http://www.youtube.com/v/'.$file.'&rel='.$disp_rel.'&color1='.$CustomColors[$disp_color][0].'&color2='.$CustomColors[$disp_color][1].'&border='.$disp_border.'&fs=1&autoplay='.$autoplay.$high, ENT_QUOTES).'"><param name="movie" value="'.htmlspecialchars('http://www.youtube.com/v/'.$file.'&rel='.$disp_rel.'&color1='.$CustomColors[$disp_color][0].'&color2='.$CustomColors[$disp_color][1].'&border='.$disp_border.'&fs=1&autoplay='.$autoplay.$high, ENT_QUOTES).'"></param><param name="allowFullScreen" value="true"></param><param name="wmode" value="transparent" /></object></span>';
|
434 |
|
435 |
|
436 |
|
@@ -456,7 +457,7 @@ function yte_check($the_content) {
|
|
456 |
|
457 |
preg_match_all("/httpv:\/\/([a-zA-Z0-9\-\_]+\.|)youtube\.com\/watch(\?v\=|\/v\/)([a-zA-Z0-9\-\_]{11})([^<\s]*)/", $the_content, $matches, PREG_SET_ORDER);
|
458 |
foreach($matches as $match) {
|
459 |
-
$the_content = preg_replace("/httpv:\/\/([a-zA-Z0-9\-\_]+\.|)youtube\.com\/watch(\?v\=|\/v\/)([a-zA-Z0-9\-\_]{11})([^\s<]*)/", yte_tag($match[3], 0), $the_content, 1);
|
460 |
}
|
461 |
|
462 |
preg_match_all("/httpvh:\/\/([a-zA-Z0-9\-\_]+\.|)youtube\.com\/watch(\?v\=|\/v\/)([a-zA-Z0-9\-\_]{11})([^<\s]*)/", $the_content, $matches, PREG_SET_ORDER);
|
4 |
Plugin URI: http://www.prelovac.com/vladimir/wordpress-plugins/smart-youtube
|
5 |
Description: Easily insert YouTube videos in posts, comments and RSS feeds.
|
6 |
Author: Vladimir Prelovac
|
7 |
+
Version: 2.4
|
8 |
Author URI: http://www.prelovac.com/vladimir/
|
9 |
|
10 |
Updates:
|
11 |
+
2.4 - Added support for extra parameters like &start=50 to start the video at 50th second of play
|
12 |
2.2 - Full xHTML validaiton
|
13 |
2.1 - Made the application iPhone compatible and allowed full screen
|
14 |
2.0 - Support for playback high quality YouTube videos
|
402 |
|
403 |
|
404 |
|
405 |
+
function yte_tag($file, $high=0, $time = "") {
|
406 |
global $CustomColors;
|
407 |
|
408 |
$width=$high ? get_option('smart_yt_widthhq') : get_option('smart_yt_width');
|
429 |
// if ( strpos($_SERVER['HTTP_USER_AGENT'], "iPhone") || strpos($_SERVER['HTTP_USER_AGENT'], "iPod") )
|
430 |
|
431 |
if ($valid=="off")
|
432 |
+
$yte_tag = '<!-- Smart Youtube --><span class="youtube"><object width="'.$width.'" height="'.$height.'"><param name="movie" value="'.htmlspecialchars('http://www.youtube.com/v/'.$file.'&rel='.$disp_rel.'&color1='.$CustomColors[$disp_color][0].'&color2='.$CustomColors[$disp_color][1].'&border='.$disp_border.'&fs=1&autoplay='.$autoplay.$high, ENT_QUOTES).$time.'"></param><param name="allowFullScreen" value="true"></param><embed src="'.htmlspecialchars('http://www.youtube.com/v/'.$file.'&rel='.$disp_rel.'&color1='.$CustomColors[$disp_color][0].'&color2='.$CustomColors[$disp_color][1].'&border='.$disp_border.'&fs=1&autoplay='.$autoplay.$high, ENT_QUOTES).$time.'" type="application/x-shockwave-flash" allowfullscreen="true" width="'.$width.'" height="'.$height.'" ></embed><param name="wmode" value="transparent" /></object></span>';
|
433 |
else
|
434 |
+
$yte_tag = '<!-- Smart Youtube --><span class="youtube"><object type="application/x-shockwave-flash" width="'.$width.'" height="'.$height.'" data="'.htmlspecialchars('http://www.youtube.com/v/'.$file.'&rel='.$disp_rel.'&color1='.$CustomColors[$disp_color][0].'&color2='.$CustomColors[$disp_color][1].'&border='.$disp_border.'&fs=1&autoplay='.$autoplay.$high, ENT_QUOTES).$time.'"><param name="movie" value="'.htmlspecialchars('http://www.youtube.com/v/'.$file.'&rel='.$disp_rel.'&color1='.$CustomColors[$disp_color][0].'&color2='.$CustomColors[$disp_color][1].'&border='.$disp_border.'&fs=1&autoplay='.$autoplay.$high, ENT_QUOTES).$time.'"></param><param name="allowFullScreen" value="true"></param><param name="wmode" value="transparent" /></object></span>';
|
435 |
|
436 |
|
437 |
|
457 |
|
458 |
preg_match_all("/httpv:\/\/([a-zA-Z0-9\-\_]+\.|)youtube\.com\/watch(\?v\=|\/v\/)([a-zA-Z0-9\-\_]{11})([^<\s]*)/", $the_content, $matches, PREG_SET_ORDER);
|
459 |
foreach($matches as $match) {
|
460 |
+
$the_content = preg_replace("/httpv:\/\/([a-zA-Z0-9\-\_]+\.|)youtube\.com\/watch(\?v\=|\/v\/)([a-zA-Z0-9\-\_]{11})([^\s<]*)/", yte_tag($match[3], 0, $match[4]), $the_content, 1);
|
461 |
}
|
462 |
|
463 |
preg_match_all("/httpvh:\/\/([a-zA-Z0-9\-\_]+\.|)youtube\.com\/watch(\?v\=|\/v\/)([a-zA-Z0-9\-\_]{11})([^<\s]*)/", $the_content, $matches, PREG_SET_ORDER);
|