Created
August 27, 2012 14:59
-
-
Save stevesmename/3489274 to your computer and use it in GitHub Desktop.
Comment Dashboard that shows comments by keyword search. Works for any Drupal 7 environment.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$view = new view; | |
$view->name = 'manage_comments_keyword_search'; | |
$view->description = 'Comment Dashboard that shows comments by keyword search.'; | |
$view->tag = 'default'; | |
$view->base_table = 'comment'; | |
$view->human_name = 'Comments: Keyword Search'; | |
$view->core = 7; | |
$view->api_version = '3.0'; | |
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ | |
/* Display: Master */ | |
$handler = $view->new_display('default', 'Master', 'default'); | |
$handler->display->display_options['title'] = 'Keyword Search'; | |
$handler->display->display_options['access']['type'] = 'perm'; | |
$handler->display->display_options['access']['perm'] = 'administer comments'; | |
$handler->display->display_options['cache']['type'] = 'none'; | |
$handler->display->display_options['query']['type'] = 'views_query'; | |
$handler->display->display_options['query']['options']['query_comment'] = FALSE; | |
$handler->display->display_options['exposed_form']['type'] = 'basic'; | |
$handler->display->display_options['pager']['type'] = 'full'; | |
$handler->display->display_options['pager']['options']['items_per_page'] = '100'; | |
$handler->display->display_options['style_plugin'] = 'table'; | |
/* Relationship: Comment: Content */ | |
$handler->display->display_options['relationships']['nid']['id'] = 'nid'; | |
$handler->display->display_options['relationships']['nid']['table'] = 'comment'; | |
$handler->display->display_options['relationships']['nid']['field'] = 'nid'; | |
$handler->display->display_options['relationships']['nid']['required'] = 1; | |
/* Field: Bulk operations: Comment */ | |
$handler->display->display_options['fields']['views_bulk_operations']['id'] = 'views_bulk_operations'; | |
$handler->display->display_options['fields']['views_bulk_operations']['table'] = 'comment'; | |
$handler->display->display_options['fields']['views_bulk_operations']['field'] = 'views_bulk_operations'; | |
$handler->display->display_options['fields']['views_bulk_operations']['alter']['alter_text'] = 0; | |
$handler->display->display_options['fields']['views_bulk_operations']['alter']['make_link'] = 0; | |
$handler->display->display_options['fields']['views_bulk_operations']['alter']['absolute'] = 0; | |
$handler->display->display_options['fields']['views_bulk_operations']['alter']['external'] = 0; | |
$handler->display->display_options['fields']['views_bulk_operations']['alter']['replace_spaces'] = 0; | |
$handler->display->display_options['fields']['views_bulk_operations']['alter']['trim_whitespace'] = 0; | |
$handler->display->display_options['fields']['views_bulk_operations']['alter']['nl2br'] = 0; | |
$handler->display->display_options['fields']['views_bulk_operations']['alter']['word_boundary'] = 1; | |
$handler->display->display_options['fields']['views_bulk_operations']['alter']['ellipsis'] = 1; | |
$handler->display->display_options['fields']['views_bulk_operations']['alter']['more_link'] = 0; | |
$handler->display->display_options['fields']['views_bulk_operations']['alter']['strip_tags'] = 0; | |
$handler->display->display_options['fields']['views_bulk_operations']['alter']['trim'] = 0; | |
$handler->display->display_options['fields']['views_bulk_operations']['alter']['html'] = 0; | |
$handler->display->display_options['fields']['views_bulk_operations']['element_label_colon'] = 1; | |
$handler->display->display_options['fields']['views_bulk_operations']['element_default_classes'] = 1; | |
$handler->display->display_options['fields']['views_bulk_operations']['hide_empty'] = 0; | |
$handler->display->display_options['fields']['views_bulk_operations']['empty_zero'] = 0; | |
$handler->display->display_options['fields']['views_bulk_operations']['hide_alter_empty'] = 1; | |
$handler->display->display_options['fields']['views_bulk_operations']['vbo']['entity_load_capacity'] = '10'; | |
$handler->display->display_options['fields']['views_bulk_operations']['vbo']['operations'] = array( | |
'action::views_bulk_operations_delete_item' => array( | |
'selected' => 1, | |
'use_queue' => 0, | |
'skip_confirmation' => 0, | |
'override_label' => 0, | |
'label' => '', | |
), | |
'action::system_message_action' => array( | |
'selected' => 0, | |
'use_queue' => 0, | |
'skip_confirmation' => 0, | |
'override_label' => 0, | |
'label' => '', | |
), | |
'action::views_bulk_operations_script_action' => array( | |
'selected' => 0, | |
'use_queue' => 0, | |
'skip_confirmation' => 0, | |
'override_label' => 0, | |
'label' => '', | |
), | |
'action::views_bulk_operations_modify_action' => array( | |
'selected' => 0, | |
'use_queue' => 0, | |
'skip_confirmation' => 0, | |
'override_label' => 0, | |
'label' => '', | |
'settings' => array( | |
'show_all_tokens' => 1, | |
'display_values' => array( | |
'_all_' => '_all_', | |
), | |
), | |
), | |
'action::views_bulk_operations_argument_selector_action' => array( | |
'selected' => 0, | |
'skip_confirmation' => 0, | |
'override_label' => 0, | |
'label' => '', | |
'settings' => array( | |
'url' => '', | |
), | |
), | |
'action::comment_publish_action' => array( | |
'selected' => 1, | |
'use_queue' => 0, | |
'skip_confirmation' => 0, | |
'override_label' => 0, | |
'label' => '', | |
), | |
'action::system_goto_action' => array( | |
'selected' => 0, | |
'use_queue' => 0, | |
'skip_confirmation' => 0, | |
'override_label' => 0, | |
'label' => '', | |
), | |
'action::comment_save_action' => array( | |
'selected' => 0, | |
'use_queue' => 0, | |
'skip_confirmation' => 0, | |
'override_label' => 0, | |
'label' => '', | |
), | |
'action::system_send_email_action' => array( | |
'selected' => 0, | |
'use_queue' => 0, | |
'skip_confirmation' => 0, | |
'override_label' => 0, | |
'label' => '', | |
), | |
'action::comment_unpublish_action' => array( | |
'selected' => 1, | |
'use_queue' => 0, | |
'skip_confirmation' => 0, | |
'override_label' => 0, | |
'label' => '', | |
), | |
'action::comment_unpublish_by_keyword_action' => array( | |
'selected' => 0, | |
'use_queue' => 0, | |
'skip_confirmation' => 0, | |
'override_label' => 0, | |
'label' => '', | |
), | |
); | |
$handler->display->display_options['fields']['views_bulk_operations']['vbo']['enable_select_all_pages'] = 1; | |
$handler->display->display_options['fields']['views_bulk_operations']['vbo']['display_type'] = '0'; | |
$handler->display->display_options['fields']['views_bulk_operations']['vbo']['display_result'] = 1; | |
$handler->display->display_options['fields']['views_bulk_operations']['vbo']['merge_single_action'] = 0; | |
$handler->display->display_options['fields']['views_bulk_operations']['vbo']['force_single'] = 0; | |
/* Field: Comment: Approved */ | |
$handler->display->display_options['fields']['status']['id'] = 'status'; | |
$handler->display->display_options['fields']['status']['table'] = 'comment'; | |
$handler->display->display_options['fields']['status']['field'] = 'status'; | |
$handler->display->display_options['fields']['status']['alter']['alter_text'] = 0; | |
$handler->display->display_options['fields']['status']['alter']['make_link'] = 0; | |
$handler->display->display_options['fields']['status']['alter']['absolute'] = 0; | |
$handler->display->display_options['fields']['status']['alter']['external'] = 0; | |
$handler->display->display_options['fields']['status']['alter']['replace_spaces'] = 0; | |
$handler->display->display_options['fields']['status']['alter']['trim_whitespace'] = 0; | |
$handler->display->display_options['fields']['status']['alter']['nl2br'] = 0; | |
$handler->display->display_options['fields']['status']['alter']['word_boundary'] = 1; | |
$handler->display->display_options['fields']['status']['alter']['ellipsis'] = 1; | |
$handler->display->display_options['fields']['status']['alter']['more_link'] = 0; | |
$handler->display->display_options['fields']['status']['alter']['strip_tags'] = 0; | |
$handler->display->display_options['fields']['status']['alter']['trim'] = 0; | |
$handler->display->display_options['fields']['status']['alter']['html'] = 0; | |
$handler->display->display_options['fields']['status']['element_label_colon'] = 1; | |
$handler->display->display_options['fields']['status']['element_default_classes'] = 1; | |
$handler->display->display_options['fields']['status']['hide_empty'] = 0; | |
$handler->display->display_options['fields']['status']['empty_zero'] = 0; | |
$handler->display->display_options['fields']['status']['hide_alter_empty'] = 1; | |
$handler->display->display_options['fields']['status']['not'] = 0; | |
/* Field: Comment: Author */ | |
$handler->display->display_options['fields']['name']['id'] = 'name'; | |
$handler->display->display_options['fields']['name']['table'] = 'comment'; | |
$handler->display->display_options['fields']['name']['field'] = 'name'; | |
$handler->display->display_options['fields']['name']['alter']['alter_text'] = 0; | |
$handler->display->display_options['fields']['name']['alter']['make_link'] = 0; | |
$handler->display->display_options['fields']['name']['alter']['absolute'] = 0; | |
$handler->display->display_options['fields']['name']['alter']['external'] = 0; | |
$handler->display->display_options['fields']['name']['alter']['replace_spaces'] = 0; | |
$handler->display->display_options['fields']['name']['alter']['trim_whitespace'] = 0; | |
$handler->display->display_options['fields']['name']['alter']['nl2br'] = 0; | |
$handler->display->display_options['fields']['name']['alter']['word_boundary'] = 1; | |
$handler->display->display_options['fields']['name']['alter']['ellipsis'] = 1; | |
$handler->display->display_options['fields']['name']['alter']['more_link'] = 0; | |
$handler->display->display_options['fields']['name']['alter']['strip_tags'] = 0; | |
$handler->display->display_options['fields']['name']['alter']['trim'] = 0; | |
$handler->display->display_options['fields']['name']['alter']['html'] = 0; | |
$handler->display->display_options['fields']['name']['element_label_colon'] = 1; | |
$handler->display->display_options['fields']['name']['element_default_classes'] = 1; | |
$handler->display->display_options['fields']['name']['hide_empty'] = 0; | |
$handler->display->display_options['fields']['name']['empty_zero'] = 0; | |
$handler->display->display_options['fields']['name']['hide_alter_empty'] = 1; | |
$handler->display->display_options['fields']['name']['link_to_user'] = 1; | |
/* Field: Comment: Comment */ | |
$handler->display->display_options['fields']['comment_body']['id'] = 'comment_body'; | |
$handler->display->display_options['fields']['comment_body']['table'] = 'field_data_comment_body'; | |
$handler->display->display_options['fields']['comment_body']['field'] = 'comment_body'; | |
$handler->display->display_options['fields']['comment_body']['alter']['alter_text'] = 0; | |
$handler->display->display_options['fields']['comment_body']['alter']['make_link'] = 0; | |
$handler->display->display_options['fields']['comment_body']['alter']['absolute'] = 0; | |
$handler->display->display_options['fields']['comment_body']['alter']['external'] = 0; | |
$handler->display->display_options['fields']['comment_body']['alter']['replace_spaces'] = 0; | |
$handler->display->display_options['fields']['comment_body']['alter']['trim_whitespace'] = 0; | |
$handler->display->display_options['fields']['comment_body']['alter']['nl2br'] = 0; | |
$handler->display->display_options['fields']['comment_body']['alter']['max_length'] = '140'; | |
$handler->display->display_options['fields']['comment_body']['alter']['word_boundary'] = 1; | |
$handler->display->display_options['fields']['comment_body']['alter']['ellipsis'] = 1; | |
$handler->display->display_options['fields']['comment_body']['alter']['more_link'] = 1; | |
$handler->display->display_options['fields']['comment_body']['alter']['strip_tags'] = 0; | |
$handler->display->display_options['fields']['comment_body']['alter']['trim'] = 1; | |
$handler->display->display_options['fields']['comment_body']['alter']['html'] = 0; | |
$handler->display->display_options['fields']['comment_body']['element_label_colon'] = 1; | |
$handler->display->display_options['fields']['comment_body']['element_default_classes'] = 1; | |
$handler->display->display_options['fields']['comment_body']['hide_empty'] = 0; | |
$handler->display->display_options['fields']['comment_body']['empty_zero'] = 0; | |
$handler->display->display_options['fields']['comment_body']['hide_alter_empty'] = 1; | |
$handler->display->display_options['fields']['comment_body']['field_api_classes'] = 0; | |
/* Field: Comment: Updated date */ | |
$handler->display->display_options['fields']['changed']['id'] = 'changed'; | |
$handler->display->display_options['fields']['changed']['table'] = 'comment'; | |
$handler->display->display_options['fields']['changed']['field'] = 'changed'; | |
$handler->display->display_options['fields']['changed']['alter']['alter_text'] = 0; | |
$handler->display->display_options['fields']['changed']['alter']['make_link'] = 0; | |
$handler->display->display_options['fields']['changed']['alter']['absolute'] = 0; | |
$handler->display->display_options['fields']['changed']['alter']['external'] = 0; | |
$handler->display->display_options['fields']['changed']['alter']['replace_spaces'] = 0; | |
$handler->display->display_options['fields']['changed']['alter']['trim_whitespace'] = 0; | |
$handler->display->display_options['fields']['changed']['alter']['nl2br'] = 0; | |
$handler->display->display_options['fields']['changed']['alter']['word_boundary'] = 1; | |
$handler->display->display_options['fields']['changed']['alter']['ellipsis'] = 1; | |
$handler->display->display_options['fields']['changed']['alter']['more_link'] = 0; | |
$handler->display->display_options['fields']['changed']['alter']['strip_tags'] = 0; | |
$handler->display->display_options['fields']['changed']['alter']['trim'] = 0; | |
$handler->display->display_options['fields']['changed']['alter']['html'] = 0; | |
$handler->display->display_options['fields']['changed']['element_label_colon'] = 1; | |
$handler->display->display_options['fields']['changed']['element_default_classes'] = 1; | |
$handler->display->display_options['fields']['changed']['hide_empty'] = 0; | |
$handler->display->display_options['fields']['changed']['empty_zero'] = 0; | |
$handler->display->display_options['fields']['changed']['hide_alter_empty'] = 1; | |
$handler->display->display_options['fields']['changed']['date_format'] = 'short'; | |
/* Field: Content: Title */ | |
$handler->display->display_options['fields']['title']['id'] = 'title'; | |
$handler->display->display_options['fields']['title']['table'] = 'node'; | |
$handler->display->display_options['fields']['title']['field'] = 'title'; | |
$handler->display->display_options['fields']['title']['relationship'] = 'nid'; | |
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0; | |
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0; | |
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0; | |
$handler->display->display_options['fields']['title']['alter']['external'] = 0; | |
$handler->display->display_options['fields']['title']['alter']['replace_spaces'] = 0; | |
$handler->display->display_options['fields']['title']['alter']['trim_whitespace'] = 0; | |
$handler->display->display_options['fields']['title']['alter']['nl2br'] = 0; | |
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 1; | |
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 1; | |
$handler->display->display_options['fields']['title']['alter']['more_link'] = 0; | |
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0; | |
$handler->display->display_options['fields']['title']['alter']['trim'] = 0; | |
$handler->display->display_options['fields']['title']['alter']['html'] = 0; | |
$handler->display->display_options['fields']['title']['element_label_colon'] = 1; | |
$handler->display->display_options['fields']['title']['element_default_classes'] = 1; | |
$handler->display->display_options['fields']['title']['hide_empty'] = 0; | |
$handler->display->display_options['fields']['title']['empty_zero'] = 0; | |
$handler->display->display_options['fields']['title']['hide_alter_empty'] = 1; | |
$handler->display->display_options['fields']['title']['link_to_node'] = 1; | |
/* Sort criterion: Comment: Post date */ | |
$handler->display->display_options['sorts']['created']['id'] = 'created'; | |
$handler->display->display_options['sorts']['created']['table'] = 'comment'; | |
$handler->display->display_options['sorts']['created']['field'] = 'created'; | |
$handler->display->display_options['sorts']['created']['order'] = 'DESC'; | |
/* Filter criterion: Comment: Comment (comment_body) */ | |
$handler->display->display_options['filters']['comment_body_value']['id'] = 'comment_body_value'; | |
$handler->display->display_options['filters']['comment_body_value']['table'] = 'field_data_comment_body'; | |
$handler->display->display_options['filters']['comment_body_value']['field'] = 'comment_body_value'; | |
$handler->display->display_options['filters']['comment_body_value']['operator'] = 'contains'; | |
$handler->display->display_options['filters']['comment_body_value']['exposed'] = TRUE; | |
$handler->display->display_options['filters']['comment_body_value']['expose']['operator_id'] = 'key'; | |
$handler->display->display_options['filters']['comment_body_value']['expose']['label'] = 'Search'; | |
$handler->display->display_options['filters']['comment_body_value']['expose']['use_operator'] = 1; | |
$handler->display->display_options['filters']['comment_body_value']['expose']['operator'] = 'comment_body_value_op'; | |
$handler->display->display_options['filters']['comment_body_value']['expose']['identifier'] = 'keyword'; | |
$handler->display->display_options['filters']['comment_body_value']['expose']['required'] = 0; | |
$handler->display->display_options['filters']['comment_body_value']['expose']['multiple'] = FALSE; | |
/* Display: Page */ | |
$handler = $view->new_display('page', 'Page', 'page'); | |
$handler->display->display_options['path'] = 'admin/content/comment/keyword-search'; | |
$handler->display->display_options['menu']['type'] = 'tab'; | |
$handler->display->display_options['menu']['title'] = 'Keyword Search'; | |
$handler->display->display_options['menu']['weight'] = '0'; | |
$handler->display->display_options['menu']['name'] = 'management'; | |
$handler->display->display_options['menu']['context'] = 0; | |
$handler->display->display_options['tab_options']['weight'] = '0'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment