62c68d40182daaf73d2db843164b76f07d55939f
[project/feeds.git] / feeds_news / feeds_news.views_default.inc
1 <?php
2
3 /**
4 * Implementation of hook_views_default_views().
5 */
6 function feeds_news_views_default_views() {
7 $views = array();
8
9 // Exported view: feeds_defaults_feed_items
10 $view = new view;
11 $view->name = 'feeds_defaults_feed_items';
12 $view->description = 'Show feed items for a feed node. Use together with default importer configuration "Feed".';
13 $view->tag = 'Feeds defaults';
14 $view->view_php = '';
15 $view->base_table = 'node';
16 $view->is_cacheable = FALSE;
17 $view->api_version = 2;
18 $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
19 $handler = $view->new_display('default', 'Defaults', 'default');
20 $handler->override_option('relationships', array(
21 'feed_nid' => array(
22 'label' => 'Owner feed',
23 'required' => 1,
24 'id' => 'feed_nid',
25 'table' => 'feeds_node_item',
26 'field' => 'feed_nid',
27 'override' => array(
28 'button' => 'Override',
29 ),
30 'relationship' => 'none',
31 ),
32 ));
33 $handler->override_option('fields', array(
34 'url' => array(
35 'label' => '',
36 'alter' => array(
37 'alter_text' => 0,
38 'text' => '',
39 'make_link' => 0,
40 'path' => '',
41 'link_class' => '',
42 'alt' => '',
43 'prefix' => '',
44 'suffix' => '',
45 'target' => '',
46 'help' => '',
47 'trim' => 0,
48 'max_length' => '',
49 'word_boundary' => 1,
50 'ellipsis' => 1,
51 'html' => 0,
52 'strip_tags' => 0,
53 ),
54 'empty' => '',
55 'hide_empty' => 0,
56 'empty_zero' => 0,
57 'display_as_link' => 1,
58 'exclude' => 1,
59 'id' => 'url',
60 'table' => 'feeds_node_item',
61 'field' => 'url',
62 'override' => array(
63 'button' => 'Override',
64 ),
65 'relationship' => 'none',
66 ),
67 'title' => array(
68 'label' => '',
69 'alter' => array(
70 'alter_text' => 0,
71 'text' => '',
72 'make_link' => 1,
73 'path' => '[url]',
74 'link_class' => '',
75 'alt' => '',
76 'prefix' => '<h2>',
77 'suffix' => '</h2>',
78 'target' => '',
79 'help' => '',
80 'trim' => 0,
81 'max_length' => '',
82 'word_boundary' => 1,
83 'ellipsis' => 1,
84 'html' => 0,
85 'strip_tags' => 0,
86 ),
87 'empty' => '',
88 'hide_empty' => 0,
89 'empty_zero' => 0,
90 'link_to_node' => 0,
91 'exclude' => 0,
92 'id' => 'title',
93 'table' => 'node',
94 'field' => 'title',
95 'override' => array(
96 'button' => 'Override',
97 ),
98 'relationship' => 'none',
99 ),
100 'title_1' => array(
101 'label' => '',
102 'alter' => array(
103 'alter_text' => 0,
104 'text' => '',
105 'make_link' => 0,
106 'path' => '',
107 'link_class' => '',
108 'alt' => '',
109 'prefix' => '',
110 'suffix' => '',
111 'target' => '',
112 'help' => '',
113 'trim' => 0,
114 'max_length' => '',
115 'word_boundary' => 1,
116 'ellipsis' => 1,
117 'html' => 0,
118 'strip_tags' => 0,
119 ),
120 'empty' => '',
121 'hide_empty' => 0,
122 'empty_zero' => 0,
123 'link_to_node' => 1,
124 'exclude' => 1,
125 'id' => 'title_1',
126 'table' => 'node',
127 'field' => 'title',
128 'override' => array(
129 'button' => 'Override',
130 ),
131 'relationship' => 'feed_nid',
132 ),
133 'nothing' => array(
134 'label' => '',
135 'alter' => array(
136 'text' => 'From [title_1]',
137 'make_link' => 0,
138 'path' => '',
139 'link_class' => '',
140 'alt' => '',
141 'prefix' => '',
142 'suffix' => '',
143 'target' => '',
144 'help' => '',
145 'trim' => 0,
146 'max_length' => '',
147 'word_boundary' => 1,
148 'ellipsis' => 1,
149 'html' => 0,
150 'strip_tags' => 0,
151 ),
152 'empty' => '',
153 'hide_empty' => 0,
154 'empty_zero' => 0,
155 'exclude' => 0,
156 'id' => 'nothing',
157 'table' => 'views',
158 'field' => 'nothing',
159 'override' => array(
160 'button' => 'Override',
161 ),
162 'relationship' => 'none',
163 ),
164 'body' => array(
165 'label' => '',
166 'alter' => array(
167 'alter_text' => 0,
168 'text' => '',
169 'make_link' => 0,
170 'path' => '',
171 'link_class' => '',
172 'alt' => '',
173 'prefix' => '',
174 'suffix' => '',
175 'target' => '',
176 'help' => '',
177 'trim' => 0,
178 'max_length' => '',
179 'word_boundary' => 1,
180 'ellipsis' => 1,
181 'html' => 0,
182 'strip_tags' => 0,
183 ),
184 'empty' => '',
185 'hide_empty' => 0,
186 'empty_zero' => 0,
187 'exclude' => 0,
188 'id' => 'body',
189 'table' => 'node_revisions',
190 'field' => 'body',
191 'override' => array(
192 'button' => 'Override',
193 ),
194 'relationship' => 'none',
195 ),
196 'edit_node' => array(
197 'label' => '',
198 'alter' => array(
199 'alter_text' => 0,
200 'text' => '',
201 'make_link' => 0,
202 'path' => '',
203 'link_class' => '',
204 'alt' => '',
205 'prefix' => '',
206 'suffix' => '',
207 'target' => '',
208 'help' => '',
209 'trim' => 0,
210 'max_length' => '',
211 'word_boundary' => 1,
212 'ellipsis' => 1,
213 'html' => 0,
214 'strip_tags' => 0,
215 ),
216 'empty' => '',
217 'hide_empty' => 0,
218 'empty_zero' => 0,
219 'text' => 'Edit',
220 'exclude' => 0,
221 'id' => 'edit_node',
222 'table' => 'node',
223 'field' => 'edit_node',
224 'override' => array(
225 'button' => 'Override',
226 ),
227 'relationship' => 'none',
228 ),
229 ));
230 $handler->override_option('arguments', array(
231 'nid' => array(
232 'default_action' => 'empty',
233 'style_plugin' => 'default_summary',
234 'style_options' => array(),
235 'wildcard' => 'all',
236 'wildcard_substitution' => 'All',
237 'title' => 'Articles from %1',
238 'breadcrumb' => '',
239 'default_argument_type' => 'fixed',
240 'default_argument' => '',
241 'validate_type' => 'none',
242 'validate_fail' => 'not found',
243 'break_phrase' => 0,
244 'not' => 0,
245 'id' => 'nid',
246 'table' => 'node',
247 'field' => 'nid',
248 'validate_user_argument_type' => 'uid',
249 'validate_user_roles' => array(
250 '2' => 0,
251 ),
252 'relationship' => 'feed_nid',
253 'default_options_div_prefix' => '',
254 'default_argument_fixed' => '',
255 'default_argument_user' => 0,
256 'default_argument_php' => '',
257 'validate_argument_node_type' => array(
258 'feed' => 0,
259 'feed_item' => 0,
260 'article' => 0,
261 ),
262 'validate_argument_node_access' => 0,
263 'validate_argument_nid_type' => 'nid',
264 'validate_argument_vocabulary' => array(),
265 'validate_argument_type' => 'tid',
266 'validate_argument_transform' => 0,
267 'validate_user_restrict_roles' => 0,
268 'validate_argument_php' => '',
269 'override' => array(
270 'button' => 'Override',
271 ),
272 ),
273 ));
274 $handler->override_option('filters', array(
275 'type' => array(
276 'operator' => 'in',
277 'value' => array(
278 'feed_item' => 'feed_item',
279 ),
280 'group' => '0',
281 'exposed' => FALSE,
282 'expose' => array(
283 'operator' => FALSE,
284 'label' => '',
285 ),
286 'id' => 'type',
287 'table' => 'node',
288 'field' => 'type',
289 'override' => array(
290 'button' => 'Override',
291 ),
292 'relationship' => 'none',
293 ),
294 ));
295 $handler->override_option('access', array(
296 'type' => 'perm',
297 'perm' => 'access content',
298 ));
299 $handler->override_option('cache', array(
300 'type' => 'none',
301 ));
302 $handler->override_option('empty', 'There are no items for this feed at the moment.');
303 $handler->override_option('empty_format', '1');
304 $handler = $view->new_display('page', 'Page', 'page_1');
305 $handler->override_option('arguments', array(
306 'nid' => array(
307 'default_action' => 'empty',
308 'style_plugin' => 'default_summary',
309 'style_options' => array(),
310 'wildcard' => 'all',
311 'wildcard_substitution' => 'All',
312 'title' => 'All items from %1',
313 'breadcrumb' => '',
314 'default_argument_type' => 'fixed',
315 'default_argument' => '',
316 'validate_type' => 'node',
317 'validate_fail' => 'not found',
318 'break_phrase' => 0,
319 'not' => 0,
320 'id' => 'nid',
321 'table' => 'node',
322 'field' => 'nid',
323 'validate_user_argument_type' => 'uid',
324 'validate_user_roles' => array(
325 '2' => 0,
326 ),
327 'relationship' => 'feed_nid',
328 'default_options_div_prefix' => '',
329 'default_argument_fixed' => '',
330 'default_argument_user' => 0,
331 'default_argument_php' => '',
332 'validate_argument_node_type' => array(
333 'feed' => 'feed',
334 'feed_item' => 0,
335 'article' => 0,
336 ),
337 'validate_argument_node_access' => 0,
338 'validate_argument_nid_type' => 'nid',
339 'validate_argument_vocabulary' => array(),
340 'validate_argument_type' => 'tid',
341 'validate_argument_transform' => 0,
342 'validate_user_restrict_roles' => 0,
343 'validate_argument_php' => '',
344 'override' => array(
345 'button' => 'Use default',
346 ),
347 ),
348 ));
349 $handler->override_option('path', 'node/%/feed-items');
350 $handler->override_option('menu', array(
351 'type' => 'tab',
352 'title' => 'View items',
353 'description' => '',
354 'weight' => '0',
355 'name' => 'navigation',
356 ));
357 $handler->override_option('tab_options', array(
358 'type' => 'none',
359 'title' => '',
360 'description' => '',
361 'weight' => 0,
362 'name' => 'navigation',
363 ));
364
365 $views[$view->name] = $view;
366
367 return $views;
368 }