Created
July 13, 2013 14:27
-
-
Save timonweb/5990901 to your computer and use it in GitHub Desktop.
View to manage comments in bulk
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 = 'comments_admin'; | |
$view->description = ''; | |
$view->tag = ''; | |
$view->base_table = 'comment'; | |
$view->human_name = 'Comments Admin'; | |
$view->core = 7; | |
$view->api_version = '3.0'; | |
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ | |
/* Display: Defaults */ | |
$handler = $view->new_display('default', 'Defaults', 'default'); | |
$handler->display->display_options['use_more_always'] = FALSE; | |
$handler->display->display_options['access']['type'] = 'none'; | |
$handler->display->display_options['cache']['type'] = 'none'; | |
$handler->display->display_options['query']['type'] = 'views_query'; | |
$handler->display->display_options['exposed_form']['type'] = 'basic'; | |
$handler->display->display_options['pager']['type'] = 'full'; | |
$handler->display->display_options['pager']['options']['items_per_page'] = '200'; | |
$handler->display->display_options['pager']['options']['offset'] = '0'; | |
$handler->display->display_options['pager']['options']['id'] = '0'; | |
$handler->display->display_options['style_plugin'] = 'table'; | |
$handler->display->display_options['style_options']['grouping'] = ''; | |
$handler->display->display_options['style_options']['columns'] = array( | |
'name' => 'name', | |
'edit_comment' => 'edit_comment', | |
'created' => 'created', | |
'entity_id' => 'entity_id', | |
); | |
$handler->display->display_options['style_options']['default'] = 'created'; | |
$handler->display->display_options['style_options']['info'] = array( | |
'name' => array( | |
'sortable' => 0, | |
'default_sort_order' => 'asc', | |
'align' => '', | |
'separator' => '', | |
), | |
'edit_comment' => array( | |
'align' => '', | |
'separator' => '', | |
), | |
'created' => array( | |
'sortable' => 1, | |
'default_sort_order' => 'desc', | |
'align' => '', | |
'separator' => '', | |
), | |
'entity_id' => array( | |
'sortable' => 0, | |
'default_sort_order' => 'asc', | |
'align' => '', | |
'separator' => '', | |
), | |
); | |
$handler->display->display_options['style_options']['order'] = 'desc'; | |
/* 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']['label'] = 'Bulk operations'; | |
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['display_type'] = '0'; | |
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['enable_select_all_pages'] = 1; | |
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['force_single'] = 0; | |
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['entity_load_capacity'] = '10'; | |
$handler->display->display_options['fields']['views_bulk_operations']['vbo_operations'] = array( | |
'action::views_bulk_operations_delete_item' => array( | |
'selected' => 1, | |
'skip_confirmation' => 0, | |
'override_label' => 0, | |
'label' => '', | |
'postpone_processing' => 0, | |
), | |
'action::views_bulk_operations_script_action' => array( | |
'selected' => 0, | |
'skip_confirmation' => 0, | |
'override_label' => 0, | |
'label' => '', | |
'postpone_processing' => 0, | |
), | |
'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, | |
'skip_confirmation' => 0, | |
'override_label' => 0, | |
'label' => '', | |
'postpone_processing' => 0, | |
), | |
'action::comment_save_action' => array( | |
'selected' => 0, | |
'skip_confirmation' => 0, | |
'override_label' => 0, | |
'label' => '', | |
'postpone_processing' => 0, | |
), | |
'action::system_send_email_action' => array( | |
'selected' => 0, | |
'skip_confirmation' => 0, | |
'override_label' => 0, | |
'label' => '', | |
'postpone_processing' => 0, | |
), | |
'action::comment_unpublish_action' => array( | |
'selected' => 1, | |
'skip_confirmation' => 0, | |
'override_label' => 0, | |
'label' => '', | |
'postpone_processing' => 0, | |
), | |
'action::comment_unpublish_by_keyword_action' => array( | |
'selected' => 0, | |
'skip_confirmation' => 0, | |
'override_label' => 0, | |
'label' => '', | |
'postpone_processing' => 0, | |
), | |
); | |
/* Field: Comment: Comment */ | |
$handler->display->display_options['fields']['entity_id']['id'] = 'entity_id'; | |
$handler->display->display_options['fields']['entity_id']['table'] = 'field_data_comment_body'; | |
$handler->display->display_options['fields']['entity_id']['field'] = 'comment_body'; | |
$handler->display->display_options['fields']['entity_id']['label'] = 'comment_body'; | |
$handler->display->display_options['fields']['entity_id']['type'] = 'text_trimmed'; | |
/* 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']['element_default_classes'] = FALSE; | |
$handler->display->display_options['fields']['name']['link_to_user'] = FALSE; | |
/* Field: Comment: Post date */ | |
$handler->display->display_options['fields']['created']['id'] = 'created'; | |
$handler->display->display_options['fields']['created']['table'] = 'comment'; | |
$handler->display->display_options['fields']['created']['field'] = 'created'; | |
/* Field: Comment: Approve link */ | |
$handler->display->display_options['fields']['approve_comment']['id'] = 'approve_comment'; | |
$handler->display->display_options['fields']['approve_comment']['table'] = 'comment'; | |
$handler->display->display_options['fields']['approve_comment']['field'] = 'approve_comment'; | |
/* Field: Comment: Edit link */ | |
$handler->display->display_options['fields']['edit_comment_1']['id'] = 'edit_comment_1'; | |
$handler->display->display_options['fields']['edit_comment_1']['table'] = 'comment'; | |
$handler->display->display_options['fields']['edit_comment_1']['field'] = 'edit_comment'; | |
/* Field: Comment: Delete link */ | |
$handler->display->display_options['fields']['delete_comment']['id'] = 'delete_comment'; | |
$handler->display->display_options['fields']['delete_comment']['table'] = 'comment'; | |
$handler->display->display_options['fields']['delete_comment']['field'] = 'delete_comment'; | |
/* Filter criterion: Comment: Approved */ | |
$handler->display->display_options['filters']['status']['id'] = 'status'; | |
$handler->display->display_options['filters']['status']['table'] = 'comment'; | |
$handler->display->display_options['filters']['status']['field'] = 'status'; | |
$handler->display->display_options['filters']['status']['value'] = '0'; | |
$handler->display->display_options['filters']['status']['group'] = '0'; | |
/* Display: Page */ | |
$handler = $view->new_display('page', 'Page', 'page_1'); | |
$handler->display->display_options['defaults']['hide_admin_links'] = FALSE; | |
$handler->display->display_options['path'] = 'admin/content/comment/moderate'; | |
$handler->display->display_options['menu']['type'] = 'tab'; | |
$handler->display->display_options['menu']['title'] = 'Manage in bulk'; | |
$handler->display->display_options['menu']['weight'] = '3'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment