'qik', 'name' => $name, 'url' => VIDEO_CCK_QIK_MAIN_URL, 'settings_description' => t('These settings specifically affect videos displayed from !qik.', array('!qik' => l($name, VIDEO_CCK_QIK_MAIN_URL, array('target' => '_blank')))), 'supported_features' => $features, ); } function video_cck_qik_settings() { $form = array(); return $form; } function video_cck_qik_extract($embed) { return array( // http://qik.com/video/111108 // '@qik\.com/video/([^/&"]*)@i', ); } function video_cck_qik_embedded_link($video_code) { return 'http://www.qik.com/video/' . $video_code; } function theme_video_cck_qik_flash($embed, $width, $height, $autoplay) { if ($embed) { // gives us XML with proper embed code: http://qik.com/api/oembed.xml?url=http%3A//qik.com/video/106489 // http://www.oembed.com/ // TODO: find a way to store this so we don't make an XML request each time $result = emfield_request_xml('flickr', 'http://qik.com/api/oembed.xml', array('url' => 'http%3A//qik.com/video/'. $embed)); $output = $result['HASH']['HTML']['0']; } return $output; } function video_cck_qik_video($embed, $width, $height, $field, $item, $autoplay) { $output = theme('video_cck_qik_flash', $embed, $width, $height, $autoplay); return $output; } function video_cck_qik_preview($embed, $width, $height, $field, $item, $autoplay) { $output = theme('video_cck_qik_flash', $embed, $width, $height, $autoplay); return $output; }