You are here

function googtube_google in Googtube 5

Same name and namespace in other branches
  1. 7 googtube.module \googtube_google()
1 string reference to 'googtube_google'
googtube_filter in ./googtube.module

File

./googtube.module, line 72

Code

function googtube_google($match) {
  $parsed_url = parse_url(check_url($match[0]));
  parse_str($parsed_url[query], $parsed_query);
  $googlevideo_id = $parsed_query['docid'];
  isset($parsed_query['hl']) ? $googlevideo_hl = '&hl=' . $parsed_query['hl'] : ($googlevideo_hl = '');
  return '<embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=' . $googlevideo_id . $googlevideo_hl . '" flashvars=""> </embed>';
}