Smart YouTube PRO - Version 2.8.1

Version Description

Download this release

Release Info

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

Code changes from version 2.8 to 2.8.1

Files changed (2) hide show
  1. readme.txt +3 -0
  2. smartyoutube.php +15 -5
readme.txt CHANGED
@@ -34,6 +34,9 @@ Main Features:
34
 
35
  Change Log:
36
 
 
 
 
37
  v2.8
38
  - Supports Playlists
39
 
34
 
35
  Change Log:
36
 
37
+ v2.8.1
38
+ - Added option to remove Annotations
39
+
40
  v2.8
41
  - Supports Playlists
42
 
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: 2.8
8
  Author URI: http://www.prelovac.com/vladimir/
9
 
10
  Updates:
 
11
  2.8 - Support for playlists
12
  2.7.5 - Plugin url updated to use WP_PLUGIN_URL
13
  2.7.4 - Added option to remove info&ratings
@@ -87,6 +88,7 @@ function yte_options_page()
87
  $disp_img = !isset($_POST['disp_img'])? 'off': 'on';
88
  $disp_link = !isset($_POST['disp_link'])? 'off': 'on';
89
  $disp_search = !isset($_POST['disp_search'])? 'off': 'on';
 
90
  $disp_info = !isset($_POST['disp_info'])? 'off': 'on';
91
  $valid = !isset($_POST['valid'])? 'off': 'on';
92
 
@@ -94,6 +96,7 @@ function yte_options_page()
94
  update_option('smart_yt_link', $disp_link);
95
  update_option('smart_yt_valid', $valid);
96
  update_option('smart_yt_search', $disp_search);
 
97
  update_option('smart_yt_info', $disp_info);
98
 
99
  $disp_width = (int) ($_POST['disp_width']=="")? '425': $_POST['disp_width'];
@@ -144,6 +147,7 @@ function yte_options_page()
144
  $disp_img = (get_option('smart_yt_img')=='on') ? 'checked':'';
145
  $disp_link = (get_option('smart_yt_link')=='on') ? 'checked':'';
146
  $disp_search = (get_option('smart_yt_search')=='on') ? 'checked':'';
 
147
  $disp_info = (get_option('smart_yt_info')=='on') ? 'checked':'';
148
 
149
  $valid = (get_option('smart_yt_valid')=='on') ? 'checked':'';
@@ -396,7 +400,8 @@ text-decoration:none;
396
  <input type="checkbox" onchange="onUpdatePreviewImage();" id="show_border_checkbox" name="embedBorder" $disp_border /><label for="show_border_checkbox"> Show Border</label><br>
397
  <input type="checkbox" id="autoplay_checkbox" name="autoplay" $disp_autoplay /><label for="autoplay_checkbox"> Autoplay videos</label><br>
398
  <input type="checkbox" id="disp_search" name="disp_search" $disp_search /><label for="disp_search"> Display search box</label><br>
399
- <input type="checkbox" id="disp_info" name="disp_info" $disp_info /><label for="disp_info"> Remove Titles & Ratings from YouTube Video Image</label>
 
400
  </div>
401
 
402
 
@@ -450,6 +455,7 @@ global $CustomColors;
450
  $autoplay = get_option('smart_yt_autoplay');
451
  $disp_search=(get_option('smart_yt_search')=='on') ? "1":"0";
452
  $disp_info=(get_option('smart_yt_info')=='on') ? "&showinfo=0":"";
 
453
 
454
 
455
  $valid=get_option('smart_yt_valid');
@@ -480,13 +486,13 @@ global $CustomColors;
480
  // if ( strpos($_SERVER['HTTP_USER_AGENT'], "iPhone") || strpos($_SERVER['HTTP_USER_AGENT'], "iPod") )
481
  if ($playlist)
482
  {
483
- $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.'&iv_load_policy=3&showsearch='.$disp_search, ENT_QUOTES).$high.$time.'"></param><param name="allowFullScreen" value="true"></param><embed 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.'&iv_load_policy=3&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>';
484
  }
485
  else {
486
  if ($valid=="off")
487
- $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.'&iv_load_policy=3&showsearch='.$disp_search, ENT_QUOTES).$high.$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&hl=en&autoplay='.$autoplay.$disp_info.'&iv_load_policy=3&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>';
488
  else
489
- $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.'&iv_load_policy=3&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.'&iv_load_policy=3&showsearch='.$disp_search, ENT_QUOTES).$high.$time.'"></param><param name="allowFullScreen" value="true"></param><param name="wmode" value="transparent" /></object></span>';
490
  }
