diff options
author | glen201 <glen201@527446.no-reply.drupal.org> | 2009-07-31 02:01:53 +0000 |
---|---|---|
committer | glen201 <glen201@527446.no-reply.drupal.org> | 2009-07-31 02:01:53 +0000 |
commit | b66f50d2ce11d0cc8bb53af94ad86278d3fe8e51 (patch) | |
tree | 0a9b459d44a0d2729c479d5393e87cd94cb785f2 /video.module | |
parent | 2524eecbeef2c8b3c0d80a5ffcde2604da50e30c (diff) | |
download | video-b66f50d2ce11d0cc8bb53af94ad86278d3fe8e51.tar.gz video-b66f50d2ce11d0cc8bb53af94ad86278d3fe8e51.tar.bz2 |
#486064: by RobertOak "no video fields in views" Fixed, added Views 2 support
.MPEG/MPG defaulted to play with Windows Media
Diffstat (limited to 'video.module')
-rw-r--r-- | video.module | 32 |
1 files changed, 27 insertions, 5 deletions
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 <heshan at heidisoft dot com> * <heshanmw at gmail dot com> + * @author Glen Marianko Twitter@demoforum <glenm at demoforum dot com> * @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 ********************************************************************/ |