function recently_read_views_default_views in Recently Read 7.3
Same name and namespace in other branches
- 7.2 includes/recently_read.views.inc \recently_read_views_default_views()
Implements of hook_views_default_views()
File
- includes/
recently_read.views_default.inc, line 10
Code
function recently_read_views_default_views() {
$view = new view();
$view->name = 'recently_read';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Recently Read';
$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'] = 'Recently Read';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'perm';
$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'] = 'some';
$handler->display->display_options['pager']['options']['items_per_page'] = '10';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['style_plugin'] = 'list';
$handler->display->display_options['row_plugin'] = 'fields';
/* Relationship: Recently Read: Recently Read */
$handler->display->display_options['relationships']['node_rr_nid']['id'] = 'node_rr_nid';
$handler->display->display_options['relationships']['node_rr_nid']['table'] = 'node';
$handler->display->display_options['relationships']['node_rr_nid']['field'] = 'node_rr_nid';
$handler->display->display_options['relationships']['node_rr_nid']['required'] = TRUE;
/* 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']['label'] = '';
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
$handler->display->display_options['fields']['title']['element_label_colon'] = FALSE;
/* Sort criterion: Recently Read: Recently Read Date */
$handler->display->display_options['sorts']['timestamp']['id'] = 'timestamp';
$handler->display->display_options['sorts']['timestamp']['table'] = 'recently_read';
$handler->display->display_options['sorts']['timestamp']['field'] = 'timestamp';
$handler->display->display_options['sorts']['timestamp']['relationship'] = 'node_rr_nid';
$handler->display->display_options['sorts']['timestamp']['order'] = 'DESC';
/* 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'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Filter criterion: Recently Read: Current */
$handler->display->display_options['filters']['current']['id'] = 'current';
$handler->display->display_options['filters']['current']['table'] = 'recently_read';
$handler->display->display_options['filters']['current']['field'] = 'current';
$handler->display->display_options['filters']['current']['relationship'] = 'node_rr_nid';
$handler->display->display_options['filters']['current']['value'] = '1';
/* Display: Recently Read */
$handler = $view
->new_display('block', 'Recently Read', 'block');
$translatables['recently_read'] = array(
t('Master'),
t('recently read'),
t('more'),
t('Apply'),
t('Reset'),
t('Sort by'),
t('Asc'),
t('Desc'),
t('Recently Read'),
);
$views[$view->name] = $view;
return $views;
}