491
 
492
 
@@ -572,6 +578,10 @@ function yte_install(){
572
  add_option('smart_yt_info', 'on');
573
  }
574
 
 
 
 
 
575
  // register widget
576
  if (function_exists('register_sidebar_widget'))
577
  register_sidebar_widget('Smart YouTube', 'yte_widget');
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: 2.8.1
8
  Author URI: http://www.prelovac.com/vladimir/
9
 
10
  Updates:
11
+ 2.8.1 - Display Annotioans added as option
12
  2.8 - Support for playlists
13
  2.7.5 - Plugin url updated to use WP_PLUGIN_URL
14
  2.7.4 - Added option to remove info&ratings
88
  $disp_img = !isset($_POST['disp_img'])? 'off': 'on';
89
  $disp_link = !isset($_POST['disp_link'])? 'off': 'on';
90
  $disp_search = !isset($_POST['disp_search'])? 'off': 'on';
91
+ $disp_ann = !isset($_POST['disp_ann'])? 'off': 'on';
92
  $disp_info = !isset($_POST['disp_info'])? 'off': 'on';
93
  $valid = !isset($_POST['valid'])? 'off': 'on';
94
 
96
  update_option('smart_yt_link', $disp_link);
97
  update_option('smart_yt_valid', $valid);
98
  update_option('smart_yt_search', $disp_search);
99
+ update_option('smart_yt_ann', $disp_ann);
100
  update_option('smart_yt_info', $disp_info);
101
 
102
  $disp_width = (int) ($_POST['disp_width']=="")? '425': $_POST['disp_width'];
147
  $disp_img = (get_option('smart_yt_img')=='on') ? 'checked':'';
148
  $disp_link = (get_option('smart_yt_link')=='on') ? 'checked':'';
149
  $disp_search = (get_option('smart_yt_search')=='on') ? 'checked':'';
150
+ $disp_ann = (get_option('smart_yt_ann')=='on') ? 'checked':'';
151
  $disp_info = (get_option('smart_yt_info')=='on') ? 'checked':'';
152
 
153
  $valid = (get_option('smart_yt_valid')=='on') ? 'checked':'';
400
  <input type="checkbox" onchange="onUpdatePreviewImage();" id="show_border_checkbox" name="embedBorder" $disp_border /><label for="show_border_checkbox"> Show Border</label><br>
401
  <input type="checkbox" id="autoplay_checkbox" name="autoplay" $disp_autoplay /><label for="autoplay_checkbox"> Autoplay videos</label><br>
402
  <input type="checkbox" id="disp_search" name="disp_search" $disp_search /><label for="disp_search"> Display search box</label><br>
403
+ <input type="checkbox" id="disp_info" name="disp_info" $disp_info /><label for="disp_info"> Remove Titles & Ratings</label><br>
404
+ <input type="checkbox" id="disp_ann" name="disp_ann" $disp_ann /><label for="disp_ann"> Remove Annotations</label>
405
  </div>
406
 
407
 
455
  $autoplay = get_option('smart_yt_autoplay');
456
  $disp_search=(get_option('smart_yt_search')=='on') ? "1":"0";
457
  $disp_info=(get_option('smart_yt_info')=='on') ? "&showinfo=0":"";
458
+ $disp_ann=(get_option('smart_yt_ann')=='on') ? "&iv_load_policy=3":"";
459
 
460
 
461
  $valid=get_option('smart_yt_valid');
486
  // if ( strpos($_SERVER['HTTP_USER_AGENT'], "iPhone") || strpos($_SERVER['HTTP_USER_AGENT'], "iPod") )
487
  if ($playlist)
488
  {
489
+ $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><param name="allowFullScreen" value="true"></param><embed 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>';
490
  }
491
  else {
492
  if ($valid=="off")
493
+ $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><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&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>';
494
  else
495
+ $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><param name="allowFullScreen" value="true"></param><param name="wmode" value="transparent" /></object></span>';
496
  }
497
 
498
 
578
  add_option('smart_yt_info', 'on');
579
  }
580
 
581
+ if(get_option('smart_yt_ann' == '') || !get_option('smart_yt_ann')){
582
+ add_option('smart_yt_ann', 'on');
583
+ }
584
+
585
  // register widget
586
  if (function_exists('register_sidebar_widget'))
587
  register_sidebar_widget('Smart YouTube', 'yte_widget');