'node', 'fields' => array( 'nid' => array( 'name' => t('FlashVideo: Video'), 'handler' => 'flashvideo_views_handler_video', 'option' => array( '#type' => 'select', '#options' => 'flashvideo_views_option_video', ), 'notafield' => true, 'sortable' => false, ), ), ); return($tables); } /** * 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()); } } /** * Views - Generate a list of options for the */ function flashvideo_views_option_video($op) { return array( t('Flash Video Player'), t('Thumbnail Image') ); return $a; } ?>