$view = new view; $view->name = 'best_comments'; $view->description = 'Best Comments'; $view->tag = ''; $view->view_php = ''; $view->base_table = 'comments'; $view->is_cacheable = FALSE; $view->api_version = 2; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ $handler = $view->new_display('default', 'Defaults', 'default'); $handler->override_option('relationships', array( 'flag_content_rel' => array( 'label' => 'best comments flag', 'required' => 1, 'flag' => 'best_comments', 'user_scope' => 'any', 'id' => 'flag_content_rel', 'table' => 'comments', 'field' => 'flag_content_rel', 'relationship' => 'none', ), )); $handler->override_option('fields', array( 'subject' => array( 'label' => '', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'html' => 0, ), 'link_to_comment' => 1, 'exclude' => 0, 'id' => 'subject', 'table' => 'comments', 'field' => 'subject', 'relationship' => 'none', ), 'name' => array( 'label' => '', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'html' => 0, ), 'link_to_user' => 1, 'exclude' => 0, 'id' => 'name', 'table' => 'comments', 'field' => 'name', 'relationship' => 'none', ), 'timestamp' => array( 'label' => 'Post date', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'html' => 0, ), 'date_format' => 'small', 'custom_date_format' => '', 'exclude' => 0, 'id' => 'timestamp', 'table' => 'comments', 'field' => 'timestamp', 'relationship' => 'none', ), )); $handler->override_option('sorts', array( 'timestamp' => array( 'order' => 'DESC', 'granularity' => 'second', 'id' => 'timestamp', 'table' => 'comments', 'field' => 'timestamp', 'relationship' => 'none', ), )); $handler->override_option('filters', array( 'status' => array( 'operator' => '=', 'value' => '0', 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'status', 'table' => 'comments', 'field' => 'status', 'relationship' => 'none', ), )); $handler->override_option('access', array( 'type' => 'none', )); $handler->override_option('title', 'Best Comments'); $handler->override_option('empty', 'No comments have been flagged as a "Best comment" yet.'); $handler->override_option('empty_format', '1'); $handler->override_option('row_options', array( 'inline' => array( 'name' => 'name', 'timestamp' => 'timestamp', ), 'separator' => ' | ', )); $handler = $view->new_display('block', 'Best Comments block', 'block_1'); $handler->override_option('block_description', ''); $handler->override_option('block_caching', -1);