Version Description
- Added iPad compatibility
Download this release
Release Info
| Developer | freediver |
| Plugin | |
| Version | 3.6.1 |
| Comparing to | |
| See all releases | |
Code changes from version 3.6 to 3.6.1
- readme.txt +3 -0
- smartyoutube.class.php +16 -12
- smartyoutube.php +2 -1
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.6 =
|
| 41 |
* Added compatibility with other Youtube plugins such as wp-youtube ([yt]...[/yt] type code)
|
| 42 |
|
| 37 |
|
| 38 |
== Changelog ==
|
| 39 |
|
| 40 |
+
= 3.6.1 =
|
| 41 |
+
* Added iPad compatibility
|
| 42 |
+
|
| 43 |
= 3.6 =
|
| 44 |
* Added compatibility with other Youtube plugins such as wp-youtube ([yt]...[/yt] type code)
|
| 45 |
|
smartyoutube.class.php
CHANGED
|
@@ -363,6 +363,7 @@ class SmartYouTube
|
|
| 363 |
END;
|
| 364 |
}
|
| 365 |
|
|
|
|
| 366 |
/**
|
| 367 |
* Looks for Smart Youtube URL(s) in the post content
|
| 368 |
* and replace them with proper HTML tags
|
|
@@ -375,21 +376,24 @@ END;
|
|
| 375 |
{
|
| 376 |
if (strpos($the_content, "httpv") !== false )
|
| 377 |
{
|
| 378 |
-
|
| 379 |
-
|
| 380 |
-
|
|
|
|
| 381 |
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
|
| 385 |
$the_content = preg_replace("/http".$match[1].":\/\/([a-zA-Z0-9\-\_]+\.|)youtube\.com\/watch(\?v\=|\/v\/|#!v=)([a-zA-Z0-9\-\_]{11})([^\s<]*)/", $this->tag($match[4], $match[1], $match[5], $side), $the_content, 1);
|
| 386 |
-
|
| 387 |
|
| 388 |
-
|
| 389 |
-
|
| 390 |
-
|
| 391 |
$the_content = preg_replace("/http".$match[1].":\/\/([a-zA-Z0-9\-\_]+\.|)youtube\.com\/view_play_list(\?p\=|\/v\/|#!v=)([a-zA-Z0-9\-\_]{16})([^\s<]*)/", $this->tag($match[4], $match[1], $match[5], $side), $the_content, 1);
|
| 392 |
-
|
|
|
|
|
|
|
| 393 |
}
|
| 394 |
|
| 395 |
// to work with migrated blogs from Wordpress.com replacing [youtube=youtubeadresss]
|
|
@@ -487,7 +491,7 @@ END;
|
|
| 487 |
</span>
|
| 488 |
EOT;
|
| 489 |
}
|
| 490 |
-
elseif ($valid == 'off' || strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')===TRUE || strpos($_SERVER['HTTP_USER_AGENT'], 'iPod')===TRUE)
|
| 491 |
{
|
| 492 |
$video_url = htmlspecialchars("$root_url/v/$file&rel=$disp_rel&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", ENT_QUOTES) . $high . $time;
|
| 493 |
$yte_tag = <<<EOT
|
| 363 |
END;
|
| 364 |
}
|
| 365 |
|
| 366 |
+
|
| 367 |
/**
|
| 368 |
* Looks for Smart Youtube URL(s) in the post content
|
| 369 |
* and replace them with proper HTML tags
|
| 376 |
{
|
| 377 |
if (strpos($the_content, "httpv") !== false )
|
| 378 |
{
|
| 379 |
+
$char_codes = array('×', '–');
|
| 380 |
+
$replacements = array("x", "--");
|
| 381 |
+
$the_content = str_replace($char_codes, $replacements, $the_content);
|
| 382 |
+
|
| 383 |
|
| 384 |
+
preg_match_all("/http(v|vh|vhd):\/\/([a-zA-Z0-9\-\_]+\.|)youtube\.com\/watch(\?v\=|\/v\/|#!v=)([a-zA-Z0-9\-\_]{11})([^<\s]*)/", $the_content, $matches, PREG_SET_ORDER);
|
| 385 |
+
foreach ($matches as $match)
|
| 386 |
+
{
|
| 387 |
$the_content = preg_replace("/http".$match[1].":\/\/([a-zA-Z0-9\-\_]+\.|)youtube\.com\/watch(\?v\=|\/v\/|#!v=)([a-zA-Z0-9\-\_]{11})([^\s<]*)/", $this->tag($match[4], $match[1], $match[5], $side), $the_content, 1);
|
| 388 |
+
}
|
| 389 |
|
| 390 |
+
preg_match_all("/http(vp):\/\/([a-zA-Z0-9\-\_]+\.|)youtube\.com\/view_play_list(\?p\=|\/v\/|#!v=)([a-zA-Z0-9\-\_]{16})([^<\s]*)/", $the_content, $matches, PREG_SET_ORDER);
|
| 391 |
+
foreach ($matches as $match)
|
| 392 |
+
{
|
| 393 |
$the_content = preg_replace("/http".$match[1].":\/\/([a-zA-Z0-9\-\_]+\.|)youtube\.com\/view_play_list(\?p\=|\/v\/|#!v=)([a-zA-Z0-9\-\_]{16})([^\s<]*)/", $this->tag($match[4], $match[1], $match[5], $side), $the_content, 1);
|
| 394 |
+
}
|
| 395 |
+
|
| 396 |
+
|
| 397 |
}
|
| 398 |
|
| 399 |
// to work with migrated blogs from Wordpress.com replacing [youtube=youtubeadresss]
|
| 491 |
</span>
|
| 492 |
EOT;
|
| 493 |
}
|
| 494 |
+
elseif ($valid == 'off' || strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')===TRUE || strpos($_SERVER['HTTP_USER_AGENT'], 'iPod')===TRUE || strpos($_SERVER['HTTP_USER_AGENT'], 'iPad')===TRUE)
|
| 495 |
{
|
| 496 |
$video_url = htmlspecialchars("$root_url/v/$file&rel=$disp_rel&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", ENT_QUOTES) . $high . $time;
|
| 497 |
$yte_tag = <<<EOT
|
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: 3.6.
|
| 8 |
Author URI: http://www.prelovac.com/vladimir/
|
| 9 |
|
| 10 |
Updates:
|
|
|
|
| 11 |
3.6 - Added compatibility with other youtube plugins such as wp-youtube ([yt]...[/yt] type code)
|
| 12 |
3.5 - Fixed Iphone issues
|
| 13 |
3.4.3 - Fixed privacy option
|
| 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.6.1
|
| 8 |
Author URI: http://www.prelovac.com/vladimir/
|
| 9 |
|
| 10 |
Updates:
|
| 11 |
+
3.6.1 - Added Ipad compatbility (credits Lew Ayotte)
|
| 12 |
3.6 - Added compatibility with other youtube plugins such as wp-youtube ([yt]...[/yt] type code)
|
| 13 |
3.5 - Fixed Iphone issues
|
| 14 |
3.4.3 - Fixed privacy option
|
