| 1 |
<?php |
<?php |
| 2 |
//$Id: video_youtube.module,v 1.2.4.3 2009/11/07 04:56:56 heshanmw Exp $ |
//$Id: video_youtube.module,v 1.2.4.4 2009/11/07 17:00:23 heshanmw Exp $ |
| 3 |
/** |
/** |
| 4 |
* @file |
* @file |
| 5 |
* Enable Youtube support for video module. |
* Enable Youtube support for video module. |
| 259 |
return $video_entry->getVideoDuration(); |
return $video_entry->getVideoDuration(); |
| 260 |
} |
} |
| 261 |
|
|
|
|
|
|
/** THEMEABLE FUNCTIONS */ |
|
|
|
|
|
//function theme_video_youtube_play($node) { |
|
|
// $width = ($node->video_scaled_x ? $node->video_scaled_x : '425'); |
|
|
// $height = ($node->video_scaled_y ? $node->video_scaled_y : '350'); |
|
|
// |
|
|
// $id = _video_youtube_get_id(check_plain($node->vidfile)); |
|
|
// |
|
|
// // related video setting |
|
|
// $rel = variable_get('video_youtube_related', false) ? '1' : '0'; |
|
|
// |
|
|
// // this will be executed by not Internet Explorer browsers |
|
|
// $output = '<!--[if !IE]> <--> |
|
|
//<object type="application/x-shockwave-flash" width="'. $width .'" height="'. $height .'" |
|
|
//data="http://www.youtube.com/v/' . $id . '&rel='.$rel.'"> |
|
|
//<!--> <![endif]-->' . "\n"; |
|
|
// |
|
|
// // this will be executed by Internet Explorer |
|
|
// $output .= '<!--[if IE]> |
|
|
//<object type="application/x-shockwave-flash" width="'. $width .'" height="'. $height .'" |
|
|
//classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" |
|
|
//codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"> |
|
|
//<![endif]-->' . "\n"; |
|
|
// |
|
|
// // params will be passed to both IE or not IE browsers |
|
|
// $output .= '<param name="movie" value="http://www.youtube.com/v/' . $id . '&rel='.$rel.'" />' . "\n" |
|
|
// . '<param name="wmode" value="transparent" />' . "\n" |
|
|
// . _video_get_parameters($node) . |
|
|
// '<p>'. t('Your browser is not able to display this multimedia content.') .'</p> |
|
|
//</object>'; |
|
|
// |
|
|
// |
|
|
// $output = theme('video_format_play', $output, t('http://www.google.com/support/youtube'), t('Link to youtube.com'), t('youtube.com')); |
|
|
// return $output; |
|
|
//} |
|
|
|
|
|
|
|
| 262 |
/** HELPER FUNCTIONS */ |
/** HELPER FUNCTIONS */ |
| 263 |
|
|
| 264 |
/** |
/** |