2); } /** * Implementation of hook_help(). */ function flashvideo_views_help($path = 'admin/help#flashvideo_views', $arg) { switch ($section) { case 'admin/help#flashvideo_views': $output = 'The FlashVideo Views module provides a new Field in the Views module that allows you to see the Video or Video Thumbnail.'; return $output; case 'admin/settings/modules#description': return t('Provides a plugin to allow Views functionality to the FlashVideo Module.'); } } /** * Views handler for displaying the video. */ function flashvideo_views_handler_video($fieldinfo, $fielddata, $value, $data) { $node = node_load($data->nid); switch ($fielddata['options']) { case 0: // Flash Video Player return flashvideo_get_video($node, array()); case 1: // Thumbnail Image default: return flashvideo_get_thumbnail($node, array()); } }