diff --git a/INSTALL.txt b/INSTALL.txt index f868b2a..bb9e56b 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -2,6 +2,6 @@ # INSTALLATION INSTRUCTIONS # ------------------------------------------------------------------------------ - 1. Upload the contents of the /glype-1.4.5/ folder to the desired directory on your server. + 1. Upload the contents of the /glype-1.4.6/ folder to the desired directory on your server. 2. Visit the URL of your Glype Admin Control Panel (i.e. http://www.domain.com/admin.php). 3. Set the desired options and save your settings. diff --git a/admin.php b/admin.php index 5fbbbcc..ccc1804 100644 --- a/admin.php +++ b/admin.php @@ -42,7 +42,7 @@ define('ADMIN_URI', $_SERVER['PHP_SELF']); # Define the current admin version -define('ADMIN_VERSION', '1.4.5'); +define('ADMIN_VERSION', '1.4.6'); # Start buffering ob_start(); diff --git a/cookies.php b/cookies.php index 538da69..8e37368 100644 --- a/cookies.php +++ b/cookies.php @@ -68,7 +68,7 @@ $line = rtrim($line); // Split by tab - $details = explode(' ', $line); + $details = explode("\t", $line); // Check valid split, expecting 7 items if ( count($details) != 7 ) { diff --git a/includes/init.php b/includes/init.php index e03568b..718fbe5 100644 --- a/includes/init.php +++ b/includes/init.php @@ -92,7 +92,7 @@ ******************************************************************/ # Current version - no need to change this! -$themeReplace['version'] = 'v1.4.5'; +$themeReplace['version'] = 'v1.4.6'; # Look for a config.php in the /themes/themeName/ folder if ( ! defined('MULTIGLYPE') && file_exists($tmp = GLYPE_ROOT . '/themes/' . $CONFIG['theme'] . '/config.php') ) { diff --git a/includes/process.php b/includes/process.php index 5a163b6..39da13b 100644 --- a/includes/process.php +++ b/includes/process.php @@ -204,7 +204,7 @@ function deleteAllCookies($array, $prefix='') { } # Split by tab - $details = explode(' ', $line); + $details = explode("\t", $line); # Check valid split, expecting 7 items if ( count($details) != 7 ) { diff --git a/includes/settings.php b/includes/settings.php index 506132d..8968a67 100644 --- a/includes/settings.php +++ b/includes/settings.php @@ -265,7 +265,7 @@ # Settings file version for determining compatability with admin # tool. -$CONFIG['version'] = '1.4.5'; +$CONFIG['version'] = '1.4.6'; //---PRESERVE ME--- // Anything below this line will be preserved when the admin control panel rewrites diff --git a/plugins/youtube.com.php b/plugins/youtube.com.php index c324923..9af5aa6 100644 --- a/plugins/youtube.com.php +++ b/plugins/youtube.com.php @@ -21,7 +21,6 @@ function preParse($input, $type) { switch($type) { case 'html': if (preg_match('#url_encoded_fmt_stream_map["\']:\s*["\']([^"\'\s]*)#', $input, $stream_map)) { - define('stream_map', $stream_map[1]); preg_match("/^([a-z0-9_]*=)/i", $stream_map[1], $yt_sep); $urls = preg_split('/'.$yt_sep[1].'/', $stream_map[1]); if (!high_quality) {$urls = array_reverse($urls);} @@ -30,18 +29,10 @@ function preParse($input, $type) { $url = str_replace('\u0026', '&', $url); if (strpos($url,'video/x-flv')===false) {continue;} - + $url = preg_replace('#;.*$#', '', $url); $url = preg_replace('#,.*$#', '', $url); - if ($yt_sep[1]=='sig=') { - preg_match("/^([^&]*)/", $url, $yt_sig); - $url.='&signature='.$yt_sig[1]; - } else { - preg_match("/sig=([^&]*)/", $url, $yt_sig); - $url.='&signature='.$yt_sig[1]; - } - if ($yt_sep[1]=='itag=') { preg_match("/^([^&]*)/", $url, $yt_itag); $url = preg_replace('#itag=[^&]*&#', '', $url); @@ -53,7 +44,15 @@ function preParse($input, $type) { $url.='&itag='.$yt_itag[1]; } - # $url = preg_replace('#&fallback_host=[^&]*#', '', $url); + if ($yt_sep[1]=='sig=') { + preg_match("/^([^&]*)/", $url, $yt_sig); + $url.='&signature='.$yt_sig[1]; + } elseif (preg_match("/sig=([^&]*)/", $url, $yt_sig)) { + $url.='&signature='.$yt_sig[1]; + } elseif (preg_match("/\bs=([^&]*)/", $url, $yt_sig)) { + continue; + } + $url = preg_replace('#^.*url=#', '', $url); define('videourl', $url); @@ -84,7 +83,6 @@ function preParse($input, $type) { function postParse($input, $type) { switch($type) { case 'html': - if(!defined('videourl')) {return $input;} # Create URL to JW Player $player_url = GLYPE_URL . '/player.swf'; @@ -94,8 +92,11 @@ function postParse($input, $type) { # Generate HTML for the flash object with our new FLV URL $html = ""; + if(!defined('videourl')) { + $html = '
This video cannot be displayed.
'; + } + # Add our own player into the player div - # $input = preg_replace('#
.*?
#s', '
' . $html .'
', $input, 1); $input = preg_replace('#
#s', '
' . $html .'
', $input, 1); $input = preg_replace('#http:\\\/\\\/s.ytimg.com\\\/yt\\\/swf\\\/watch-vfl157150.swf\\\#s','' . $player_url . '\\',$input, 1);