/[drupal]/contributions/modules/acidfree/views_acidfree.inc
ViewVC logotype

Contents of /contributions/modules/acidfree/views_acidfree.inc

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


Revision 1.4 - (show annotations) (download) (as text)
Mon Jan 22 15:15:01 2007 UTC (2 years, 10 months ago) by vhmauery
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-5, DRUPAL-6--1
Changes since 1.3: +3 -6 lines
File MIME type: text/x-php
#101882 - Unneeded settings for number of rows and columns
1 <?php
2 // $Id: views_acidfree.inc 421 2007-01-22 15:14:37Z vhmauery $
3
4 /**
5 * This include file implements views functionality on behalf of acidfree.module
6 */
7
8 function acidfree_views_default_views() {
9 $acidfree_vocab_id = variable_get('acidfree_vocab_id', 0);
10 $node_count = variable_get('acidfree_num_thumbs', 15);
11 /* album grid view */
12 $view = new stdClass();
13 $view->name = 'album_grid_view';
14 $view->disabled = false;
15 $view->page = true;
16 $view->page_title = t('Album grid');
17 $view->description = t('Provides a grid view of items in an album');
18 $view->access = array (
19 );
20 $view->view_args_php = '';
21 if ($node_count > 0) {
22 $view->use_pager = true;
23 $view->nodes_per_page = $node_count;
24 }
25 $view->sort = array (
26 array (
27 'tablename' => 'node',
28 'field' => 'sticky',
29 'sortorder' => 'DESC',
30 'options' => '',
31 ),
32 array (
33 'tablename' => 'node',
34 'field' => 'nid',
35 'sortorder' => 'DESC',
36 'options' => '',
37 ),
38 );
39 $view->argument = array (
40 array (
41 'type' => 'taxid',
42 'argdefault' => '1',
43 'title' => '',
44 'options' => '',
45 'wildcard' => '',
46 'wildcard_substitution' => '',
47 ),
48 );
49 $view->field = array (
50 );
51 $view->filter = array (
52 array (
53 'tablename' => 'term_data',
54 'field' => 'vid',
55 'operator' => 'OR',
56 'options' => '',
57 'value' => array($acidfree_vocab_id),
58 ),
59 array (
60 'tablename' => 'node',
61 'field' => 'distinct',
62 'operator' => '=',
63 'options' => '',
64 'value' => array (
65 ),
66 ),
67 array (
68 'tablename' => 'node',
69 'field' => 'status',
70 'operator' => '=',
71 'options' => '',
72 'value' => '1',
73 ),
74 );
75 $view->exposed_filter = array (
76 array (
77 'tablename' => 'term_data',
78 'field' => 'vid',
79 'label' => '',
80 'optional' => 0,
81 'is_default' => 0,
82 'operator' => 0,
83 'single' => 0,
84 ),
85 array (
86 'tablename' => 'node',
87 'field' => 'distinct',
88 'label' => '',
89 'optional' => 0,
90 'is_default' => 0,
91 'operator' => 0,
92 'single' => 0,
93 ),
94 array (
95 'tablename' => 'node',
96 'field' => 'status',
97 'operator' => '=',
98 'options' => '',
99 'value' => '1',
100 ),
101 );
102 $view->requires = array(node, term_data);
103 $views[$view->name] = $view;
104
105 /* album list view */
106 $view = new stdClass();
107 $view->name = 'album_list_view';
108 $view->disabled = false;
109 $view->page = true;
110 $view->page_title = t('Album list');
111 $view->description = 'Provides a list view of items in an album';
112 if (isset($node_count)) {
113 $view->use_pager = true;
114 $view->nodes_per_page = $node_count;
115 }
116 $view->access = array (
117 );
118 $view->view_args_php = '';
119 $view->sort = array (
120 array (
121 'tablename' => 'node',
122 'field' => 'sticky',
123 'sortorder' => 'DESC',
124 'options' => '',
125 ),
126 array (
127 'tablename' => 'node',
128 'field' => 'nid',
129 'sortorder' => 'DESC',
130 'options' => '',
131 ),
132 );
133 $view->argument = array (
134 array (
135 'type' => 'taxid',
136 'argdefault' => '1',
137 'title' => '',
138 'options' => '',
139 'wildcard' => '',
140 'wildcard_substitution' => '',
141 ),
142 );
143 $view->field = array (
144 );
145 $view->filter = array (
146 array (
147 'tablename' => 'term_data',
148 'field' => 'vid',
149 'operator' => 'OR',
150 'options' => '',
151 'value' => array($acidfree_vocab_id),
152 ),
153 array (
154 'tablename' => 'node',
155 'field' => 'distinct',
156 'operator' => '=',
157 'options' => '',
158 'value' => array (
159 ),
160 ),
161 );
162 $view->exposed_filter = array (
163 array (
164 'tablename' => 'term_data',
165 'field' => 'vid',
166 'label' => '',
167 'optional' => 0,
168 'is_default' => 0,
169 'operator' => 0,
170 'single' => 0,
171 ),
172 array (
173 'tablename' => 'node',
174 'field' => 'distinct',
175 'label' => '',
176 'optional' => 0,
177 'is_default' => 0,
178 'operator' => 0,
179 'single' => 0,
180 ),
181 );
182 $view->requires = array(node, term_data);
183 $views[$view->name] = $view;
184 return $views;
185 }

  ViewVC Help
Powered by ViewVC 1.1.2