Projet

Général

Profil

Paste
Télécharger (14,1 ko) Statistiques
| Branche: | Révision:

root / htmltest / sites / all / modules / views / modules / comment.views_default.inc @ 4543c6c7

1
<?php
2

    
3
/**
4
 * @file
5
 * Bulk export of views_default objects generated by Bulk export module.
6
 */
7

    
8
/**
9
 * Implementation of hook_views_default_views()
10
 */
11
function comment_views_default_views() {
12
  $views = array();
13

    
14
  $view = new view;
15
  $view->name = 'comments_recent';
16
  $view->description = 'Contains a block and a page to list recent comments; the block will automatically link to the page, which displays the comment body as well as a link to the node.';
17
  $view->tag = 'default';
18
  $view->base_table = 'comment';
19
  $view->human_name = 'Recent comments';
20
  $view->core = 0;
21
  $view->api_version = '3.0';
22
  $view->disabled = TRUE; /* Edit this to true to make a default view disabled initially */
23

    
24
  /* Display: Master */
25
  $handler = $view->new_display('default', 'Master', 'default');
26
  $handler->display->display_options['title'] = 'Recent comments';
27
  $handler->display->display_options['use_more'] = TRUE;
28
  $handler->display->display_options['access']['type'] = 'none';
29
  $handler->display->display_options['cache']['type'] = 'none';
30
  $handler->display->display_options['query']['type'] = 'views_query';
31
  $handler->display->display_options['query']['options']['query_comment'] = FALSE;
32
  $handler->display->display_options['exposed_form']['type'] = 'basic';
33
  $handler->display->display_options['pager']['type'] = 'some';
34
  $handler->display->display_options['pager']['options']['items_per_page'] = 5;
35
  $handler->display->display_options['style_plugin'] = 'list';
36
  $handler->display->display_options['row_plugin'] = 'fields';
37
  /* Relationship: Comment: Content */
38
  $handler->display->display_options['relationships']['nid']['id'] = 'nid';
39
  $handler->display->display_options['relationships']['nid']['table'] = 'comment';
40
  $handler->display->display_options['relationships']['nid']['field'] = 'nid';
41
  /* Field: Comment: Title */
42
  $handler->display->display_options['fields']['subject']['id'] = 'subject';
43
  $handler->display->display_options['fields']['subject']['table'] = 'comment';
44
  $handler->display->display_options['fields']['subject']['field'] = 'subject';
45
  $handler->display->display_options['fields']['subject']['label'] = '';
46
  $handler->display->display_options['fields']['subject']['link_to_comment'] = 1;
47
  /* Field: Comment: Updated date */
48
  $handler->display->display_options['fields']['timestamp']['id'] = 'timestamp';
49
  $handler->display->display_options['fields']['timestamp']['table'] = 'comment';
50
  $handler->display->display_options['fields']['timestamp']['field'] = 'changed';
51
  $handler->display->display_options['fields']['timestamp']['label'] = '';
52
  $handler->display->display_options['fields']['timestamp']['date_format'] = 'time ago';
53
  /* Sort criterion: Comment: Updated date */
54
  $handler->display->display_options['sorts']['timestamp']['id'] = 'timestamp';
55
  $handler->display->display_options['sorts']['timestamp']['table'] = 'comment';
56
  $handler->display->display_options['sorts']['timestamp']['field'] = 'changed';
57
  $handler->display->display_options['sorts']['timestamp']['order'] = 'DESC';
58
  /* Filter criterion: Content: Published or admin */
59
  $handler->display->display_options['filters']['status_extra']['id'] = 'status_extra';
60
  $handler->display->display_options['filters']['status_extra']['table'] = 'node';
61
  $handler->display->display_options['filters']['status_extra']['field'] = 'status_extra';
62
  $handler->display->display_options['filters']['status_extra']['relationship'] = 'nid';
63
  $handler->display->display_options['filters']['status_extra']['group'] = 0;
64

    
65
  /* Display: Page */
66
  $handler = $view->new_display('page', 'Page', 'page');
67
  $handler->display->display_options['defaults']['style_plugin'] = FALSE;
68
  $handler->display->display_options['style_plugin'] = 'list';
69
  $handler->display->display_options['defaults']['style_options'] = FALSE;
70
  $handler->display->display_options['defaults']['row_plugin'] = FALSE;
71
  $handler->display->display_options['row_plugin'] = 'fields';
72
  $handler->display->display_options['row_options']['inline'] = array(
73
    'title' => 'title',
74
    'timestamp' => 'timestamp',
75
  );
76
  $handler->display->display_options['row_options']['separator'] = '&nbsp;';
77
  $handler->display->display_options['defaults']['row_options'] = FALSE;
78
  $handler->display->display_options['defaults']['fields'] = FALSE;
79
  /* Field: Content: Title */
80
  $handler->display->display_options['fields']['title']['id'] = 'title';
81
  $handler->display->display_options['fields']['title']['table'] = 'node';
82
  $handler->display->display_options['fields']['title']['field'] = 'title';
83
  $handler->display->display_options['fields']['title']['relationship'] = 'nid';
84
  $handler->display->display_options['fields']['title']['label'] = 'Reply to';
85
  $handler->display->display_options['fields']['title']['link_to_node'] = 1;
86
  /* Field: Comment: Updated date */
87
  $handler->display->display_options['fields']['timestamp']['id'] = 'timestamp';
88
  $handler->display->display_options['fields']['timestamp']['table'] = 'comment';
89
  $handler->display->display_options['fields']['timestamp']['field'] = 'changed';
90
  $handler->display->display_options['fields']['timestamp']['label'] = '';
91
  $handler->display->display_options['fields']['timestamp']['date_format'] = 'time ago';
92
  /* Field: Comment: Title */
93
  $handler->display->display_options['fields']['subject']['id'] = 'subject';
94
  $handler->display->display_options['fields']['subject']['table'] = 'comment';
95
  $handler->display->display_options['fields']['subject']['field'] = 'subject';
96
  $handler->display->display_options['fields']['subject']['label'] = '';
97
  $handler->display->display_options['fields']['subject']['link_to_comment'] = 1;
98
  /* Field: Comment: Comment */
99
  $handler->display->display_options['fields']['comment']['id'] = 'comment';
100
  $handler->display->display_options['fields']['comment']['table'] = 'field_data_comment_body';
101
  $handler->display->display_options['fields']['comment']['field'] = 'comment_body';
102
  $handler->display->display_options['fields']['comment']['label'] = '';
103
  $handler->display->display_options['path'] = 'comments/recent';
104

    
105
  /* Display: Block */
106
  $handler = $view->new_display('block', 'Block', 'block');
107
  $translatables['comments_recent'] = array(
108
    t('Master'),
109
    t('Recent comments'),
110
    t('more'),
111
    t('Apply'),
112
    t('Reset'),
113
    t('Sort by'),
114
    t('Asc'),
115
    t('Desc'),
116
    t('Content'),
117
    t('Page'),
118
    t('Reply to'),
119
    t('Block'),
120
  );
121

    
122
  $views['comments_recent'] = $view;
123

    
124
  $view = new view;
125
  $view->name = 'tracker';
126
  $view->description = 'Shows all new activity on system.';
127
  $view->tag = 'default';
128
  $view->base_table = 'node';
129
  $view->human_name = 'Tracker';
130
  $view->core = 0;
131
  $view->api_version = '3.0';
132
  $view->disabled = TRUE; /* Edit this to true to make a default view disabled initially */
133

    
134
  /* Display: Master */
135
  $handler = $view->new_display('default', 'Master', 'default');
136
  $handler->display->display_options['title'] = 'Recent posts';
137
  $handler->display->display_options['access']['type'] = 'none';
138
  $handler->display->display_options['cache']['type'] = 'none';
139
  $handler->display->display_options['query']['type'] = 'views_query';
140
  $handler->display->display_options['query']['options']['query_comment'] = FALSE;
141
  $handler->display->display_options['exposed_form']['type'] = 'basic';
142
  $handler->display->display_options['pager']['type'] = 'full';
143
  $handler->display->display_options['pager']['options']['items_per_page'] = '25';
144
  $handler->display->display_options['style_plugin'] = 'table';
145
  $handler->display->display_options['style_options']['columns'] = array(
146
    'type' => 'type',
147
    'title' => 'title',
148
    'name' => 'name',
149
    'comment_count' => 'comment_count',
150
    'last_comment_timestamp' => 'last_comment_timestamp',
151
    'timestamp' => 'title',
152
    'new_comments' => 'comment_count',
153
  );
154
  $handler->display->display_options['style_options']['default'] = 'last_comment_timestamp';
155
  $handler->display->display_options['style_options']['info'] = array(
156
    'type' => array(
157
      'sortable' => 1,
158
      'separator' => '',
159
    ),
160
    'title' => array(
161
      'sortable' => 1,
162
      'separator' => '&nbsp;',
163
    ),
164
    'name' => array(
165
      'sortable' => 1,
166
      'separator' => '',
167
    ),
168
    'comment_count' => array(
169
      'sortable' => 1,
170
      'separator' => '<br />',
171
    ),
172
    'last_comment_timestamp' => array(
173
      'sortable' => 1,
174
      'separator' => '&nbsp;',
175
    ),
176
    'timestamp' => array(
177
      'separator' => '',
178
    ),
179
    'new_comments' => array(
180
      'separator' => '',
181
    ),
182
  );
183
  $handler->display->display_options['style_options']['override'] = 1;
184
  $handler->display->display_options['style_options']['order'] = 'desc';
185
  /* Relationship: Content: Author */
186
  $handler->display->display_options['relationships']['uid']['id'] = 'uid';
187
  $handler->display->display_options['relationships']['uid']['table'] = 'node';
188
  $handler->display->display_options['relationships']['uid']['field'] = 'uid';
189
  /* Field: Content: Type */
190
  $handler->display->display_options['fields']['type']['id'] = 'type';
191
  $handler->display->display_options['fields']['type']['table'] = 'node';
192
  $handler->display->display_options['fields']['type']['field'] = 'type';
193
  /* Field: Content: Title */
194
  $handler->display->display_options['fields']['title']['id'] = 'title';
195
  $handler->display->display_options['fields']['title']['table'] = 'node';
196
  $handler->display->display_options['fields']['title']['field'] = 'title';
197
  /* Field: User: Name */
198
  $handler->display->display_options['fields']['name']['id'] = 'name';
199
  $handler->display->display_options['fields']['name']['table'] = 'users';
200
  $handler->display->display_options['fields']['name']['field'] = 'name';
201
  $handler->display->display_options['fields']['name']['relationship'] = 'uid';
202
  $handler->display->display_options['fields']['name']['label'] = 'Author';
203
  /* Field: Content: Comment count */
204
  $handler->display->display_options['fields']['comment_count']['id'] = 'comment_count';
205
  $handler->display->display_options['fields']['comment_count']['table'] = 'node_comment_statistics';
206
  $handler->display->display_options['fields']['comment_count']['field'] = 'comment_count';
207
  $handler->display->display_options['fields']['comment_count']['label'] = 'Replies';
208
  /* Field: Content: Last comment time */
209
  $handler->display->display_options['fields']['last_comment_timestamp']['id'] = 'last_comment_timestamp';
210
  $handler->display->display_options['fields']['last_comment_timestamp']['table'] = 'node_comment_statistics';
211
  $handler->display->display_options['fields']['last_comment_timestamp']['field'] = 'last_comment_timestamp';
212
  $handler->display->display_options['fields']['last_comment_timestamp']['label'] = 'Last Post';
213
  /* Field: Content: Has new content */
214
  $handler->display->display_options['fields']['timestamp']['id'] = 'timestamp';
215
  $handler->display->display_options['fields']['timestamp']['table'] = 'history';
216
  $handler->display->display_options['fields']['timestamp']['field'] = 'timestamp';
217
  $handler->display->display_options['fields']['timestamp']['label'] = '';
218
  $handler->display->display_options['fields']['timestamp']['link_to_node'] = 0;
219
  $handler->display->display_options['fields']['timestamp']['comments'] = 1;
220
  /* Field: Content: New comments */
221
  $handler->display->display_options['fields']['new_comments']['id'] = 'new_comments';
222
  $handler->display->display_options['fields']['new_comments']['table'] = 'node';
223
  $handler->display->display_options['fields']['new_comments']['field'] = 'new_comments';
224
  $handler->display->display_options['fields']['new_comments']['label'] = '';
225
  $handler->display->display_options['fields']['new_comments']['hide_empty'] = TRUE;
226
  $handler->display->display_options['fields']['new_comments']['suffix'] = ' new';
227
  $handler->display->display_options['fields']['new_comments']['link_to_comment'] = 1;
228
  /* Sort criterion: Content: Last comment time */
229
  $handler->display->display_options['sorts']['last_comment_timestamp']['id'] = 'last_comment_timestamp';
230
  $handler->display->display_options['sorts']['last_comment_timestamp']['table'] = 'node_comment_statistics';
231
  $handler->display->display_options['sorts']['last_comment_timestamp']['field'] = 'last_comment_timestamp';
232
  /* Contextual filter: Content: User posted or commented */
233
  $handler->display->display_options['arguments']['uid_touch']['id'] = 'uid_touch';
234
  $handler->display->display_options['arguments']['uid_touch']['table'] = 'node';
235
  $handler->display->display_options['arguments']['uid_touch']['field'] = 'uid_touch';
236
  $handler->display->display_options['arguments']['uid_touch']['exception']['title_enable'] = 1;
237
  $handler->display->display_options['arguments']['uid_touch']['title_enable'] = 1;
238
  $handler->display->display_options['arguments']['uid_touch']['title'] = 'Recent posts for %1';
239
  $handler->display->display_options['arguments']['uid_touch']['default_argument_type'] = 'fixed';
240
  $handler->display->display_options['arguments']['uid_touch']['summary']['format'] = 'default_summary';
241
  $handler->display->display_options['arguments']['uid_touch']['specify_validation'] = 1;
242
  /* Filter criterion: Content: Published */
243
  $handler->display->display_options['filters']['status']['id'] = 'status';
244
  $handler->display->display_options['filters']['status']['table'] = 'node';
245
  $handler->display->display_options['filters']['status']['field'] = 'status';
246
  $handler->display->display_options['filters']['status']['value'] = '1';
247
  $handler->display->display_options['filters']['status']['group'] = 0;
248
  $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
249

    
250
  /* Display: Page */
251
  $handler = $view->new_display('page', 'Page', 'page');
252
  $handler->display->display_options['path'] = 'tracker';
253
  $handler->display->display_options['menu']['type'] = 'normal';
254
  $handler->display->display_options['menu']['title'] = 'Recent posts';
255
  $translatables['tracker'] = array(
256
    t('Master'),
257
    t('Recent posts'),
258
    t('more'),
259
    t('Apply'),
260
    t('Reset'),
261
    t('Sort by'),
262
    t('Asc'),
263
    t('Desc'),
264
    t('Items per page'),
265
    t('- All -'),
266
    t('Offset'),
267
    t('Type'),
268
    t('Title'),
269
    t('Author'),
270
    t('Replies'),
271
    t('.'),
272
    t(','),
273
    t('Last Post'),
274
    t(' new'),
275
    t('All'),
276
    t('Recent posts for %1'),
277
    t('Page'),
278
  );
279

    
280
  $views['tracker'] = $view;
281

    
282
  return $views;
283
}