Smart YouTube PRO - Version 3.8.9

Version Description

  • Supports new youtube dark 'Cosmic panda' theme
Download this release

Release Info

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

Code changes from version 3.8.8 to 3.8.9

Files changed (3) hide show
  1. readme.txt +3 -0
  2. smartyoutube.class.php +11 -7
  3. smartyoutube.php +2 -2
readme.txt CHANGED
@@ -37,6 +37,9 @@ Plugin by Vladimir Prelovac. Looking for <a href="http://www.prelovac.com/vladim
37
 
38
  == Changelog ==
39
 
 
 
 
40
  = 3.8.8 =
41
  * Fixed the problem with autoplaying iframe embed videos
42
 
37
 
38
  == Changelog ==
39
 
40
+ = 3.8.9 =
41
+ * Supports new youtube dark 'Cosmic panda' theme
42
+
43
  = 3.8.8 =
44
  * Fixed the problem with autoplaying iframe embed videos
45
 
smartyoutube.class.php CHANGED
@@ -14,7 +14,7 @@ class SmartYouTube
14
 
15
  function __construct()
16
  {
17
- $this->local_version = '3.8.8'; // TODO: Change this number???
18
  $this->custom_colors = array(
19
  'blank' => array('d6d6d6', 'f0f0f0'),
20
  'storm' => array('3a3a3a', '999999'),
@@ -117,6 +117,7 @@ class SmartYouTube
117
  '{video}' :
118
  stripslashes(htmlspecialchars($_POST['disp_template']));;
119
  $this->options['tag'] = !isset($_POST['tag']) ? '' : $_POST['tag'];
 
120
 
121
  update_option($this->key, $this->options);
122
 
@@ -158,7 +159,7 @@ class SmartYouTube
158
 
159
  $disp_template = wp_specialchars($this->options['template']);
160
  $tag = $this->options['tag'];
161
-
162
 
163
  if (!$disp_width)
164
  {
@@ -347,7 +348,8 @@ class SmartYouTube
347
  <input type="checkbox" id="disp_search" name="disp_search" $disp_search /><label for="disp_search"> Display search box</label><br />
348
  <input type="checkbox" id="disp_info" name="disp_info" $disp_info /><label for="disp_info"> Remove Titles & Ratings</label><br />
349
  <input type="checkbox" id="disp_ann" name="disp_ann" $disp_ann /><label for="disp_ann"> Remove Annotations</label><br />
350
- <input type="checkbox" id="privacy" name="disp_privacy" $disp_privacy /><label for="privacy"> Enable privacy-enhanced mode [<a target="_blank" href="http://www.google.com/support/youtube/bin/answer.py?answer=141046">?</a>] (videos may not work for Iphone users)</label>
 
351
  </div>
352
 
353
  <h3>Custom code compatibility</h3>
@@ -465,6 +467,7 @@ END;
465
  $disp_ann = $this->options['ann'] == 'on' ? '&iv_load_policy=3' : '';
466
  $template = trim($this->options['template']) == '' ? '{video}' : $this->options['template'];
467
  $valid = $this->options['valid'];
 
468
 
469
  switch ($high)
470
  {
@@ -519,14 +522,14 @@ END;
519
  $root_url = $this->options['privacy'] ? 'http://www.youtube-nocookie.com' : 'http://www.youtube.com';
520
 
521
  if ($this->options['iframe']=='on')
522
- $video_url = htmlspecialchars("$root_url/embed/$file?color1={$this->custom_colors[$disp_color][0]}&color2={$this->custom_colors[$disp_color][1]}&border=$disp_border&fs=1&hl=en$ap&loop=$loop{$disp_info}$disp_ann&showsearch=$disp_search&rel=$disp_rel", ENT_QUOTES) . $high . $time;
523
  else
524
- $video_url = htmlspecialchars("$root_url/v/$file?color1={$this->custom_colors[$disp_color][0]}&color2={$this->custom_colors[$disp_color][1]}&border=$disp_border&fs=1&hl=en$ap&loop=$loop{$disp_info}$disp_ann&showsearch=$disp_search&rel=$disp_rel", ENT_QUOTES) . $high . $time;
525
 
526
  if ($playlist)
527
  {
528
 
529
- $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$ap&loop={$disp_info}$disp_ann&showsearch=$disp_search&rel=$disp_rel", ENT_QUOTES) . $high . $time;
530
 
531
  if ($this->options['iframe']=='on')
532
  $yte_tag = <<<EOT
@@ -701,7 +704,8 @@ EOT;
701
  'wtext' => '',
702
  'wtitle' => '',
703
  'tag' => '',
704
- 'iframe' => 'on'
 
705
  );
706
 
707
  $saved = get_option($this->key);
14
 
15
  function __construct()
16
  {
17
+ $this->local_version = '3.8.9'; // TODO: Change this number???
18
  $this->custom_colors = array(
19
  'blank' => array('d6d6d6', 'f0f0f0'),
20
  'storm' => array('3a3a3a', '999999'),
117
  '{video}' :
118
  stripslashes(htmlspecialchars($_POST['disp_template']));;
119
  $this->options['tag'] = !isset($_POST['tag']) ? '' : $_POST['tag'];
120
+ $this->options['dark_player'] = ! isset( $_POST['dark_player'] ) ? 'off' : 'on';
121
 
122
  update_option($this->key, $this->options);
123
 
159
 
160
  $disp_template = wp_specialchars($this->options['template']);
161
  $tag = $this->options['tag'];
162
+ $dark_player = $this->options['dark_player'] == 'on' ? 'checked="checked"' : '';
163
 
164
  if (!$disp_width)
165
  {
348
  <input type="checkbox" id="disp_search" name="disp_search" $disp_search /><label for="disp_search"> Display search box</label><br />
349
  <input type="checkbox" id="disp_info" name="disp_info" $disp_info /><label for="disp_info"> Remove Titles & Ratings</label><br />
350
  <input type="checkbox" id="disp_ann" name="disp_ann" $disp_ann /><label for="disp_ann"> Remove Annotations</label><br />
351
+ <input type="checkbox" id="privacy" name="disp_privacy" $disp_privacy /><label for="privacy"> Enable privacy-enhanced mode [<a target="_blank" href="http://www.google.com/support/youtube/bin/answer.py?answer=141046">?</a>] (videos may not work for Iphone users)</label><br />
352
+ <input type="checkbox" id="dark_player" name="dark_player" $dark_player /><label for="dark_player"> Use new Youtube "dark" player (requires IFRAME mode to be turned on)</label><br />
353
  </div>
354
 
355
  <h3>Custom code compatibility</h3>
467
  $disp_ann = $this->options['ann'] == 'on' ? '&iv_load_policy=3' : '';
468
  $template = trim($this->options['template']) == '' ? '{video}' : $this->options['template'];
469
  $valid = $this->options['valid'];
470
+ $dark_player = ( $this->options['dark_player'] == 'on' ) ? '&theme=dark' : '';
471
 
472
  switch ($high)
473
  {
522
  $root_url = $this->options['privacy'] ? 'http://www.youtube-nocookie.com' : 'http://www.youtube.com';
523
 
524
  if ($this->options['iframe']=='on')
525
+ $video_url = htmlspecialchars("$root_url/embed/$file?color1={$this->custom_colors[$disp_color][0]}&color2={$this->custom_colors[$disp_color][1]}&border=$disp_border&fs=1&hl=en$ap&loop=$loop{$disp_info}$disp_ann&showsearch=$disp_search&rel=$disp_rel$dark_player", ENT_QUOTES) . $high . $time;
526
  else
527
+ $video_url = htmlspecialchars("$root_url/v/$file?color1={$this->custom_colors[$disp_color][0]}&color2={$this->custom_colors[$disp_color][1]}&border=$disp_border&fs=1&hl=en$ap&loop=$loop{$disp_info}$disp_ann&showsearch=$disp_search&rel=$disp_rel$dark_player", ENT_QUOTES) . $high . $time;
528
 
529
  if ($playlist)
530
  {
531
 
532
+ $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$ap&loop={$disp_info}$disp_ann&showsearch=$disp_search&rel=$disp_rel$dark_player", ENT_QUOTES) . $high . $time;
533
 
534
  if ($this->options['iframe']=='on')
535
  $yte_tag = <<<EOT
704
  'wtext' => '',
705
  'wtitle' => '',
706
  'tag' => '',
707
+ 'iframe' => 'on',
708
+ 'dark_player' => ''
709
  );
710
 
711
  $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.8
8
  Author URI: http://www.prelovac.com/vladimir/
9
 
10
 
@@ -73,4 +73,4 @@ if (isset($smart_youtube)) return false;
73
 
74
  require_once(dirname(__FILE__) . '/smartyoutube.class.php');
75
 
76
- $smart_youtube = new SmartYouTube();
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.9
8
  Author URI: http://www.prelovac.com/vladimir/
9
 
10
 
73
 
74
  require_once(dirname(__FILE__) . '/smartyoutube.class.php');
75
 
76
+ $smart_youtube = new SmartYouTube();