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

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

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


Revision 1.1 - (show annotations) (download) (as text)
Mon Apr 6 02:16:31 2009 UTC (7 months, 3 weeks ago) by icecreamyou
Branch: MAIN
CVS Tags: DRUPAL-6--2-0-ALPHA2, DRUPAL-6--2-0-ALPHA1, HEAD
Branch point for: DRUPAL-6--2
File MIME type: text/x-php
Much improved Views integration!
1 /**
2 * Implementation of hook_views_default_views().
3 */
4 function facebook_status_views_default_views() {
5 $view = new view;
6 $view->name = 'facebook_status';
7 $view->description = t('Facebook-style Statuses');
8 $view->tag = 'facebook_status';
9 $view->view_php = '';
10 $view->base_table = 'users';
11 $view->is_cacheable = FALSE;
12 $view->api_version = 2;
13 $view->disabled = FALSE;
14 $handler = $view->new_display('default', 'Statuses', 'default');
15 $handler->override_option('fields', array(
16 'name' => array(
17 'label' => '',
18 'alter' => array(
19 'alter_text' => 0,
20 'text' => '',
21 'make_link' => 0,
22 'path' => '',
23 'alt' => '',
24 'prefix' => '',
25 'suffix' => '',
26 'help' => '',
27 'trim' => 0,
28 'max_length' => '',
29 'word_boundary' => 1,
30 'ellipsis' => 1,
31 'html' => 0,
32 ),
33 'link_to_user' => 1,
34 'overwrite_anonymous' => 0,
35 'anonymous_text' => '',
36 'exclude' => 1,
37 'id' => 'name',
38 'table' => 'users',
39 'field' => 'name',
40 'relationship' => 'none',
41 ),
42 'status' => array(
43 'label' => t('Status'),
44 'alter' => array(
45 'alter_text' => 1,
46 'text' => '[name] [status]',
47 'make_link' => 0,
48 'path' => '',
49 'alt' => '',
50 'prefix' => '',
51 'suffix' => '',
52 'help' => '',
53 'trim' => 0,
54 'max_length' => '',
55 'word_boundary' => 1,
56 'ellipsis' => 1,
57 'html' => 0,
58 ),
59 'exclude' => 0,
60 'id' => 'status',
61 'table' => 'facebook_status',
62 'field' => 'status',
63 'relationship' => 'none',
64 'override' => array(
65 'button' => 'Override',
66 ),
67 ),
68 'status_time' => array(
69 'label' => t('Posted'),
70 'alter' => array(
71 'alter_text' => 0,
72 'text' => '',
73 'make_link' => 0,
74 'path' => '',
75 'alt' => '',
76 'prefix' => '',
77 'suffix' => '',
78 'help' => '',
79 'trim' => 0,
80 'max_length' => '',
81 'word_boundary' => 1,
82 'ellipsis' => 1,
83 'html' => 0,
84 ),
85 'date_format' => 'time ago',
86 'custom_date_format' => '1',
87 'exclude' => 0,
88 'id' => 'status_time',
89 'table' => 'facebook_status',
90 'field' => 'status_time',
91 'relationship' => 'none',
92 ),
93 ));
94 $handler->override_option('sorts', array(
95 'sid' => array(
96 'order' => 'DESC',
97 'id' => 'sid',
98 'table' => 'facebook_status',
99 'field' => 'sid',
100 'relationship' => 'none',
101 ),
102 ));
103 $handler->override_option('arguments', array(
104 'name' => array(
105 'default_action' => 'ignore',
106 'style_plugin' => 'default_summary',
107 'style_options' => array(),
108 'wildcard' => 'all',
109 'wildcard_substitution' => 'All',
110 'title' => t("%1's Statuses"),
111 'default_argument_type' => 'fixed',
112 'default_argument' => '',
113 'validate_type' => 'none',
114 'validate_fail' => 'not found',
115 'glossary' => 0,
116 'limit' => '0',
117 'case' => 'none',
118 'path_case' => 'none',
119 'transform_dash' => 1,
120 'id' => 'name',
121 'table' => 'users',
122 'field' => 'name',
123 'relationship' => 'none',
124 'default_options_div_prefix' => '',
125 'default_argument_user' => 0,
126 'default_argument_fixed' => '',
127 'default_argument_php' => '',
128 'validate_argument_node_type' => array(
129 'image' => 0,
130 'feed' => 0,
131 'news' => 0,
132 'page' => 0,
133 ),
134 'validate_argument_node_access' => 0,
135 'validate_argument_nid_type' => 'nid',
136 'validate_argument_vocabulary' => array(
137 '3' => 0,
138 '2' => 0,
139 ),
140 'validate_argument_type' => 'tid',
141 'user_argument_type' => 'either',
142 'restrict_user_roles' => 0,
143 'user_roles' => array(
144 '2' => '2',
145 ),
146 'validate_argument_php' => '',
147 ),
148 ));
149 $handler->override_option('filters', array(
150 'status' => array(
151 'operator' => '!=',
152 'value' => '',
153 'group' => '0',
154 'exposed' => FALSE,
155 'expose' => array(
156 'operator' => FALSE,
157 'label' => '',
158 ),
159 'case' => 1,
160 'id' => 'status',
161 'table' => 'facebook_status',
162 'field' => 'status',
163 'relationship' => 'none',
164 ),
165 ));
166 $handler->override_option('access', array(
167 'type' => 'perm',
168 'perm' => 'view all statuses',
169 ));
170 $handler->override_option('title', t('Statuses'));
171 $handler->override_option('empty', t('No relevant statuses were found.'));
172 $handler->override_option('empty_format', '5');
173 $handler->override_option('use_ajax', TRUE);
174 $handler->override_option('use_pager', '1');
175 $handler->override_option('distinct', 1);
176 $handler->override_option('style_plugin', 'table');
177 $handler->override_option('style_options', array(
178 'grouping' => '',
179 'override' => 1,
180 'sticky' => 1,
181 'order' => 'desc',
182 'columns' => array(
183 'name' => 'name',
184 'uid' => 'uid',
185 'status' => 'status',
186 ),
187 'info' => array(
188 'name' => array(
189 'sortable' => 0,
190 'separator' => '',
191 ),
192 'uid' => array(
193 'sortable' => 0,
194 'separator' => '',
195 ),
196 'status' => array(
197 'sortable' => 0,
198 'separator' => '',
199 ),
200 ),
201 'default' => '-1',
202 ));
203 $handler = $view->new_display('page', 'Page', 'page_1');
204 $handler->override_option('path', 'user/%/status');
205 $handler->override_option('menu', array(
206 'type' => 'none',
207 'title' => '',
208 'description' => '',
209 'weight' => 0,
210 'name' => 'navigation',
211 ));
212 $handler->override_option('tab_options', array(
213 'type' => 'none',
214 'title' => '',
215 'description' => '',
216 'weight' => 0,
217 ));
218 $handler = $view->new_display('block', 'Block', 'block_1');
219 $handler->override_option('fields', array(
220 'name' => array(
221 'label' => '',
222 'alter' => array(
223 'alter_text' => 0,
224 'text' => '',
225 'make_link' => 0,
226 'path' => '',
227 'alt' => '',
228 'prefix' => '',
229 'suffix' => '',
230 'help' => '',
231 'trim' => 0,
232 'max_length' => '',
233 'word_boundary' => 1,
234 'ellipsis' => 1,
235 'html' => 0,
236 ),
237 'link_to_user' => 1,
238 'overwrite_anonymous' => 0,
239 'anonymous_text' => '',
240 'exclude' => 1,
241 'id' => 'name',
242 'table' => 'users',
243 'field' => 'name',
244 'relationship' => 'none',
245 ),
246 'status' => array(
247 'label' => t('Status'),
248 'alter' => array(
249 'alter_text' => 0,
250 'text' => '[name] [status]',
251 'make_link' => 0,
252 'path' => '',
253 'alt' => '',
254 'prefix' => '',
255 'suffix' => '',
256 'help' => '',
257 'trim' => 1,
258 'max_length' => '25',
259 'word_boundary' => 1,
260 'ellipsis' => 1,
261 'html' => 0,
262 ),
263 'exclude' => 1,
264 'id' => 'status',
265 'table' => 'facebook_status',
266 'field' => 'status',
267 'relationship' => 'none',
268 'override' => array(
269 'button' => 'Use default',
270 ),
271 ),
272 'status_time' => array(
273 'label' => '',
274 'alter' => array(
275 'alter_text' => 1,
276 'text' => '[name] [status] <em>[status_time]</em>',
277 'make_link' => 0,
278 'path' => '',
279 'alt' => '',
280 'prefix' => '',
281 'suffix' => '',
282 'help' => '',
283 'trim' => 0,
284 'max_length' => '',
285 'word_boundary' => 1,
286 'ellipsis' => 1,
287 'html' => 0,
288 ),
289 'date_format' => 'time ago',
290 'custom_date_format' => '1',
291 'exclude' => 0,
292 'id' => 'status_time',
293 'table' => 'facebook_status',
294 'field' => 'status_time',
295 'relationship' => 'none',
296 'override' => array(
297 'button' => 'Use default',
298 ),
299 ),
300 ));
301 $handler->override_option('items_per_page', 5);
302 $handler->override_option('use_pager', '0');
303 $handler->override_option('use_more', 1);
304 $handler->override_option('style_plugin', 'list');
305 $handler->override_option('style_options', array());
306 $handler->override_option('row_options', array(
307 'inline' => array(
308 'name' => 'name',
309 'status' => 'status',
310 ),
311 'separator' => ' ',
312 ));
313 $handler->override_option('block_description', t('Facebook-style Statuses List'));
314 $handler->override_option('block_caching', -1);
315 }

  ViewVC Help
Powered by ViewVC 1.1.2