From b66f50d2ce11d0cc8bb53af94ad86278d3fe8e51 Mon Sep 17 00:00:00 2001 From: glen201 Date: Fri, 31 Jul 2009 02:01:53 +0000 Subject: #486064: by RobertOak "no video fields in views" Fixed, added Views 2 support .MPEG/MPG defaulted to play with Windows Media --- video.module | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) (limited to 'video.module') diff --git a/video.module b/video.module index dd0dd8e..3dc7f0d 100644 --- a/video.module +++ b/video.module @@ -5,15 +5,37 @@ * * @author Heshan Wanigasooriya * + * @author Glen Marianko Twitter@demoforum * @todo */ -/** - * Let's include views logic if views module is enabled -*/ -if (module_exists('views')) { - module_load_include('inc', 'video', 'views_video'); + +/** GMM: Views 2 + * Implementation of hook_views_api() + */ +function video_views_api() { + return array( + 'api' => 2, + 'path' => drupal_get_path('module', 'video').'/includes', + ); } +/** + * Implementation of hook_views_handlers() + */ +function video_views_handlers() { + return array( + 'info' => array( + 'path' => drupal_get_path('module', 'video').'/includes', + ), + 'handlers' => array( + 'video_views_handler_field_playtime_seconds' => array('parent' => 'views_handler_field'), + 'video_views_handler_field_download' => array('parent' => 'views_handler_field'), + 'video_views_handler_field_play' => array('parent' => 'views_handler_field'), + 'video_views_handler_field_image' => array('parent' => 'views_handler_field'), + + ), + ); +} /******************************************************************** * General Hooks ********************************************************************/ -- cgit v1.2.3