Smart YouTube PRO - Version 3.8.5

Version Description

  • Fixed transparency issues (thanks to John Landells)
  • Added iframe playlist code
Download this release

Release Info

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

Code changes from version 3.8.4 to 3.8.5

Files changed (3) hide show
  1. readme.txt +4 -0
  2. smartyoutube.class.php +13 -7
  3. smartyoutube.php +1 -1
readme.txt CHANGED
@@ -37,6 +37,10 @@ Plugin by Vladimir Prelovac. Looking for <a href="http://www.prelovac.com/vladim
37
 
38
  == Changelog ==
39
 
 
 
 
 
40
  = 3.8.4 =
41
  * WordPress 3.1 update
42
 
37
 
38
  == Changelog ==
39
 
40
+ = 3.8.5 =
41
+ * Fixed transparency issues (thanks to John Landells)
42
+ * Added iframe playlist code
43
+
44
  = 3.8.4 =
45
  * WordPress 3.1 update
46
 
smartyoutube.class.php CHANGED
@@ -110,7 +110,7 @@ class SmartYouTube
110
 
111
  $this->options['posts'] = !isset($_POST['disp_posts']) ? 'off' : 'on';
112
  $this->options['comments'] = !isset($_POST['disp_comments']) ? 'off' : 'on';
113
- $this->options['iframe'] = !isset($_POST['iframe']) ? 'off' : 'on';
114
 
115
  $this->options['template'] = !isset($_POST['disp_template']) ?
116
  '{video}' :
@@ -232,7 +232,7 @@ $this->options['iframe'] = !isset($_POST['iframe']) ? 'off' : 'on';
232
  <br />
233
  <div>
234
  <input id="iframe" type="checkbox" name="iframe" $iframe />
235
- <label for="iframe">Use IFRAME embed code</label> [<a target="_blank" href="http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html">?</a>]
236
  </div>
237
 
238
 
@@ -506,7 +506,7 @@ $video_url = htmlspecialchars("$root_url/v/$file?color1={$this->custom_colors[$d
506
 
507
  $video_url = htmlspecialchars("$root_url/p/$file?color1={$this->custom_colors[$disp_color][0]}&color2={$this->custom_colors[$disp_color][1]}&border=$disp_border&fs=1&hl=en&autoplay=$autoplay{$disp_info}$disp_ann&showsearch=$disp_search&rel=$disp_rel", ENT_QUOTES) . $high . $time;
508
 
509
-
510
  $yte_tag = <<<EOT
511
  <span class="youtube">
512
  <object type="application/x-shockwave-flash" width="$width" height="$height" data="$video_url" >
@@ -515,6 +515,12 @@ $yte_tag = <<<EOT
515
  <param name="allowscriptaccess" value="always" />
516
  </object>
517
  </span>
 
 
 
 
 
 
518
  EOT;
519
  }
520
  elseif ($valid == 'off' || strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')===TRUE || strpos($_SERVER['HTTP_USER_AGENT'], 'iPod')===TRUE || strpos($_SERVER['HTTP_USER_AGENT'], 'iPad')===TRUE)
@@ -531,8 +537,8 @@ else
531
  <object width="$width" height="$height">
532
  <param name="movie" value="$video_url" />
533
  <param name="allowFullScreen" value="true" />
534
- <param name="allowscriptaccess" value="always">
535
- <embed src="$video_url" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="$width" height="$height"></embed>
536
  </object>
537
  </span>
538
  EOT;
@@ -628,7 +634,7 @@ EOT;
628
  'wtext' => '',
629
  'wtitle' => '',
630
  'tag' => '',
631
- 'iframe' => 'on'
632
  );
633
 
634
  // migrate the old-fashion options
@@ -673,7 +679,7 @@ EOT;
673
  'wtext' => '',
674
  'wtitle' => '',
675
  'tag' => '',
676
- 'iframe' => ''
677
  );
678
 
679
  $saved = get_option($this->key);
110
 
111
  $this->options['posts'] = !isset($_POST['disp_posts']) ? 'off' : 'on';
112
  $this->options['comments'] = !isset($_POST['disp_comments']) ? 'off' : 'on';
113
+ $this->options['iframe'] = !isset($_POST['iframe']) ? 'off' : 'on';
114
 
115
  $this->options['template'] = !isset($_POST['disp_template']) ?
116
  '{video}' :
232
  <br />
233
  <div>
234
  <input id="iframe" type="checkbox" name="iframe" $iframe />
235
+ <label for="iframe">Use IFRAME embed code (recommended)</label>
236
  </div>
237
 
238
 
506
 
507
  $video_url = htmlspecialchars("$root_url/p/$file?color1={$this->custom_colors[$disp_color][0]}&color2={$this->custom_colors[$disp_color][1]}&border=$disp_border&fs=1&hl=en&autoplay=$autoplay{$disp_info}$disp_ann&showsearch=$disp_search&rel=$disp_rel", ENT_QUOTES) . $high . $time;
508
 
509
+ if ($this->options['iframe']=='on')
510
  $yte_tag = <<<EOT
511
  <span class="youtube">
512
  <object type="application/x-shockwave-flash" width="$width" height="$height" data="$video_url" >
515
  <param name="allowscriptaccess" value="always" />
516
  </object>
517
  </span>
518
+ EOT;
519
+ else
520
+ $yte_tag = <<<EOT
521
+ <span class="youtube">
522
+ <iframe title="YouTube video player" class="youtube-player" type="text/html" src="$video_url" width="$width" height="$height" frameborder="0"></iframe>
523
+ </span>
524
  EOT;
525
  }
526
  elseif ($valid == 'off' || strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')===TRUE || strpos($_SERVER['HTTP_USER_AGENT'], 'iPod')===TRUE || strpos($_SERVER['HTTP_USER_AGENT'], 'iPad')===TRUE)
537
  <object width="$width" height="$height">
538
  <param name="movie" value="$video_url" />
539
  <param name="allowFullScreen" value="true" />
540
+ <embed wmode="opaque" src="$video_url" type="application/x-shockwave-flash" allowfullscreen="true" width="$width" height="$height"></embed>
541
+ <param name="wmode" value="opaque" />
542
  </object>
543
  </span>
544
  EOT;
634
  'wtext' => '',
635
  'wtitle' => '',
636
  'tag' => '',
637
+ 'iframe' => 'on'
638
  );
639
 
640
  // migrate the old-fashion options
679
  'wtext' => '',
680
  'wtitle' => '',
681
  'tag' => '',
682
+ 'iframe' => 'on'
683
  );
684
 
685
  $saved = get_option($this->key);
smartyoutube.php CHANGED
@@ -4,7 +4,7 @@ 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.8.4
8
  Author URI: http://www.prelovac.com/vladimir/
9
 
10
 
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.8.5
8
  Author URI: http://www.prelovac.com/vladimir/
9
 
10