Open up notepad.txt and paste this code inside
Code:
<?php
##############################################
# Plugin: YOUTUBE.COM
# Thumbnail Support By: Dominic Robinson
##############################################
/* ABOUT ---------------------------------
/ This plugin replaces the default YouTube video player
/ with our own player that loads the flv file through
/ the proxy.
-----------------------------------------*/
##########################################
# REMOVE NON-WORKING FLASH OBJECTS
##########################################
$options['stripFlash'] = true;
##########################################
# EXTRA PARSING BEFORE MAIN PROXY PARSER
##########################################
function preParse($html,$type) {
if ( $type=='html' && preg_match('/fullscreenUrl\s\=\s.*video\_id\=(.*)\&.*\&t\=(.*)\&/i',$html,$matches) ) {
$thumbid_arr = explode('&', basename($matches[1]));
$thumbid = array_shift($thumbid_arr);
$s[] = '/var v="7";(.*?)player_div\);/is';
$r[] = '';
$s[] = '#// <!\[(.*?)// \]\]>#is';
$r[] = '';
$s[] = "#Hello, you either have JavaScript turned off or an old version of Adobe's Flash Player.#";
$r[] = '';
$s[] = "#</noscript>#";
$r[] = '</noscript><div style="visibility: hidden;">';
$s[] = '#<div id="actionsAreaDiv">#';
$r[] = '</div><div id="actionsAreaDiv">';
$s[] = '#<div style="padding: 20px; font-size:14px; font-weight: bold;">#';
$r[] = '<div>';
$s[] = '#Get the latest Flash player</a>.#';
$r[] = "</a>";
$s[] = '#<div id="playerDiv">#';
$r[] = '<div><object type="application/x-shockwave-flash" data="' . optURL . 'videoplayer.swf" height="395" width="480" allowfullscreen="true"><param name="movie" value="' . optURL . 'videoplayer.swf" /><param name="flashvars" value="file='.proxifyURL('http://youtube.com/get_video?video_id='.$matches[1].'&t='.$matches[2]).'&image='.proxifyURL('http://i.ytimg.com/vi/'.$thumbid.'/0.jpg').'&type=flv&allowfullscreen=true&autostart=false&fullscreenpage=true&fsreturnpage=true&backcolor=0x000000&frontcolor=0xCCCCCC&lightcolor=0x996600" /><param name="menu" value="false" /></object>';
$html = preg_replace($s,$r,$html);
}
return $html;
}
##########################################
# EXTRA PARSING AFTER MAIN PROXY PARSER
##########################################
function postParse(&$html,$type) {
// Replace unproxified image
if ( $type == 'javascript' )
return str_replace('http://s.ytimg.com/yt/img/pixel-vfl73.gif',proxifyURL('http://s.ytimg.com/yt/img/pixel-vfl73.gif'),$html);
return $html;
}
?>
Name it as youtube.php
Upload youtube.php into you plugin folder.
Download the media player (as found on Glype Forum)
videoplayer.swf
And upload the player to your PROXY DIRECTORY. (public_html)