Smart YouTube PRO - Version 2.2.1

Version Description

Download this release

Release Info

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

Code changes from version 2.2 to 2.2.1

Files changed (2) hide show
  1. readme.txt +8 -0
  2. smartyoutube.php +7 -6
readme.txt CHANGED
@@ -19,6 +19,14 @@ From version 2.0 Smart youtube also supports playback of high quality videos, wo
19
 
20
  The plugin is designed to be small and fast and not use any external resources. It has a number of customizable options.
21
 
 
 
 
 
 
 
 
 
22
 
23
 
24
  Change Log:
19
 
20
  The plugin is designed to be small and fast and not use any external resources. It has a number of customizable options.
21
 
22
+ Main Features:
23
+ * Easily embeds YouTube videos
24
+ * Supports YouTube high quality video protocol
25
+ * Has an option to show video thumbnail picture in your RSS feed
26
+ * Works on iPod and iPhone
27
+ * Produces xHTML valid code
28
+ * Very fast and light, no extra scripts needed
29
+ * Allows full YouTube customization (colors, border, full screen...)
30
 
31
 
32
  Change Log:
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: Easily insert YouTube videos in posts, comments and RSS feeds.
6
  Author: Vladimir Prelovac
7
- Version: 2.2
8
  Author URI: http://www.prelovac.com/vladimir/
9
 
10
  Updates:
@@ -21,7 +21,7 @@ To-Doo:
21
  - localization
22
  */
23
 
24
- $yte_localversion="2.2";
25
 
26
  $CustomColors=array (
27
  "blank" => array("d6d6d6","f0f0f0"),
@@ -413,11 +413,12 @@ global $CustomColors;
413
  $height+=18;
414
 
415
 
416
-
417
- //$yte_tag = '<!-- Smart Youtube --><span class="youtube"><object width="'.$width.'" height="'.$height.'"><param name="movie" value="'.htmlspecialchars('http://www.youtube.com/v/'.$file.'&amp;rel='.$disp_rel.'&amp;color1='.$CustomColors[$disp_color][0].'&amp;color2='.$CustomColors[$disp_color][1].'&amp;border='.$disp_border.'&amp;fs=1&amp;autoplay='.$autoplay.$high, ENT_QUOTES).'"></param><param name="allowFullScreen" value="true"></param><embed src="'.htmlspecialchars('http://www.youtube.com/v/'.$file.'&amp;rel='.$disp_rel.'&amp;color1='.$CustomColors[$disp_color][0].'&amp;color2='.$CustomColors[$disp_color][1].'&amp;border='.$disp_border.'&amp;fs=1&amp;autoplay='.$autoplay.$high, ENT_QUOTES).'" type="application/x-shockwave-flash" allowfullscreen="true" width="'.$width.'" height="'.$height.'" ></embed></object></span>';
418
- $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&autoplay='.$autoplay.$high, ENT_QUOTES).'"><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&autoplay='.$autoplay.$high, ENT_QUOTES).'"></param><param name="allowFullScreen" value="true"></param></object></span>';
 
419
 
420
- // $yte_tag = '<!-- Smart Youtube --><span class="youtube"><object width="'.$width.'" height="'.$height.'" type="application/x-shockwave-flash" 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&autoplay='.$autoplay.$high, ENT_QUOTES).'"> <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&autoplay='.$autoplay.$high, ENT_QUOTES).'" /><param name="wmode" value="transparent" /></object></span>';
421
 
422
  if (is_feed())
423
  {
4
  Plugin URI: http://www.prelovac.com/vladimir/wordpress-plugins/smart-youtube
5
  Description: Easily insert YouTube videos in posts, comments and RSS feeds.
6
  Author: Vladimir Prelovac
7
+ Version: 2.2.1
8
  Author URI: http://www.prelovac.com/vladimir/
9
 
10
  Updates:
21
  - localization
22
  */
23
 
24
+ $yte_localversion="2.2.1";
25
 
26
  $CustomColors=array (
27
  "blank" => array("d6d6d6","f0f0f0"),
413
  $height+=18;
414
 
415
 
416
+ if ( strpos($_SERVER['HTTP_USER_AGENT'], "iPhone") || strpos($_SERVER['HTTP_USER_AGENT'], "iPod") )
417
+ $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&autoplay='.$autoplay.$high, ENT_QUOTES).'"></param><param name="allowFullScreen" value="true"></param><embed src="'.htmlspecialchars('http://www.youtube.com/v/'.$file.'&amp;rel='.$disp_rel.'&amp;color1='.$CustomColors[$disp_color][0].'&amp;color2='.$CustomColors[$disp_color][1].'&amp;border='.$disp_border.'&amp;fs=1&amp;autoplay='.$autoplay.$high, ENT_QUOTES).'" type="application/x-shockwave-flash" allowfullscreen="true" width="'.$width.'" height="'.$height.'" ></embed><param name="wmode" value="transparent" /></object></span>';
418
+ else
419
+ $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&autoplay='.$autoplay.$high, ENT_QUOTES).'"><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&autoplay='.$autoplay.$high, ENT_QUOTES).'"></param><param name="allowFullScreen" value="true"></param><param name="wmode" value="transparent" /></object></span>';
420
 
421
+
422
 
423
  if (is_feed())
424
  {