$view = new view; $view->name = 'admin_comments'; $view->description = 'Advanced comment search, to replace default comment admin page'; $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( 'nid' => array( 'label' => 'Node', 'required' => 0, 'id' => 'nid', 'table' => 'comments', 'field' => 'nid', 'relationship' => 'none', ), )); $handler->override_option('fields', array( 'subject' => array( 'label' => 'Comment', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'html' => 0, 'strip_tags' => 0, ), 'empty' => '', 'hide_empty' => 0, 'empty_zero' => 0, 'link_to_comment' => 1, 'exclude' => 0, 'id' => 'subject', 'table' => 'comments', 'field' => 'subject', 'relationship' => 'none', ), 'comment' => array( 'label' => 'Body', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 1, 'max_length' => '300', 'word_boundary' => 1, 'ellipsis' => 1, 'html' => 1, 'strip_tags' => 0, ), 'empty' => '', 'hide_empty' => 0, 'empty_zero' => 0, 'exclude' => 0, 'id' => 'comment', 'table' => 'comments', 'field' => 'comment', 'relationship' => 'none', ), 'view_comment' => array( 'id' => 'view_comment', 'table' => 'comments', 'field' => 'view_comment', ), 'edit_comment' => array( 'label' => 'Edit link', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'html' => 0, 'strip_tags' => 0, ), 'empty' => '', 'hide_empty' => 0, 'empty_zero' => 0, 'text' => 'edit', 'exclude' => 0, 'id' => 'edit_comment', 'table' => 'comments', 'field' => 'edit_comment', 'relationship' => 'none', ), 'name' => array( 'label' => 'Author', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'html' => 0, 'strip_tags' => 0, ), 'empty' => '', 'hide_empty' => 0, 'empty_zero' => 0, 'link_to_user' => 1, 'exclude' => 0, 'id' => 'name', 'table' => 'comments', 'field' => 'name', 'relationship' => 'none', ), 'title' => array( 'label' => 'Topic', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'html' => 0, 'strip_tags' => 0, ), 'empty' => '', 'hide_empty' => 0, 'empty_zero' => 0, 'link_to_node' => 1, 'exclude' => 0, 'id' => 'title', 'table' => 'node', 'field' => 'title', 'relationship' => 'nid', ), 'timestamp' => array( 'id' => 'timestamp', 'table' => 'comments', 'field' => 'timestamp', ), 'status_1' => array( 'label' => 'Published', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'html' => 0, 'strip_tags' => 0, ), 'empty' => '', 'hide_empty' => 0, 'empty_zero' => 0, 'type' => 'yes-no', 'not' => 1, 'exclude' => 0, 'id' => 'status_1', 'table' => 'comments', 'field' => 'status', 'relationship' => 'none', ), )); $handler->override_option('sorts', array( 'timestamp' => array( 'order' => 'DESC', 'granularity' => 'minute', 'id' => 'timestamp', 'table' => 'comments', 'field' => 'timestamp', 'relationship' => 'none', ), )); $handler->override_option('filters', array( 'name' => array( 'operator' => 'contains', 'value' => '', 'group' => '0', 'exposed' => TRUE, 'expose' => array( 'use_operator' => 1, 'operator' => 'name_op', 'identifier' => 'name', 'label' => 'Comment: Author', 'optional' => 1, 'remember' => 0, ), 'case' => 1, 'id' => 'name', 'table' => 'comments', 'field' => 'name', 'relationship' => 'none', 'override' => array( 'button' => 'Override', ), ), 'comment' => array( 'operator' => 'contains', 'value' => '', 'group' => '0', 'exposed' => TRUE, 'expose' => array( 'use_operator' => 1, 'operator' => 'comment_op', 'identifier' => 'comment', 'label' => 'Comment body', 'optional' => 1, 'remember' => 0, ), 'case' => 1, 'id' => 'comment', 'table' => 'comments', 'field' => 'comment', 'relationship' => 'none', ), 'timestamp' => array( 'operator' => '=', 'value' => array( 'type' => 'date', 'value' => '', 'min' => '', 'max' => '', ), 'group' => '0', 'exposed' => TRUE, 'expose' => array( 'use_operator' => 1, 'operator' => 'timestamp_op', 'identifier' => 'timestamp', 'label' => 'Post date (YYYY-MM-DD)', 'optional' => 1, 'remember' => 0, ), 'id' => 'timestamp', 'table' => 'comments', 'field' => 'timestamp', 'relationship' => 'none', ), )); $handler->override_option('access', array( 'type' => 'role', 'role' => array( '1000006' => 1000006, '1000059' => 1000059, '1000046' => 1000046, ), )); $handler->override_option('cache', array( 'type' => 'none', )); $handler->override_option('title', 'Advanced search: Comments'); $handler->override_option('items_per_page', 20); $handler->override_option('style_plugin', 'bulk'); $handler->override_option('style_options', array( 'grouping' => '', 'override' => 1, 'sticky' => 0, 'order' => 'asc', 'columns' => array( 'subject' => 'subject', 'comment' => 'subject', 'view_comment' => 'subject', 'edit_comment' => 'subject', 'name' => 'name', 'title' => 'title', 'timestamp' => 'timestamp', 'status_1' => 'status_1', ), 'info' => array( 'subject' => array( 'sortable' => 1, 'separator' => '', ), 'comment' => array( 'separator' => '', ), 'view_comment' => array( 'separator' => '', ), 'edit_comment' => array( 'separator' => '', ), 'name' => array( 'sortable' => 1, 'separator' => '', ), 'title' => array( 'sortable' => 1, 'separator' => '', ), 'timestamp' => array( 'sortable' => 1, 'separator' => '', ), 'status_1' => array( 'sortable' => 1, 'separator' => '', ), ), 'default' => '-1', 'execution_type' => '1', 'display_type' => '0', 'hide_select_all' => 0, 'skip_confirmation' => 0, 'display_result' => 1, 'merge_single_action' => 1, 'selected_operations' => array( 'comment_unpublish_action' => 'comment_unpublish_action', 'views_bulk_operations_delete_comment_action' => 0, 'system_message_action' => 0, 'views_bulk_operations_action' => 0, 'views_bulk_operations_script_action' => 0, 'views_bulk_operations_argument_selector_action' => 0, 'system_goto_action' => 0, 'system_send_email_action' => 0, 'comment_unpublish_by_keyword_action' => 0, ), )); $handler = $view->new_display('page', 'Default admin page', 'page_1'); $handler->override_option('path', 'admin/content/comment'); $handler->override_option('menu', array( 'type' => 'normal', 'title' => 'Comments', 'description' => '', 'weight' => '0', 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'description' => '', 'weight' => 0, 'name' => 'navigation', )); $handler = $view->new_display('page', 'Advanced search page w. tabs', 'page_2'); $handler->override_option('path', 'content-advanced/comments'); $handler->override_option('menu', array( 'type' => 'tab', 'title' => 'Comments', 'description' => '', 'weight' => '3', 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'description' => '', 'weight' => 0, 'name' => 'navigation', ));