function _video_youtube_get_id in Video 5
Same name and namespace in other branches
- 6 types/video_youtube/video_youtube.module \_video_youtube_get_id()
- 6.2 types/video_youtube/video_youtube.module \_video_youtube_get_id()
Get the id from an URL
4 calls to _video_youtube_get_id()
- theme_video_youtube_play in types/
video_youtube/ video_youtube.module - Play videos hosted on youtube.com Allows users to host videos on youtube.com and then use the video ID to post it in the module. In the future it could also use the youtube developer API to get info and comments of the video.
- video_youtube_v_auto_playtime in types/
video_youtube/ video_youtube.module - Implementation of hook_v_auto_playtime
- video_youtube_v_auto_thumbnail in types/
video_youtube/ video_youtube.module - Implementation of hook_v_auto_thumbnail
- video_youtube_v_validate in types/
video_youtube/ video_youtube.module - implementation of hook_v_validate
File
- types/
video_youtube/ video_youtube.module, line 313 - Enable Youtube support for video module.
Code
function _video_youtube_get_id($url) {
$parsed_url = parse_url($url);
parse_str($parsed_url['query'], $parsed_query);
return $parsed_query['v'];
}