Smart YouTube PRO - Version 2.7.4

Version Description

Download this release

Release Info

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

Code changes from version 2.7.3 to 2.7.4

Files changed (2) hide show
  1. readme.txt +3 -0
  2. smartyoutube.php +15 -7
readme.txt CHANGED
@@ -33,6 +33,9 @@ Main Features:
33
 
34
  Change Log:
35
 
 
 
 
36
  v2.7.3
37
  - Removed annotiations by default
38
 
33
 
34
  Change Log:
35
 
36
+ v2.7.4
37
+ - Added option to remove info&ratings
38
+
39
  v2.7.3
40
  - Removed annotiations by default
41
 
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.7.3
8
  Author URI: http://www.prelovac.com/vladimir/
9
 
10
  Updates:
 
11
  2.7.3 - Removed annotiations
12
  2.7 - Supports a sidebar widget for videos
13
  2.6 - Added option to remove search button
@@ -31,7 +32,7 @@ To-Doo:
31
  - the images appear under the embedded Smart Youtube videos. Is there any way to edit the z-index for Smart Youtube CSS? I
32
  */
33
 
34
- $yte_localversion="2.7.3";
35
 
36
  $CustomColors=array (
37
  "blank" => array("d6d6d6","f0f0f0"),
@@ -82,12 +83,14 @@ function yte_options_page()
82
  $disp_img = !isset($_POST['disp_img'])? 'off': 'on';
83
  $disp_link = !isset($_POST['disp_link'])? 'off': 'on';
84
  $disp_search = !isset($_POST['disp_search'])? 'off': 'on';
 
85
  $valid = !isset($_POST['valid'])? 'off': 'on';
86
 
87
  update_option('smart_yt_img', $disp_img);
88
  update_option('smart_yt_link', $disp_link);
89
  update_option('smart_yt_valid', $valid);
90
  update_option('smart_yt_search', $disp_search);
 
91
 
92
  $disp_width = (int) ($_POST['disp_width']=="")? '425': $_POST['disp_width'];
93
  $disp_height = (int) ($_POST['disp_height']=="")? '344': $_POST['disp_height'];
@@ -137,6 +140,7 @@ function yte_options_page()
137
  $disp_img = (get_option('smart_yt_img')=='on') ? 'checked':'';
138
  $disp_link = (get_option('smart_yt_link')=='on') ? 'checked':'';
139
  $disp_search = (get_option('smart_yt_search')=='on') ? 'checked':'';
 
140
 
141
  $valid = (get_option('smart_yt_valid')=='on') ? 'checked':'';
142
 
@@ -381,9 +385,8 @@ text-decoration:none;
381
  <div style="margin: 0px 0px 0px 4px; clear: both;">
382
  <input type="checkbox" onchange="onUpdatePreviewImage();" id="show_border_checkbox" name="embedBorder" $disp_border /><label for="show_border_checkbox"> Show Border</label><br>
383
  <input type="checkbox" id="autoplay_checkbox" name="autoplay" $disp_autoplay /><label for="autoplay_checkbox"> Autoplay videos</label><br>
384
- <input type="checkbox" id="disp_search" name="disp_search" $disp_search /><label for="disp_search"> Display search box</label>
385
-
386
-
387
  </div>
388
 
389
 
@@ -436,6 +439,7 @@ global $CustomColors;
436
  $disp_color = get_option('smart_yt_color');
437
  $autoplay = get_option('smart_yt_autoplay');
438
  $disp_search=(get_option('smart_yt_search')=='on') ? "1":"0";
 
439
 
440
 
441
  $valid=get_option('smart_yt_valid');
@@ -465,9 +469,9 @@ global $CustomColors;
465
  // if ( strpos($_SERVER['HTTP_USER_AGENT'], "iPhone") || strpos($_SERVER['HTTP_USER_AGENT'], "iPod") )
466
 
467
  if ($valid=="off")
468
- $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.'&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.'&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>';
469
  else
470
- $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.'&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.'&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>';
471
 
472
 
473
 
@@ -542,6 +546,10 @@ function yte_install(){
542
  add_option('smart_yt_search', 'off');
543
  }
544
 
 
 
 
 
545
  // register widget
546
  if (function_exists('register_sidebar_widget'))
547
  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.7.4
8
  Author URI: http://www.prelovac.com/vladimir/
9
 
10
  Updates:
11
+ 2.7.4 - Added option to remove info&ratings
12
  2.7.3 - Removed annotiations
13
  2.7 - Supports a sidebar widget for videos
14
  2.6 - Added option to remove search button
32
  - the images appear under the embedded Smart Youtube videos. Is there any way to edit the z-index for Smart Youtube CSS? I
33
  */
34
 
35
+ $yte_localversion="2.7.4";
36
 
37
  $CustomColors=array (
38
  "blank" => array("d6d6d6","f0f0f0"),
83
  $disp_img = !isset($_POST['disp_img'])? 'off': 'on';
84
  $disp_link = !isset($_POST['disp_link'])? 'off': 'on';
85
  $disp_search = !isset($_POST['disp_search'])? 'off': 'on';
86
+ $disp_info = !isset($_POST['disp_info'])? 'off': 'on';
87
  $valid = !isset($_POST['valid'])? 'off': 'on';
88
 
89
  update_option('smart_yt_img', $disp_img);
90
  update_option('smart_yt_link', $disp_link);
91
  update_option('smart_yt_valid', $valid);
92
  update_option('smart_yt_search', $disp_search);
93
+ update_option('smart_yt_info', $disp_info);
94
 
95
  $disp_width = (int) ($_POST['disp_width']=="")? '425': $_POST['disp_width'];
96
  $disp_height = (int) ($_POST['disp_height']=="")? '344': $_POST['disp_height'];
140
  $disp_img = (get_option('smart_yt_img')=='on') ? 'checked':'';
141
  $disp_link = (get_option('smart_yt_link')=='on') ? 'checked':'';
142
  $disp_search = (get_option('smart_yt_search')=='on') ? 'checked':'';
143
+ $disp_info = (get_option('smart_yt_info')=='on') ? 'checked':'';
144
 
145
  $valid = (get_option('smart_yt_valid')=='on') ? 'checked':'';
146
 
385
  <div style="margin: 0px 0px 0px 4px; clear: both;">
386
  <input type="checkbox" onchange="onUpdatePreviewImage();" id="show_border_checkbox" name="embedBorder" $disp_border /><label for="show_border_checkbox"> Show Border</label><br>
387
  <input type="checkbox" id="autoplay_checkbox" name="autoplay" $disp_autoplay /><label for="autoplay_checkbox"> Autoplay videos</label><br>
388
+ <input type="checkbox" id="disp_search" name="disp_search" $disp_search /><label for="disp_search"> Display search box</label><br>
389
+ <input type="checkbox" id="disp_info" name="disp_info" $disp_info /><label for="disp_info"> Remove Titles & Ratings from YouTube Video Image</label>
 
390
  </div>
391
 
392
 
439
  $disp_color = get_option('smart_yt_color');
440
  $autoplay = get_option('smart_yt_autoplay');
441
  $disp_search=(get_option('smart_yt_search')=='on') ? "1":"0";
442
+ $disp_info=(get_option('smart_yt_info')=='on') ? "&showinfo=0":"";
443
 
444
 
445
  $valid=get_option('smart_yt_valid');
469
  // if ( strpos($_SERVER['HTTP_USER_AGENT'], "iPhone") || strpos($_SERVER['HTTP_USER_AGENT'], "iPod") )
470
 
471
  if ($valid=="off")
472
+ $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>';
473
  else
474
+ $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>';
475
 
476
 
477
 
546
  add_option('smart_yt_search', 'off');
547
  }
548
 
549
+ if(get_option('smart_yt_info' == '') || !get_option('smart_yt_info')){
550
+ add_option('smart_yt_info', 'on');
551
+ }
552
+
553
  // register widget
554
  if (function_exists('register_sidebar_widget'))
555
  register_sidebar_widget('Smart YouTube', 'yte_widget');