1
|
<?php
|
2
|
|
3
|
/**
|
4
|
* @file
|
5
|
* feeds_news.views_default.inc
|
6
|
*/
|
7
|
|
8
|
/**
|
9
|
* Implements hook_views_default_views().
|
10
|
*/
|
11
|
function feeds_news_views_default_views() {
|
12
|
$export = array();
|
13
|
|
14
|
$view = new view();
|
15
|
$view->name = 'feeds_defaults_feed_items';
|
16
|
$view->description = 'Show feed items for a feed node. Use together with default importer configuration "Feed".';
|
17
|
$view->tag = 'Feeds defaults';
|
18
|
$view->base_table = 'node';
|
19
|
$view->human_name = '';
|
20
|
$view->core = 0;
|
21
|
$view->api_version = '3.0';
|
22
|
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
|
23
|
|
24
|
/* Display: Defaults */
|
25
|
$handler = $view->new_display('default', 'Defaults', 'default');
|
26
|
$handler->display->display_options['use_more_always'] = FALSE;
|
27
|
$handler->display->display_options['access']['type'] = 'perm';
|
28
|
$handler->display->display_options['cache']['type'] = 'none';
|
29
|
$handler->display->display_options['query']['type'] = 'views_query';
|
30
|
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
|
31
|
$handler->display->display_options['exposed_form']['type'] = 'basic';
|
32
|
$handler->display->display_options['pager']['type'] = 'full';
|
33
|
$handler->display->display_options['style_plugin'] = 'default';
|
34
|
$handler->display->display_options['row_plugin'] = 'node';
|
35
|
/* No results behavior: Global: Text area */
|
36
|
$handler->display->display_options['empty']['text']['id'] = 'area';
|
37
|
$handler->display->display_options['empty']['text']['table'] = 'views';
|
38
|
$handler->display->display_options['empty']['text']['field'] = 'area';
|
39
|
$handler->display->display_options['empty']['text']['content'] = 'There are no items for this feed at the moment.';
|
40
|
$handler->display->display_options['empty']['text']['format'] = '1';
|
41
|
/* Relationship: Feeds item: Owner feed */
|
42
|
$handler->display->display_options['relationships']['feed_nid_1']['id'] = 'feed_nid_1';
|
43
|
$handler->display->display_options['relationships']['feed_nid_1']['table'] = 'feeds_item';
|
44
|
$handler->display->display_options['relationships']['feed_nid_1']['field'] = 'feed_nid';
|
45
|
$handler->display->display_options['relationships']['feed_nid_1']['required'] = TRUE;
|
46
|
/* Sort criterion: Content: Post date */
|
47
|
$handler->display->display_options['sorts']['created']['id'] = 'created';
|
48
|
$handler->display->display_options['sorts']['created']['table'] = 'node';
|
49
|
$handler->display->display_options['sorts']['created']['field'] = 'created';
|
50
|
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
|
51
|
/* Contextual filter: Content: Nid */
|
52
|
$handler->display->display_options['arguments']['nid']['id'] = 'nid';
|
53
|
$handler->display->display_options['arguments']['nid']['table'] = 'node';
|
54
|
$handler->display->display_options['arguments']['nid']['field'] = 'nid';
|
55
|
$handler->display->display_options['arguments']['nid']['relationship'] = 'feed_nid_1';
|
56
|
$handler->display->display_options['arguments']['nid']['default_action'] = 'not found';
|
57
|
$handler->display->display_options['arguments']['nid']['title_enable'] = TRUE;
|
58
|
$handler->display->display_options['arguments']['nid']['title'] = 'Articles from %1';
|
59
|
$handler->display->display_options['arguments']['nid']['default_argument_type'] = 'fixed';
|
60
|
$handler->display->display_options['arguments']['nid']['summary']['format'] = 'default_summary';
|
61
|
$handler->display->display_options['arguments']['nid']['specify_validation'] = TRUE;
|
62
|
$handler->display->display_options['arguments']['nid']['validate']['type'] = 'node';
|
63
|
$handler->display->display_options['arguments']['nid']['validate_options']['types'] = array(
|
64
|
'feed' => 'feed',
|
65
|
);
|
66
|
/* Filter criterion: Content: Type */
|
67
|
$handler->display->display_options['filters']['type']['id'] = 'type';
|
68
|
$handler->display->display_options['filters']['type']['table'] = 'node';
|
69
|
$handler->display->display_options['filters']['type']['field'] = 'type';
|
70
|
$handler->display->display_options['filters']['type']['value'] = array(
|
71
|
'feed_item' => 'feed_item',
|
72
|
);
|
73
|
$handler->display->display_options['filters']['type']['expose']['operator'] = FALSE;
|
74
|
|
75
|
/* Display: Page */
|
76
|
$handler = $view->new_display('page', 'Page', 'page_1');
|
77
|
$handler->display->display_options['path'] = 'node/%/feed-items';
|
78
|
$handler->display->display_options['menu']['type'] = 'tab';
|
79
|
$handler->display->display_options['menu']['title'] = 'View items';
|
80
|
$handler->display->display_options['menu']['weight'] = '-9';
|
81
|
$translatables['feeds_defaults_feed_items'] = array(
|
82
|
t('Defaults'),
|
83
|
t('more'),
|
84
|
t('Apply'),
|
85
|
t('Reset'),
|
86
|
t('Sort by'),
|
87
|
t('Asc'),
|
88
|
t('Desc'),
|
89
|
t('Items per page'),
|
90
|
t('- All -'),
|
91
|
t('Offset'),
|
92
|
t('« first'),
|
93
|
t('‹ previous'),
|
94
|
t('next ›'),
|
95
|
t('last »'),
|
96
|
t('There are no items for this feed at the moment.'),
|
97
|
t('Owner feed'),
|
98
|
t('All'),
|
99
|
t('Articles from %1'),
|
100
|
t('Page'),
|
101
|
);
|
102
|
$export['feeds_defaults_feed_items'] = $view;
|
103
|
|
104
|
return $export;
|
105
|
}
|