123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283 |
- <?php
- /**
- * @file
- * Bulk export of views_default objects generated by Bulk export module.
- */
- /**
- * Implementation of hook_views_default_views()
- */
- function comment_views_default_views() {
- $views = array();
- $view = new view;
- $view->name = 'comments_recent';
- $view->description = 'Contains a block and a page to list recent comments; the block will automatically link to the page, which displays the comment body as well as a link to the node.';
- $view->tag = 'default';
- $view->base_table = 'comment';
- $view->human_name = 'Recent comments';
- $view->core = 0;
- $view->api_version = '3.0';
- $view->disabled = TRUE; /* 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'] = 'Recent comments';
- $handler->display->display_options['use_more'] = TRUE;
- $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['query']['options']['query_comment'] = FALSE;
- $handler->display->display_options['exposed_form']['type'] = 'basic';
- $handler->display->display_options['pager']['type'] = 'some';
- $handler->display->display_options['pager']['options']['items_per_page'] = 5;
- $handler->display->display_options['style_plugin'] = 'list';
- $handler->display->display_options['row_plugin'] = 'fields';
- /* 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';
- /* Field: Comment: Title */
- $handler->display->display_options['fields']['subject']['id'] = 'subject';
- $handler->display->display_options['fields']['subject']['table'] = 'comment';
- $handler->display->display_options['fields']['subject']['field'] = 'subject';
- $handler->display->display_options['fields']['subject']['label'] = '';
- $handler->display->display_options['fields']['subject']['link_to_comment'] = 1;
- /* Field: Comment: Updated date */
- $handler->display->display_options['fields']['timestamp']['id'] = 'timestamp';
- $handler->display->display_options['fields']['timestamp']['table'] = 'comment';
- $handler->display->display_options['fields']['timestamp']['field'] = 'changed';
- $handler->display->display_options['fields']['timestamp']['label'] = '';
- $handler->display->display_options['fields']['timestamp']['date_format'] = 'time ago';
- /* Sort criterion: Comment: Updated date */
- $handler->display->display_options['sorts']['timestamp']['id'] = 'timestamp';
- $handler->display->display_options['sorts']['timestamp']['table'] = 'comment';
- $handler->display->display_options['sorts']['timestamp']['field'] = 'changed';
- $handler->display->display_options['sorts']['timestamp']['order'] = 'DESC';
- /* Filter criterion: Content: Published or admin */
- $handler->display->display_options['filters']['status_extra']['id'] = 'status_extra';
- $handler->display->display_options['filters']['status_extra']['table'] = 'node';
- $handler->display->display_options['filters']['status_extra']['field'] = 'status_extra';
- $handler->display->display_options['filters']['status_extra']['relationship'] = 'nid';
- $handler->display->display_options['filters']['status_extra']['group'] = 0;
- /* Display: Page */
- $handler = $view->new_display('page', 'Page', 'page');
- $handler->display->display_options['defaults']['style_plugin'] = FALSE;
- $handler->display->display_options['style_plugin'] = 'list';
- $handler->display->display_options['defaults']['style_options'] = FALSE;
- $handler->display->display_options['defaults']['row_plugin'] = FALSE;
- $handler->display->display_options['row_plugin'] = 'fields';
- $handler->display->display_options['row_options']['inline'] = array(
- 'title' => 'title',
- 'timestamp' => 'timestamp',
- );
- $handler->display->display_options['row_options']['separator'] = ' ';
- $handler->display->display_options['defaults']['row_options'] = FALSE;
- $handler->display->display_options['defaults']['fields'] = FALSE;
- /* 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']['label'] = 'Reply to';
- $handler->display->display_options['fields']['title']['link_to_node'] = 1;
- /* Field: Comment: Updated date */
- $handler->display->display_options['fields']['timestamp']['id'] = 'timestamp';
- $handler->display->display_options['fields']['timestamp']['table'] = 'comment';
- $handler->display->display_options['fields']['timestamp']['field'] = 'changed';
- $handler->display->display_options['fields']['timestamp']['label'] = '';
- $handler->display->display_options['fields']['timestamp']['date_format'] = 'time ago';
- /* Field: Comment: Title */
- $handler->display->display_options['fields']['subject']['id'] = 'subject';
- $handler->display->display_options['fields']['subject']['table'] = 'comment';
- $handler->display->display_options['fields']['subject']['field'] = 'subject';
- $handler->display->display_options['fields']['subject']['label'] = '';
- $handler->display->display_options['fields']['subject']['link_to_comment'] = 1;
- /* Field: Comment: Comment */
- $handler->display->display_options['fields']['comment']['id'] = 'comment';
- $handler->display->display_options['fields']['comment']['table'] = 'field_data_comment_body';
- $handler->display->display_options['fields']['comment']['field'] = 'comment_body';
- $handler->display->display_options['fields']['comment']['label'] = '';
- $handler->display->display_options['path'] = 'comments/recent';
- /* Display: Block */
- $handler = $view->new_display('block', 'Block', 'block');
- $translatables['comments_recent'] = array(
- t('Master'),
- t('Recent comments'),
- t('more'),
- t('Apply'),
- t('Reset'),
- t('Sort by'),
- t('Asc'),
- t('Desc'),
- t('Content'),
- t('Page'),
- t('Reply to'),
- t('Block'),
- );
- $views['comments_recent'] = $view;
- $view = new view;
- $view->name = 'tracker';
- $view->description = 'Shows all new activity on system.';
- $view->tag = 'default';
- $view->base_table = 'node';
- $view->human_name = 'Tracker';
- $view->core = 0;
- $view->api_version = '3.0';
- $view->disabled = TRUE; /* 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'] = 'Recent posts';
- $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['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'] = '25';
- $handler->display->display_options['style_plugin'] = 'table';
- $handler->display->display_options['style_options']['columns'] = array(
- 'type' => 'type',
- 'title' => 'title',
- 'name' => 'name',
- 'comment_count' => 'comment_count',
- 'last_comment_timestamp' => 'last_comment_timestamp',
- 'timestamp' => 'title',
- 'new_comments' => 'comment_count',
- );
- $handler->display->display_options['style_options']['default'] = 'last_comment_timestamp';
- $handler->display->display_options['style_options']['info'] = array(
- 'type' => array(
- 'sortable' => 1,
- 'separator' => '',
- ),
- 'title' => array(
- 'sortable' => 1,
- 'separator' => ' ',
- ),
- 'name' => array(
- 'sortable' => 1,
- 'separator' => '',
- ),
- 'comment_count' => array(
- 'sortable' => 1,
- 'separator' => '<br />',
- ),
- 'last_comment_timestamp' => array(
- 'sortable' => 1,
- 'separator' => ' ',
- ),
- 'timestamp' => array(
- 'separator' => '',
- ),
- 'new_comments' => array(
- 'separator' => '',
- ),
- );
- $handler->display->display_options['style_options']['override'] = 1;
- $handler->display->display_options['style_options']['order'] = 'desc';
- /* Relationship: Content: Author */
- $handler->display->display_options['relationships']['uid']['id'] = 'uid';
- $handler->display->display_options['relationships']['uid']['table'] = 'node';
- $handler->display->display_options['relationships']['uid']['field'] = 'uid';
- /* Field: Content: Type */
- $handler->display->display_options['fields']['type']['id'] = 'type';
- $handler->display->display_options['fields']['type']['table'] = 'node';
- $handler->display->display_options['fields']['type']['field'] = 'type';
- /* 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';
- /* Field: User: Name */
- $handler->display->display_options['fields']['name']['id'] = 'name';
- $handler->display->display_options['fields']['name']['table'] = 'users';
- $handler->display->display_options['fields']['name']['field'] = 'name';
- $handler->display->display_options['fields']['name']['relationship'] = 'uid';
- $handler->display->display_options['fields']['name']['label'] = 'Author';
- /* Field: Content: Comment count */
- $handler->display->display_options['fields']['comment_count']['id'] = 'comment_count';
- $handler->display->display_options['fields']['comment_count']['table'] = 'node_comment_statistics';
- $handler->display->display_options['fields']['comment_count']['field'] = 'comment_count';
- $handler->display->display_options['fields']['comment_count']['label'] = 'Replies';
- /* Field: Content: Last comment time */
- $handler->display->display_options['fields']['last_comment_timestamp']['id'] = 'last_comment_timestamp';
- $handler->display->display_options['fields']['last_comment_timestamp']['table'] = 'node_comment_statistics';
- $handler->display->display_options['fields']['last_comment_timestamp']['field'] = 'last_comment_timestamp';
- $handler->display->display_options['fields']['last_comment_timestamp']['label'] = 'Last Post';
- /* Field: Content: Has new content */
- $handler->display->display_options['fields']['timestamp']['id'] = 'timestamp';
- $handler->display->display_options['fields']['timestamp']['table'] = 'history';
- $handler->display->display_options['fields']['timestamp']['field'] = 'timestamp';
- $handler->display->display_options['fields']['timestamp']['label'] = '';
- $handler->display->display_options['fields']['timestamp']['link_to_node'] = 0;
- $handler->display->display_options['fields']['timestamp']['comments'] = 1;
- /* Field: Content: New comments */
- $handler->display->display_options['fields']['new_comments']['id'] = 'new_comments';
- $handler->display->display_options['fields']['new_comments']['table'] = 'node';
- $handler->display->display_options['fields']['new_comments']['field'] = 'new_comments';
- $handler->display->display_options['fields']['new_comments']['label'] = '';
- $handler->display->display_options['fields']['new_comments']['hide_empty'] = TRUE;
- $handler->display->display_options['fields']['new_comments']['suffix'] = ' new';
- $handler->display->display_options['fields']['new_comments']['link_to_comment'] = 1;
- /* Sort criterion: Content: Last comment time */
- $handler->display->display_options['sorts']['last_comment_timestamp']['id'] = 'last_comment_timestamp';
- $handler->display->display_options['sorts']['last_comment_timestamp']['table'] = 'node_comment_statistics';
- $handler->display->display_options['sorts']['last_comment_timestamp']['field'] = 'last_comment_timestamp';
- /* Contextual filter: Content: User posted or commented */
- $handler->display->display_options['arguments']['uid_touch']['id'] = 'uid_touch';
- $handler->display->display_options['arguments']['uid_touch']['table'] = 'node';
- $handler->display->display_options['arguments']['uid_touch']['field'] = 'uid_touch';
- $handler->display->display_options['arguments']['uid_touch']['exception']['title_enable'] = 1;
- $handler->display->display_options['arguments']['uid_touch']['title_enable'] = 1;
- $handler->display->display_options['arguments']['uid_touch']['title'] = 'Recent posts for %1';
- $handler->display->display_options['arguments']['uid_touch']['default_argument_type'] = 'fixed';
- $handler->display->display_options['arguments']['uid_touch']['summary']['format'] = 'default_summary';
- $handler->display->display_options['arguments']['uid_touch']['specify_validation'] = 1;
- /* Filter criterion: Content: Published */
- $handler->display->display_options['filters']['status']['id'] = 'status';
- $handler->display->display_options['filters']['status']['table'] = 'node';
- $handler->display->display_options['filters']['status']['field'] = 'status';
- $handler->display->display_options['filters']['status']['value'] = '1';
- $handler->display->display_options['filters']['status']['group'] = 0;
- $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
- /* Display: Page */
- $handler = $view->new_display('page', 'Page', 'page');
- $handler->display->display_options['path'] = 'tracker';
- $handler->display->display_options['menu']['type'] = 'normal';
- $handler->display->display_options['menu']['title'] = 'Recent posts';
- $translatables['tracker'] = array(
- t('Master'),
- t('Recent posts'),
- t('more'),
- t('Apply'),
- t('Reset'),
- t('Sort by'),
- t('Asc'),
- t('Desc'),
- t('Items per page'),
- t('- All -'),
- t('Offset'),
- t('Type'),
- t('Title'),
- t('Author'),
- t('Replies'),
- t('.'),
- t(','),
- t('Last Post'),
- t(' new'),
- t('All'),
- t('Recent posts for %1'),
- t('Page'),
- );
- $views['tracker'] = $view;
- return $views;
- }
|