Version Description
Download this release
Release Info
Developer | freediver |
Plugin | Smart YouTube PRO |
Version | 3.1.1 |
Comparing to | |
See all releases |
Code changes from version 3.1 to 3.1.1
- readme.txt +4 -2
- smartyoutube.php +21 -20
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.
|
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.
|
@@ -34,10 +34,12 @@ Main Features:
|
|
34 |
|
35 |
Change Log:
|
36 |
|
|
|
|
|
|
|
37 |
v3.1
|
38 |
- wmode transparent parameter updated to better handle transparancy
|
39 |
|
40 |
-
|
41 |
v3.0
|
42 |
- Added video template, option to set sidebar video size, fixed sidebar widget code, fixed video syntax issue
|
43 |
|
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.
|
34 |
|
35 |
Change Log:
|
36 |
|
37 |
+
v3.1.1
|
38 |
+
- param closed properly for HTML validation (thanks Jan Eberl)
|
39 |
+
|
40 |
v3.1
|
41 |
- wmode transparent parameter updated to better handle transparancy
|
42 |
|
|
|
43 |
v3.0
|
44 |
- Added video template, option to set sidebar video size, fixed sidebar widget code, fixed video syntax issue
|
45 |
|
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.1
|
8 |
Author URI: http://www.prelovac.com/vladimir/
|
9 |
|
10 |
Updates:
|
|
|
11 |
3.1 - wmode transparent parameter updated to better handle transparancy
|
12 |
3.0 - Added video template, option to set sidebar video size, fixed sidebar widget code, fixed video syntax issue
|
13 |
2.8.1 - Display Annotioans added as option
|
@@ -82,17 +83,17 @@ function yte_options_page()
|
|
82 |
}
|
83 |
|
84 |
|
85 |
-
// If form was submitted
|
86 |
-
if (isset($_POST['submitted']))
|
87 |
{
|
88 |
-
check_admin_referer('smart-youtube');
|
89 |
$disp_img = !isset($_POST['disp_img'])? 'off': 'on';
|
90 |
$disp_link = !isset($_POST['disp_link'])? 'off': 'on';
|
91 |
$disp_search = !isset($_POST['disp_search'])? 'off': 'on';
|
92 |
$disp_ann = !isset($_POST['disp_ann'])? 'off': 'on';
|
93 |
$disp_info = !isset($_POST['disp_info'])? 'off': 'on';
|
94 |
-
$valid = !isset($_POST['valid'])? 'off': 'on';
|
95 |
-
|
96 |
update_option('smart_yt_img', $disp_img);
|
97 |
update_option('smart_yt_link', $disp_link);
|
98 |
update_option('smart_yt_valid', $valid);
|
@@ -146,13 +147,13 @@ function yte_options_page()
|
|
146 |
|
147 |
|
148 |
$msg_status = 'Smart Youtube options saved.';
|
149 |
-
|
150 |
-
// Show message
|
151 |
-
_e('<div id="message" class="updated fade"><p>' . $msg_status . '</p></div>');
|
152 |
-
|
153 |
-
}
|
154 |
-
|
155 |
-
// Fetch code from DB
|
156 |
$disp_img = (get_option('smart_yt_img')=='on') ? 'checked':'';
|
157 |
$disp_link = (get_option('smart_yt_link')=='on') ? 'checked':'';
|
158 |
$disp_search = (get_option('smart_yt_search')=='on') ? 'checked':'';
|
@@ -190,8 +191,8 @@ function yte_options_page()
|
|
190 |
if ($disp_width=="")
|
191 |
$disp_width="425";
|
192 |
if ($disp_height=="")
|
193 |
-
$disp_height="355";
|
194 |
-
|
195 |
|
196 |
global $wp_version;
|
197 |
global $wp_yte_plugin_url;
|
@@ -367,7 +368,7 @@ text-decoration:none;
|
|
367 |
<li>httpvh:// - high quality</li>
|
368 |
<li>httpvhd:// - HD quality</li>
|
369 |
<li>httpvp:// - playlist</li>
|
370 |
-
</ul>
|
371 |
<h2>Options</h2>
|
372 |
<p> You can adjust the way your embeded youtube videos behave in the options below.</p>
|
373 |
<p><strong>Video settings</strong></p>
|
@@ -442,7 +443,7 @@ You can try $example if you want the text to wrap around video.</p>
|
|
442 |
|
443 |
<div><input id="check1" type="checkbox" name="disp_img" $disp_img />
|
444 |
<label for="check1">Display video preview image in RSS feed</label></div>
|
445 |
-
|
446 |
<div class="submit"><input type="submit" name="Submit" value="Update options" /></div>
|
447 |
</form>
|
448 |
</div>
|
@@ -509,13 +510,13 @@ global $CustomColors;
|
|
509 |
// if ( strpos($_SERVER['HTTP_USER_AGENT'], "iPhone") || strpos($_SERVER['HTTP_USER_AGENT'], "iPod") )
|
510 |
if ($playlist)
|
511 |
{
|
512 |
-
$yte_tag = '<!-- Smart Youtube --><span class="youtube"><object width="'.$width.'" height="'.$height.'"><param name="movie" value="'.htmlspecialchars('http://www.youtube.com/p/'.$file.'&rel='.$disp_rel.'&color1='.$CustomColors[$disp_color][0].'&color2='.$CustomColors[$disp_color][1].'&border='.$disp_border.'&fs=1&hl=en&autoplay='.$autoplay.$disp_info.$disp_ann.'&showsearch='.$disp_search, ENT_QUOTES).$high.$time.'"
|
513 |
}
|
514 |
else {
|
515 |
if ($valid=="off")
|
516 |
-
$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&hl=en&autoplay='.$autoplay.$disp_info.$disp_ann.'&showsearch='.$disp_search, ENT_QUOTES).$high.$time.'"
|
517 |
else
|
518 |
-
$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&hl=en&autoplay='.$autoplay.$disp_info.$disp_ann.'&showsearch='.$disp_search, ENT_QUOTES).$high.$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&hl=en&autoplay='.$autoplay.$disp_info.$disp_ann.'&showsearch='.$disp_search, ENT_QUOTES).$high.$time.'"
|
519 |
}
|
520 |
|
521 |
|
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.1.1
|
8 |
Author URI: http://www.prelovac.com/vladimir/
|
9 |
|
10 |
Updates:
|
11 |
+
3.1.1 - param closed properly for validation
|
12 |
3.1 - wmode transparent parameter updated to better handle transparancy
|
13 |
3.0 - Added video template, option to set sidebar video size, fixed sidebar widget code, fixed video syntax issue
|
14 |
2.8.1 - Display Annotioans added as option
|
83 |
}
|
84 |
|
85 |
|
86 |
+
// If form was submitted
|
87 |
+
if (isset($_POST['submitted']))
|
88 |
{
|
89 |
+
check_admin_referer('smart-youtube');
|
90 |
$disp_img = !isset($_POST['disp_img'])? 'off': 'on';
|
91 |
$disp_link = !isset($_POST['disp_link'])? 'off': 'on';
|
92 |
$disp_search = !isset($_POST['disp_search'])? 'off': 'on';
|
93 |
$disp_ann = !isset($_POST['disp_ann'])? 'off': 'on';
|
94 |
$disp_info = !isset($_POST['disp_info'])? 'off': 'on';
|
95 |
+
$valid = !isset($_POST['valid'])? 'off': 'on';
|
96 |
+
|
97 |
update_option('smart_yt_img', $disp_img);
|
98 |
update_option('smart_yt_link', $disp_link);
|
99 |
update_option('smart_yt_valid', $valid);
|
147 |
|
148 |
|
149 |
$msg_status = 'Smart Youtube options saved.';
|
150 |
+
|
151 |
+
// Show message
|
152 |
+
_e('<div id="message" class="updated fade"><p>' . $msg_status . '</p></div>');
|
153 |
+
|
154 |
+
}
|
155 |
+
|
156 |
+
// Fetch code from DB
|
157 |
$disp_img = (get_option('smart_yt_img')=='on') ? 'checked':'';
|
158 |
$disp_link = (get_option('smart_yt_link')=='on') ? 'checked':'';
|
159 |
$disp_search = (get_option('smart_yt_search')=='on') ? 'checked':'';
|
191 |
if ($disp_width=="")
|
192 |
$disp_width="425";
|
193 |
if ($disp_height=="")
|
194 |
+
$disp_height="355";
|
195 |
+
|
196 |
|
197 |
global $wp_version;
|
198 |
global $wp_yte_plugin_url;
|
368 |
<li>httpvh:// - high quality</li>
|
369 |
<li>httpvhd:// - HD quality</li>
|
370 |
<li>httpvp:// - playlist</li>
|
371 |
+
</ul>
|
372 |
<h2>Options</h2>
|
373 |
<p> You can adjust the way your embeded youtube videos behave in the options below.</p>
|
374 |
<p><strong>Video settings</strong></p>
|
443 |
|
444 |
<div><input id="check1" type="checkbox" name="disp_img" $disp_img />
|
445 |
<label for="check1">Display video preview image in RSS feed</label></div>
|
446 |
+
|
447 |
<div class="submit"><input type="submit" name="Submit" value="Update options" /></div>
|
448 |
</form>
|
449 |
</div>
|
510 |
// if ( strpos($_SERVER['HTTP_USER_AGENT'], "iPhone") || strpos($_SERVER['HTTP_USER_AGENT'], "iPod") )
|
511 |
if ($playlist)
|
512 |
{
|
513 |
+
$yte_tag = '<!-- Smart Youtube --><span class="youtube"><object width="'.$width.'" height="'.$height.'"><param name="movie" value="'.htmlspecialchars('http://www.youtube.com/p/'.$file.'&rel='.$disp_rel.'&color1='.$CustomColors[$disp_color][0].'&color2='.$CustomColors[$disp_color][1].'&border='.$disp_border.'&fs=1&hl=en&autoplay='.$autoplay.$disp_info.$disp_ann.'&showsearch='.$disp_search, ENT_QUOTES).$high.$time.'" /><param name="allowFullScreen" value="true" /><embed wmode="transparent" src="'.htmlspecialchars('http://www.youtube.com/p/'.$file.'&rel='.$disp_rel.'&color1='.$CustomColors[$disp_color][0].'&color2='.$CustomColors[$disp_color][1].'&border='.$disp_border.'&fs=1&hl=en&autoplay='.$autoplay.$disp_info.$disp_ann.'&showsearch='.$disp_search, ENT_QUOTES).$high.$time.'" type="application/x-shockwave-flash" allowfullscreen="true" width="'.$width.'" height="'.$height.'" ></embed><param name="wmode" value="transparent" /></object></span>';
|
514 |
}
|
515 |
else {
|
516 |
if ($valid=="off")
|
517 |
+
$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&hl=en&autoplay='.$autoplay.$disp_info.$disp_ann.'&showsearch='.$disp_search, ENT_QUOTES).$high.$time.'" /><param name="allowFullScreen" value="true" /><embed wmode="transparent" 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&hl=en&autoplay='.$autoplay.$disp_info.$disp_ann.'&showsearch='.$disp_search, ENT_QUOTES).$high.$time.'" type="application/x-shockwave-flash" allowfullscreen="true" width="'.$width.'" height="'.$height.'" ></embed><param name="wmode" value="transparent" /></object></span>';
|
518 |
else
|
519 |
+
$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&hl=en&autoplay='.$autoplay.$disp_info.$disp_ann.'&showsearch='.$disp_search, ENT_QUOTES).$high.$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&hl=en&autoplay='.$autoplay.$disp_info.$disp_ann.'&showsearch='.$disp_search, ENT_QUOTES).$high.$time.'" /><param name="allowFullScreen" value="true" /><param name="wmode" value="transparent" /></object></span>';
|
520 |
}
|
521 |
|
522 |
|