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

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

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


Revision 1.4 - (show annotations) (download) (as text)
Sat Aug 1 16:20:08 2009 UTC (3 months, 3 weeks ago) by drewish
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -2 lines
File MIME type: text/x-php
#537350 by JaredAM: Copyright not output to channel.
1 <?php
2 // $Id: itunes.views_default.inc,v 1.3 2009/07/31 23:18:51 drewish Exp $
3
4 /**
5 * @file
6 * Default iTunes view.
7 */
8 /**
9 * Implementation of hook_views_default_views().
10 */
11 function itunes_views_default_views() {
12 $itunes_types = array();
13 foreach (variable_get('itunes_types', array('audio')) as $type) {
14 $itunes_types[$type] = $type;
15 }
16
17 /*
18 * View 'itunes'
19 */
20 $view = new view;
21 $view->name = 'itunes';
22 $view->description = 'A demo feed for the iTunes module. You can either enable this and modify it to suit your needs or, if you don\'t like the name, clone it and make your changes that way.';
23 $view->tag = 'iTunes';
24 $view->view_php = '';
25 $view->base_table = 'node';
26 $view->is_cacheable = FALSE;
27 $view->api_version = 2;
28 $view->disabled = TRUE; /* Edit this to true to make a default view disabled initially */
29 $handler = $view->new_display('default', 'Defaults', 'default');
30 $handler->override_option('filters', array(
31 'type' => array(
32 'operator' => 'in',
33 'value' => $itunes_types,
34 'group' => '0',
35 'exposed' => FALSE,
36 'expose' => array(
37 'operator' => FALSE,
38 'label' => '',
39 ),
40 'id' => 'type',
41 'table' => 'node',
42 'field' => 'type',
43 'relationship' => 'none',
44 ),
45 ));
46 $handler->override_option('access', array(
47 'type' => 'none',
48 ));
49 $handler->override_option('row_plugin', 'node');
50 $handler->override_option('row_options', array(
51 'teaser' => 1,
52 'links' => 1,
53 'comments' => 0,
54 ));
55 $handler = $view->new_display('feed', 'Feed', 'feed_1');
56 $handler->override_option('style_plugin', 'itunes_rss');
57 $handler->override_option('style_options', array(
58 'mission_description' => FALSE,
59 'description' => '',
60 'subtitle' => '',
61 'summary' => '',
62 'author' => '',
63 'copyright' => '',
64 'image_url' => '',
65 'explicit' => '0',
66 'block' => 0,
67 'owner_name' => '',
68 'owner_email' => '',
69 'categories' => array(
70 '0' => '',
71 '1' => '',
72 '2' => '',
73 ),
74 ));
75 $handler->override_option('row_plugin', 'node_rss');
76 $handler->override_option('row_options', array(
77 'item_length' => 'default',
78 ));
79 $handler->override_option('path', 'itunes/feed');
80 $handler->override_option('menu', array(
81 'type' => 'none',
82 'title' => '',
83 'description' => '',
84 'weight' => 0,
85 'name' => 'navigation',
86 ));
87 $handler->override_option('tab_options', array(
88 'type' => 'none',
89 'title' => '',
90 'description' => '',
91 'weight' => 0,
92 ));
93 $handler->override_option('displays', array(
94 'default' => 'default',
95 'page_1' => 'page_1',
96 ));
97 $handler->override_option('sitename_title', FALSE);
98 $handler = $view->new_display('page', 'Page', 'page_1');
99 $handler->override_option('title', 'iTunes');
100 $handler->override_option('path', 'itunes/feed');
101 $handler->override_option('menu', array(
102 'type' => 'none',
103 'title' => '',
104 'description' => '',
105 'weight' => 0,
106 'name' => 'navigation',
107 ));
108 $handler->override_option('tab_options', array(
109 'type' => 'none',
110 'title' => '',
111 'description' => '',
112 'weight' => 0,
113 ));
114 $views[$view->name] = $view;
115
116 return $views;
117 }

  ViewVC Help
Powered by ViewVC 1.1.2