$view = new view; $view->name = 'comment'; $view->description = 'Comments'; $view->tag = 'admin'; $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( 'nid' => array( 'label' => 'Node', 'required' => 0, 'id' => 'nid', 'table' => 'comments', 'field' => 'nid', 'relationship' => 'none', ), )); $handler->override_option('fields', array( 'comment' => array( 'id' => 'comment', 'table' => 'comments', 'field' => 'comment', ), 'nid' => array( 'label' => 'Nid', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'link_to_node' => 0, 'exclude' => 0, 'id' => 'nid', 'table' => 'node', 'field' => 'nid', 'relationship' => 'nid', ), 'title' => array( 'label' => 'Title', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'link_to_node' => 0, 'exclude' => 0, 'id' => 'title', 'table' => 'node', 'field' => 'title', 'relationship' => 'nid', ), 'sitename' => array( 'label' => 'Site name', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'link_to_default_domain' => 0, 'link_to_original_domain' => 0, 'list_all_domains' => 0, 'exclude' => 0, 'id' => 'sitename', 'table' => 'domain', 'field' => 'sitename', 'relationship' => 'nid', ), )); $handler->override_option('filters', array( 'gid' => array( 'operator' => 'in', 'value' => array( '2' => '2', ), 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'gid', 'table' => 'domain_access', 'field' => 'gid', 'relationship' => 'nid', ), )); $handler->override_option('access', array( 'type' => 'none', )); $handler->override_option('cache', array( 'type' => 'none', )); $handler->override_option('distinct', 1); $handler->override_option('style_plugin', 'table'); $handler = $view->new_display('page', 'Page', 'page_1'); $handler->override_option('path', 'test-comment'); $handler->override_option('menu', array( 'type' => 'none', 'title' => '', 'description' => '', 'weight' => 0, 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'description' => '', 'weight' => 0, ));