Skip to content

Instantly share code, notes, and snippets.

@webchick
Created September 6, 2013 23:02
Show Gist options
  • Save webchick/6471161 to your computer and use it in GitHub Desktop.
Save webchick/6471161 to your computer and use it in GitHub Desktop.
View to sort through d.o brainstorming results.
$view = new view;
$view->name = 'temp_do_brainstorm';
$view->description = '';
$view->tag = '';
$view->base_table = 'node';
$view->core = 6;
$view->api_version = '2';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('relationships', array(
'votingapi_cache' => array(
'id' => 'votingapi_cache',
'table' => 'node',
'field' => 'votingapi_cache',
),
));
$handler->override_option('fields', array(
'title' => array(
'id' => 'title',
'table' => 'node',
'field' => 'title',
),
));
$handler->override_option('sorts', array(
'value' => array(
'id' => 'value',
'table' => 'votingapi_cache',
'field' => 'value',
'relationship' => 'votingapi_cache',
),
));
$handler->override_option('filters', array(
'group_nid' => array(
'id' => 'group_nid',
'table' => 'og_ancestry',
'field' => 'group_nid',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('cache', array(
'type' => 'none',
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('relationships', array(
'votingapi_cache' => array(
'label' => 'Vote results',
'required' => 0,
'votingapi' => array(
'value_type' => 'points',
'tag' => '',
'function' => 'sum',
),
'id' => 'votingapi_cache',
'table' => 'node',
'field' => 'votingapi_cache',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
'term_node_tid' => array(
'label' => 'term',
'required' => 0,
'vids' => array(
888 => 888,
873 => 0,
528 => 0,
518 => 0,
101 => 0,
261 => 0,
60 => 0,
262 => 0,
32 => 0,
18 => 0,
115 => 0,
1 => 0,
99 => 0,
19 => 0,
644 => 0,
75 => 0,
20 => 0,
92 => 0,
8 => 0,
290 => 0,
813 => 0,
508 => 0,
197 => 0,
734 => 0,
26 => 0,
90 => 0,
669 => 0,
129 => 0,
157 => 0,
828 => 0,
843 => 0,
267 => 0,
260 => 0,
5 => 0,
803 => 0,
768 => 0,
116 => 0,
130 => 0,
191 => 0,
201 => 0,
714 => 0,
207 => 0,
150 => 0,
413 => 0,
302 => 0,
9 => 0,
7 => 0,
128 => 0,
35 => 0,
868 => 0,
63 => 0,
578 => 0,
468 => 0,
111 => 0,
46 => 0,
241 => 0,
346 => 0,
144 => 0,
70 => 0,
237 => 0,
568 => 0,
674 => 0,
719 => 0,
280 => 0,
286 => 0,
136 => 0,
453 => 0,
34 => 0,
21 => 0,
93 => 0,
76 => 0,
167 => 0,
818 => 0,
50 => 0,
498 => 0,
102 => 0,
664 => 0,
91 => 0,
393 => 0,
141 => 0,
248 => 0,
114 => 0,
49 => 0,
689 => 0,
613 => 0,
543 => 0,
684 => 0,
749 => 0,
538 => 0,
350 => 0,
356 => 0,
573 => 0,
195 => 0,
250 => 0,
154 => 0,
172 => 0,
83 => 0,
16 => 0,
306 => 0,
142 => 0,
217 => 0,
226 => 0,
548 => 0,
3 => 0,
294 => 0,
618 => 0,
623 => 0,
28 => 0,
230 => 0,
155 => 0,
215 => 0,
71 => 0,
628 => 0,
117 => 0,
282 => 0,
120 => 0,
36 => 0,
463 => 0,
388 => 0,
4 => 0,
133 => 0,
418 => 0,
121 => 0,
94 => 0,
43 => 0,
853 => 0,
140 => 0,
563 => 0,
833 => 0,
100 => 0,
332 => 0,
784 => 0,
225 => 0,
12 => 0,
320 => 0,
214 => 0,
252 => 0,
288 => 0,
312 => 0,
281 => 0,
10 => 0,
185 => 0,
119 => 0,
15 => 0,
86 => 0,
383 => 0,
428 => 0,
13 => 0,
239 => 0,
233 => 0,
52 => 0,
56 => 0,
108 => 0,
134 => 0,
148 => 0,
82 => 0,
47 => 0,
95 => 0,
352 => 0,
598 => 0,
649 => 0,
23 => 0,
204 => 0,
68 => 0,
73 => 0,
176 => 0,
558 => 0,
310 => 0,
448 => 0,
202 => 0,
221 => 0,
304 => 0,
2 => 0,
634 => 0,
378 => 0,
33 => 0,
72 => 0,
639 => 0,
659 => 0,
729 => 0,
279 => 0,
174 => 0,
178 => 0,
17 => 0,
633 => 0,
54 => 0,
138 => 0,
654 => 0,
81 => 0,
403 => 0,
55 => 0,
42 => 0,
41 => 0,
793 => 0,
45 => 0,
103 => 0,
330 => 0,
773 => 0,
783 => 0,
798 => 0,
316 => 0,
322 => 0,
858 => 0,
109 => 0,
878 => 0,
135 => 0,
704 => 0,
493 => 0,
249 => 0,
287 => 0,
131 => 0,
57 => 0,
744 => 0,
324 => 0,
266 => 0,
64 => 0,
264 => 0,
272 => 0,
278 => 0,
44 => 0,
53 => 0,
58 => 0,
74 => 0,
85 => 0,
368 => 0,
143 => 0,
145 => 0,
147 => 0,
180 => 0,
188 => 0,
212 => 0,
223 => 0,
739 => 0,
263 => 0,
48 => 0,
61 => 0,
96 => 0,
159 => 0,
699 => 0,
709 => 0,
66 => 0,
270 => 0,
97 => 0,
298 => 0,
158 => 0,
348 => 0,
240 => 0,
137 => 0,
277 => 0,
206 => 0,
213 => 0,
238 => 0,
358 => 0,
246 => 0,
104 => 0,
247 => 0,
184 => 0,
199 => 0,
107 => 0,
754 => 0,
67 => 0,
27 => 0,
265 => 0,
334 => 0,
205 => 0,
259 => 0,
149 => 0,
127 => 0,
296 => 0,
443 => 0,
363 => 0,
583 => 0,
694 => 0,
112 => 0,
588 => 0,
228 => 0,
216 => 0,
778 => 0,
6 => 0,
113 => 0,
724 => 0,
255 => 0,
59 => 0,
98 => 0,
256 => 0,
523 => 0,
51 => 0,
593 => 0,
),
'id' => 'term_node_tid',
'table' => 'node',
'field' => 'term_node_tid',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
));
$handler->override_option('fields', array(
'title' => array(
'id' => 'title',
'table' => 'node',
'field' => 'title',
),
'value' => array(
'id' => 'value',
'table' => 'votingapi_cache',
'field' => 'value',
),
'tid' => array(
'label' => 'Difficulty',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'absolute' => 0,
'link_class' => '',
'alt' => '',
'rel' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'hide_alter_empty' => 1,
'type' => 'separator',
'separator' => ', ',
'link_to_taxonomy' => 1,
'limit' => 0,
'vids' => array(
873 => 0,
528 => 0,
518 => 0,
101 => 0,
261 => 0,
60 => 0,
262 => 0,
32 => 0,
18 => 0,
115 => 0,
1 => 0,
99 => 0,
19 => 0,
644 => 0,
75 => 0,
20 => 0,
92 => 0,
8 => 0,
290 => 0,
813 => 0,
508 => 0,
197 => 0,
734 => 0,
26 => 0,
90 => 0,
669 => 0,
129 => 0,
157 => 0,
828 => 0,
843 => 0,
267 => 0,
260 => 0,
5 => 0,
803 => 0,
768 => 0,
116 => 0,
130 => 0,
191 => 0,
201 => 0,
714 => 0,
207 => 0,
150 => 0,
413 => 0,
302 => 0,
9 => 0,
7 => 0,
128 => 0,
35 => 0,
868 => 0,
63 => 0,
578 => 0,
468 => 0,
111 => 0,
46 => 0,
241 => 0,
346 => 0,
144 => 0,
888 => 0,
70 => 0,
237 => 0,
568 => 0,
674 => 0,
719 => 0,
280 => 0,
286 => 0,
136 => 0,
453 => 0,
34 => 0,
21 => 0,
93 => 0,
76 => 0,
167 => 0,
818 => 0,
50 => 0,
498 => 0,
102 => 0,
664 => 0,
91 => 0,
393 => 0,
141 => 0,
248 => 0,
114 => 0,
49 => 0,
689 => 0,
613 => 0,
543 => 0,
684 => 0,
749 => 0,
538 => 0,
350 => 0,
356 => 0,
573 => 0,
195 => 0,
250 => 0,
154 => 0,
172 => 0,
83 => 0,
16 => 0,
306 => 0,
142 => 0,
217 => 0,
226 => 0,
548 => 0,
3 => 0,
294 => 0,
618 => 0,
623 => 0,
28 => 0,
230 => 0,
155 => 0,
215 => 0,
71 => 0,
628 => 0,
117 => 0,
282 => 0,
120 => 0,
36 => 0,
463 => 0,
388 => 0,
4 => 0,
133 => 0,
418 => 0,
121 => 0,
94 => 0,
43 => 0,
853 => 0,
140 => 0,
563 => 0,
833 => 0,
100 => 0,
332 => 0,
784 => 0,
225 => 0,
12 => 0,
320 => 0,
214 => 0,
252 => 0,
288 => 0,
312 => 0,
281 => 0,
10 => 0,
185 => 0,
119 => 0,
15 => 0,
86 => 0,
383 => 0,
428 => 0,
13 => 0,
239 => 0,
233 => 0,
52 => 0,
56 => 0,
108 => 0,
134 => 0,
148 => 0,
82 => 0,
47 => 0,
95 => 0,
352 => 0,
598 => 0,
649 => 0,
23 => 0,
204 => 0,
68 => 0,
73 => 0,
176 => 0,
558 => 0,
310 => 0,
448 => 0,
202 => 0,
221 => 0,
304 => 0,
2 => 0,
634 => 0,
378 => 0,
33 => 0,
72 => 0,
639 => 0,
659 => 0,
729 => 0,
279 => 0,
174 => 0,
178 => 0,
17 => 0,
633 => 0,
54 => 0,
138 => 0,
654 => 0,
81 => 0,
403 => 0,
55 => 0,
42 => 0,
41 => 0,
793 => 0,
45 => 0,
103 => 0,
330 => 0,
773 => 0,
783 => 0,
798 => 0,
316 => 0,
322 => 0,
858 => 0,
109 => 0,
878 => 0,
135 => 0,
704 => 0,
493 => 0,
249 => 0,
287 => 0,
131 => 0,
57 => 0,
744 => 0,
324 => 0,
266 => 0,
64 => 0,
264 => 0,
272 => 0,
278 => 0,
44 => 0,
53 => 0,
58 => 0,
74 => 0,
85 => 0,
368 => 0,
143 => 0,
145 => 0,
147 => 0,
180 => 0,
188 => 0,
212 => 0,
223 => 0,
739 => 0,
263 => 0,
48 => 0,
61 => 0,
96 => 0,
159 => 0,
699 => 0,
709 => 0,
66 => 0,
270 => 0,
97 => 0,
298 => 0,
158 => 0,
348 => 0,
240 => 0,
137 => 0,
277 => 0,
206 => 0,
213 => 0,
238 => 0,
358 => 0,
246 => 0,
104 => 0,
247 => 0,
184 => 0,
199 => 0,
107 => 0,
754 => 0,
67 => 0,
27 => 0,
265 => 0,
334 => 0,
205 => 0,
259 => 0,
149 => 0,
127 => 0,
296 => 0,
443 => 0,
363 => 0,
583 => 0,
694 => 0,
112 => 0,
588 => 0,
228 => 0,
216 => 0,
778 => 0,
6 => 0,
113 => 0,
724 => 0,
255 => 0,
59 => 0,
98 => 0,
256 => 0,
523 => 0,
51 => 0,
593 => 0,
),
'exclude' => 0,
'id' => 'tid',
'table' => 'term_node',
'field' => 'tid',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
'created' => array(
'label' => 'Created',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'absolute' => 0,
'link_class' => '',
'alt' => '',
'rel' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'hide_alter_empty' => 1,
'date_format' => 'small',
'custom_date_format' => '',
'exclude' => 0,
'id' => 'created',
'table' => 'node',
'field' => 'created',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
'comment_count' => array(
'label' => 'Comments',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'absolute' => 0,
'link_class' => '',
'alt' => '',
'rel' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'hide_alter_empty' => 1,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => ',',
'format_plural' => 0,
'format_plural_singular' => '1',
'format_plural_plural' => '@count',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'comment_count',
'table' => 'node_comment_statistics',
'field' => 'comment_count',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
));
$handler->override_option('sorts', array());
$handler->override_option('filters', array(
'group_nid' => array(
'operator' => 'or',
'value' => array(
312008 => '312008',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'group_nid',
'table' => 'og_ancestry',
'field' => 'group_nid',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'reduce_duplicates' => 1,
),
));
$handler->override_option('items_per_page', 0);
$handler->override_option('distinct', 1);
$handler->override_option('style_plugin', 'table');
$handler->override_option('style_options', array(
'grouping' => '',
'override' => 1,
'sticky' => 0,
'order' => 'desc',
'summary' => '',
'columns' => array(
'title' => 'title',
'value' => 'value',
'tid' => 'tid',
'created' => 'created',
'comment_count' => 'comment_count',
),
'info' => array(
'title' => array(
'sortable' => 1,
'separator' => '',
),
'value' => array(
'sortable' => 1,
'separator' => '',
),
'tid' => array(
'separator' => '',
),
'created' => array(
'sortable' => 1,
'separator' => '',
),
'comment_count' => array(
'sortable' => 1,
'separator' => '',
),
),
'default' => 'value',
));
$handler->override_option('path', 'temp_do_brainstorm');
$handler->override_option('menu', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment