/[drupal]/contributions/modules/drupalorg/drupalorg/drupalorg.views_default.inc
ViewVC logotype

Contents of /contributions/modules/drupalorg/drupalorg/drupalorg.views_default.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download) (as text)
Sat Apr 25 12:43:04 2009 UTC (7 months ago) by damz
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +15 -1 lines
File MIME type: text/x-php
#444696: add a status = 1 filter to the view. Damn it.
1 <?php
2 // $Id: drupalorg.views_default.inc,v 1.2 2009/04/25 11:38:02 damz Exp $
3
4 /**
5 * @file
6 * Contains default views on behalf of the drupalorg module.
7 */
8
9 /**
10 * Implementation of hook_views_default_views().
11 */
12 function drupalorg_views_default_views() {
13 $views = array();
14
15 // ----------------------------------------
16 // The Drupal core SAs
17 // ----------------------------------------
18 $view = new view;
19 $view->name = 'drupalorg_security_announcements';
20 $view->description = 'Security advisories for Drupal core';
21 $view->tag = 'security';
22 $view->view_php = '';
23 $view->base_table = 'node';
24 $view->is_cacheable = FALSE;
25 $view->api_version = 2;
26 $view->disabled = FALSE;
27 $handler = $view->new_display('default', 'Defaults', 'default');
28 $handler->override_option('sorts', array(
29 'created' => array(
30 'order' => 'DESC',
31 'granularity' => 'second',
32 'id' => 'created',
33 'table' => 'node',
34 'field' => 'created',
35 'relationship' => 'none',
36 ),
37 ));
38 $handler->override_option('filters', array(
39 'status_extra' => array(
40 'operator' => '=',
41 'value' => '',
42 'group' => '0',
43 'exposed' => FALSE,
44 'expose' => array(
45 'operator' => FALSE,
46 'label' => '',
47 ),
48 'id' => 'status_extra',
49 'table' => 'node',
50 'field' => 'status_extra',
51 'relationship' => 'none',
52 ),
53 'tid' => array(
54 'operator' => 'and',
55 'value' => array(
56 '1852' => '1852',
57 ),
58 'group' => '0',
59 'exposed' => FALSE,
60 'expose' => array(
61 'operator' => FALSE,
62 'label' => '',
63 ),
64 'type' => 'select',
65 'vid' => '1',
66 'id' => 'tid',
67 'table' => 'term_node',
68 'field' => 'tid',
69 'hierarchy' => 0,
70 'override' => array(
71 'button' => 'Override',
72 ),
73 'relationship' => 'none',
74 'reduce_duplicates' => 0,
75 ),
76 ));
77 $handler->override_option('access', array(
78 'type' => 'none',
79 ));
80 $handler->override_option('title', 'Security advisories');
81 $handler->override_option('header', 'These posts by the Drupal security team are also sent to the security announcements e-mail list.');
82 $handler->override_option('header_format', '1');
83 $handler->override_option('header_empty', 1);
84 $handler->override_option('use_pager', '1');
85 $handler->override_option('row_plugin', 'node');
86 $handler->override_option('row_options', array(
87 'teaser' => 1,
88 'links' => 1,
89 'comments' => 0,
90 ));
91 $handler = $view->new_display('page', 'Page', 'page_1');
92 $handler->override_option('path', 'security/core');
93 $handler->override_option('menu', array(
94 'type' => 'default tab',
95 'title' => 'Drupal core',
96 'description' => '',
97 'weight' => '0',
98 'name' => 'navigation',
99 ));
100 $handler->override_option('tab_options', array(
101 'type' => 'normal',
102 'title' => 'Security advisories for Drupal core',
103 'description' => 'These posts by the Drupal security team are also sent to the security announcements e-mail list.',
104 'weight' => '0',
105 ));
106 $handler = $view->new_display('feed', 'Feed', 'feed_1');
107 $handler->override_option('style_plugin', 'rss');
108 $handler->override_option('style_options', array(
109 'mission_description' => FALSE,
110 'description' => '',
111 ));
112 $handler->override_option('row_plugin', 'node_rss');
113 $handler->override_option('row_options', array(
114 'item_length' => 'default',
115 ));
116 $handler->override_option('path', 'security/rss.xml');
117 $handler->override_option('menu', array(
118 'type' => 'none',
119 'title' => '',
120 'description' => '',
121 'weight' => 0,
122 'name' => 'navigation',
123 ));
124 $handler->override_option('tab_options', array(
125 'type' => 'none',
126 'title' => '',
127 'description' => '',
128 'weight' => 0,
129 ));
130 $handler->override_option('displays', array(
131 'page_1' => 'page_1',
132 'default' => 0,
133 ));
134 $handler->override_option('sitename_title', FALSE);
135 $views[$view->name] = $view;
136
137 // ----------------------------------------
138 // Drupal contrib SAs
139 // ----------------------------------------
140 $view = new view;
141 $view->name = 'drupalorg_security_announcements_contrib';
142 $view->description = 'Contrib modules SAs';
143 $view->tag = 'security';
144 $view->view_php = '';
145 $view->base_table = 'node';
146 $view->is_cacheable = FALSE;
147 $view->api_version = 2;
148 $view->disabled = FALSE;
149 $handler = $view->new_display('default', 'Defaults', 'default');
150 $handler->override_option('sorts', array(
151 'created' => array(
152 'order' => 'DESC',
153 'granularity' => 'second',
154 'id' => 'created',
155 'table' => 'node',
156 'field' => 'created',
157 'override' => array(
158 'button' => 'Override',
159 ),
160 'relationship' => 'none',
161 ),
162 ));
163 $handler->override_option('filters', array(
164 'status_extra' => array(
165 'operator' => '=',
166 'value' => '',
167 'group' => '0',
168 'exposed' => FALSE,
169 'expose' => array(
170 'operator' => FALSE,
171 'label' => '',
172 ),
173 'id' => 'status_extra',
174 'table' => 'node',
175 'field' => 'status_extra',
176 'relationship' => 'none',
177 ),
178 'tid' => array(
179 'operator' => 'and',
180 'value' => array(
181 '44' => '44',
182 ),
183 'group' => '0',
184 'exposed' => FALSE,
185 'expose' => array(
186 'operator' => FALSE,
187 'label' => '',
188 ),
189 'type' => 'select',
190 'vid' => '1',
191 'id' => 'tid',
192 'table' => 'term_node',
193 'field' => 'tid',
194 'hierarchy' => 0,
195 'override' => array(
196 'button' => 'Override',
197 ),
198 'relationship' => 'none',
199 'reduce_duplicates' => 0,
200 ),
201 ));
202 $handler->override_option('access', array(
203 'type' => 'none',
204 ));
205 $handler->override_option('title', 'Security advisories for contributed projects ');
206 $handler->override_option('header', 'Security advisories for third-party projects that are not part of Drupal core - this includes all modules, themes, and installation profiles that have been contributed by a community member. These posts by the Drupal security team are also sent to the security announcements e-mail list.');
207 $handler->override_option('header_format', '1');
208 $handler->override_option('header_empty', 1);
209 $handler->override_option('use_pager', '1');
210 $handler->override_option('row_plugin', 'node');
211 $handler->override_option('row_options', array(
212 'teaser' => 1,
213 'links' => 1,
214 'comments' => 0,
215 ));
216 $handler = $view->new_display('page', 'Page', 'page_1');
217 $handler->override_option('path', 'security/contrib');
218 $handler->override_option('menu', array(
219 'type' => 'tab',
220 'title' => 'Contributed projects',
221 'description' => '',
222 'weight' => '1',
223 'name' => 'navigation',
224 ));
225 $handler->override_option('tab_options', array(
226 'type' => 'normal',
227 'title' => 'Security advisories for contributed projects',
228 'description' => 'These posts by the Drupal security team are also sent to the security announcements e-mail list.',
229 'weight' => '0',
230 ));
231 $handler = $view->new_display('feed', 'Feed', 'feed_1');
232 $handler->override_option('style_plugin', 'rss');
233 $handler->override_option('style_options', array(
234 'mission_description' => FALSE,
235 'description' => '',
236 ));
237 $handler->override_option('row_plugin', 'node_rss');
238 $handler->override_option('row_options', array(
239 'item_length' => 'default',
240 ));
241 $handler->override_option('path', 'security/contrib/rss.xml');
242 $handler->override_option('menu', array(
243 'type' => 'none',
244 'title' => '',
245 'description' => '',
246 'weight' => 0,
247 'name' => 'navigation',
248 ));
249 $handler->override_option('tab_options', array(
250 'type' => 'none',
251 'title' => '',
252 'description' => '',
253 'weight' => 0,
254 ));
255 $handler->override_option('displays', array(
256 'page_1' => 'page_1',
257 'default' => 0,
258 ));
259 $handler->override_option('sitename_title', FALSE);
260 $views[$view->name] = $view;
261
262 // ----------------------------------------
263 // Security Public Service Announcements
264 // ----------------------------------------
265 $view = new view;
266 $view->name = 'drupalorg_security_announcements_psa';
267 $view->description = 'Security PSAs';
268 $view->tag = 'security';
269 $view->view_php = '';
270 $view->base_table = 'node';
271 $view->is_cacheable = FALSE;
272 $view->api_version = 2;
273 $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
274 $handler = $view->new_display('default', 'Defaults', 'default');
275 $handler->override_option('sorts', array(
276 'created' => array(
277 'order' => 'DESC',
278 'granularity' => 'second',
279 'id' => 'created',
280 'table' => 'node',
281 'field' => 'created',
282 'override' => array(
283 'button' => 'Override',
284 ),
285 'relationship' => 'none',
286 ),
287 ));
288 $handler->override_option('filters', array(
289 'status_extra' => array(
290 'operator' => '=',
291 'value' => '',
292 'group' => '0',
293 'exposed' => FALSE,
294 'expose' => array(
295 'operator' => FALSE,
296 'label' => '',
297 ),
298 'id' => 'status_extra',
299 'table' => 'node',
300 'field' => 'status_extra',
301 'relationship' => 'none',
302 ),
303 'tid' => array(
304 'operator' => 'and',
305 'value' => array(
306 '1856' => '1856',
307 ),
308 'group' => '0',
309 'exposed' => FALSE,
310 'expose' => array(
311 'operator' => FALSE,
312 'label' => '',
313 ),
314 'type' => 'select',
315 'vid' => '1',
316 'id' => 'tid',
317 'table' => 'term_node',
318 'field' => 'tid',
319 'hierarchy' => 0,
320 'override' => array(
321 'button' => 'Override',
322 ),
323 'relationship' => 'none',
324 'reduce_duplicates' => 0,
325 ),
326 ));
327 $handler->override_option('access', array(
328 'type' => 'none',
329 ));
330 $handler->override_option('title', 'Security public service announcements');
331 $handler->override_option('header', 'Security-related announcements, such as information on best practices. These posts by the Drupal security team are also sent to the security announcements e-mail list.');
332 $handler->override_option('header_format', '1');
333 $handler->override_option('header_empty', 1);
334 $handler->override_option('use_pager', '1');
335 $handler->override_option('row_plugin', 'node');
336 $handler->override_option('row_options', array(
337 'teaser' => 1,
338 'links' => 1,
339 'comments' => 0,
340 ));
341 $handler = $view->new_display('page', 'Page', 'page_1');
342 $handler->override_option('path', 'security/psa');
343 $handler->override_option('menu', array(
344 'type' => 'tab',
345 'title' => 'Public service anouncements',
346 'description' => '',
347 'weight' => '2',
348 'name' => 'navigation',
349 ));
350 $handler->override_option('tab_options', array(
351 'type' => 'normal',
352 'title' => 'Security-related public service announcements',
353 'description' => 'These posts by the Drupal security team are also sent to the security announcements e-mail list.',
354 'weight' => '0',
355 ));
356 $handler = $view->new_display('feed', 'Feed', 'feed_1');
357 $handler->override_option('style_plugin', 'rss');
358 $handler->override_option('style_options', array(
359 'mission_description' => FALSE,
360 'description' => '',
361 ));
362 $handler->override_option('row_plugin', 'node_rss');
363 $handler->override_option('row_options', array(
364 'item_length' => 'default',
365 ));
366 $handler->override_option('path', 'security/psa/rss.xml');
367 $handler->override_option('menu', array(
368 'type' => 'none',
369 'title' => '',
370 'description' => '',
371 'weight' => 0,
372 'name' => 'navigation',
373 ));
374 $handler->override_option('tab_options', array(
375 'type' => 'none',
376 'title' => '',
377 'description' => '',
378 'weight' => 0,
379 ));
380 $handler->override_option('displays', array(
381 'page_1' => 'page_1',
382 'default' => 0,
383 ));
384 $handler->override_option('sitename_title', FALSE);
385 $views[$view->name] = $view;
386
387 // ----------------------------------------
388 // The Drupal frontpage view.
389 // ----------------------------------------
390 $view = new view;
391 $view->name = 'drupalorg_frontpage';
392 $view->description = 'Posts from the frontpage vocabulary.';
393 $view->tag = '';
394 $view->base_table = 'node';
395 $view->is_cacheable = FALSE;
396 $view->api_version = 2;
397 $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
398 $handler = $view->new_display('default', 'Defaults', 'default');
399 $handler->override_option('sorts', array(
400 'created' => array(
401 'order' => 'DESC',
402 'granularity' => 'second',
403 'id' => 'created',
404 'table' => 'node',
405 'field' => 'created',
406 'relationship' => 'none',
407 ),
408 ));
409 $handler->override_option('arguments', array(
410 'tid' => array(
411 'default_action' => 'ignore',
412 'style_plugin' => 'default_summary',
413 'style_options' => array(),
414 'wildcard' => 'all',
415 'wildcard_substitution' => 'All',
416 'title' => 'Drupal.org front page for %1',
417 'default_argument_type' => 'fixed',
418 'default_argument' => '',
419 'validate_type' => 'taxonomy_term',
420 'validate_fail' => 'not found',
421 'break_phrase' => 0,
422 'add_table' => 0,
423 'require_value' => 0,
424 'reduce_duplicates' => 0,
425 'set_breadcrumb' => 0,
426 'id' => 'tid',
427 'table' => 'term_node',
428 'field' => 'tid',
429 'validate_user_argument_type' => 'uid',
430 'validate_user_roles' => array(),
431 'relationship' => 'none',
432 'default_options_div_prefix' => '',
433 'default_argument_user' => 0,
434 'default_argument_fixed' => '',
435 'validate_argument_node_type' => array(),
436 'validate_argument_node_access' => 0,
437 'validate_argument_nid_type' => 'nid',
438 'validate_argument_vocabulary' => array(
439 '34' => 34,
440 ),
441 'validate_argument_type' => 'tid',
442 'validate_user_restrict_roles' => 0,
443 'validate_argument_project_term_vocabulary' => array(),
444 'validate_argument_project_term_argument_type' => 'tid',
445 'validate_argument_project_term_argument_action_top_without' => 'pass',
446 'validate_argument_project_term_argument_action_top_with' => 'pass',
447 'validate_argument_project_term_argument_action_child' => 'pass',
448 ),
449 ));
450 $handler->override_option('filters', array(
451 'status' => array(
452 'operator' => '=',
453 'value' => '1',
454 'group' => '0',
455 'exposed' => FALSE,
456 'expose' => array(
457 'operator' => FALSE,
458 'label' => '',
459 ),
460 'id' => 'status',
461 'table' => 'node',
462 'field' => 'status',
463 'relationship' => 'none',
464 ),
465 'promote' => array(
466 'operator' => '=',
467 'value' => '1',
468 'group' => '0',
469 'exposed' => FALSE,
470 'expose' => array(
471 'operator' => FALSE,
472 'label' => '',
473 ),
474 'id' => 'promote',
475 'table' => 'node',
476 'field' => 'promote',
477 'relationship' => 'none',
478 ),
479 ));
480 $handler->override_option('access', array(
481 'type' => 'none',
482 ));
483 $handler->override_option('title', 'Drupal.org front page posts for Drupal planet');
484 $handler->override_option('empty', 'There are currently no posts in this category.');
485 $handler->override_option('empty_format', '1');
486 $handler->override_option('use_pager', '1');
487 $handler->override_option('row_plugin', 'node');
488 $handler->override_option('row_options', array(
489 'teaser' => 1,
490 'links' => 1,
491 'comments' => 0,
492 ));
493 $handler = $view->new_display('feed', 'Feed', 'feed_1');
494 $handler->override_option('style_plugin', 'rss');
495 $handler->override_option('style_options', array(
496 'mission_description' => FALSE,
497 'description' => '',
498 ));
499 $handler->override_option('row_plugin', 'node_rss');
500 $handler->override_option('row_options', array(
501 'item_length' => 'default',
502 ));
503 $handler->override_option('path', 'taxonomy/term/%/frontpage/feed');
504 $handler->override_option('menu', array(
505 'type' => 'none',
506 'title' => '',
507 'description' => '',
508 'weight' => 0,
509 'name' => 'navigation',
510 ));
511 $handler->override_option('tab_options', array(
512 'type' => 'none',
513 'title' => '',
514 'description' => '',
515 'weight' => 0,
516 ));
517 $handler->override_option('displays', array());
518 $handler->override_option('sitename_title', 0);
519 $handler = $view->new_display('page', 'Page', 'page_1');
520 $handler->override_option('path', 'taxonomy/term/%/frontpage');
521 $handler->override_option('menu', array(
522 'type' => 'none',
523 'title' => '',
524 'description' => '',
525 'weight' => 0,
526 'name' => 'navigation',
527 ));
528 $handler->override_option('tab_options', array(
529 'type' => 'none',
530 'title' => '',
531 'description' => '',
532 'weight' => 0,
533 ));
534 $views[$view->name] = $view;
535
536 return $views;
537 }
538

  ViewVC Help
Powered by ViewVC 1.1.2