1 |
85ad3d82
|
Assos Assos
|
<?php
|
2 |
|
|
|
3 |
|
|
/**
|
4 |
|
|
* @file
|
5 |
|
|
* Default views provided by the User Stats module.
|
6 |
|
|
*/
|
7 |
|
|
|
8 |
|
|
/**
|
9 |
|
|
* Implements hook_views_default_views().
|
10 |
|
|
*/
|
11 |
|
|
function user_stats_views_default_views() {
|
12 |
|
|
/*
|
13 |
|
|
* View 'user_stats_ips_by_user'
|
14 |
|
|
*/
|
15 |
|
|
$view = new view;
|
16 |
|
|
$view->name = 'user_stats_ips_by_user';
|
17 |
|
|
$view->description = 'IP addresses grouped by user. Shows the IP addresses the user has logged in under and the number of users with the same IP. This views works in conjunction with user_stats_users_by_ip and will not work correctly unless it is also enabled.';
|
18 |
|
|
$view->tag = '';
|
19 |
|
|
$view->view_php = '';
|
20 |
|
|
$view->base_table = 'users';
|
21 |
|
|
$view->is_cacheable = FALSE;
|
22 |
|
|
$view->api_version = 2;
|
23 |
|
|
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
|
24 |
|
|
$handler = $view->new_display('default', 'Defaults', 'default');
|
25 |
|
|
$handler->override_option('fields', array(
|
26 |
|
|
'name' => array(
|
27 |
|
|
'label' => 'Name',
|
28 |
|
|
'alter' => array(
|
29 |
|
|
'alter_text' => 1,
|
30 |
|
|
'text' => '<strong>[name]</strong>',
|
31 |
|
|
'make_link' => 0,
|
32 |
|
|
'path' => '',
|
33 |
|
|
'alt' => '',
|
34 |
|
|
'prefix' => '',
|
35 |
|
|
'suffix' => '',
|
36 |
|
|
'help' => '',
|
37 |
|
|
'trim' => 0,
|
38 |
|
|
'max_length' => '',
|
39 |
|
|
'word_boundary' => 1,
|
40 |
|
|
'ellipsis' => 1,
|
41 |
|
|
'html' => 0,
|
42 |
|
|
),
|
43 |
|
|
'link_to_user' => 1,
|
44 |
|
|
'exclude' => 1,
|
45 |
|
|
'id' => 'name',
|
46 |
|
|
'table' => 'users',
|
47 |
|
|
'field' => 'name',
|
48 |
|
|
'relationship' => 'none',
|
49 |
|
|
),
|
50 |
|
|
'ip_address' => array(
|
51 |
|
|
'label' => 'IP',
|
52 |
|
|
'alter' => array(
|
53 |
|
|
'alter_text' => 0,
|
54 |
|
|
'text' => '',
|
55 |
|
|
'make_link' => 1,
|
56 |
|
|
'path' => 'admin/reports/ip_tracking/by_ip/[ip_address]',
|
57 |
|
|
'link_class' => '',
|
58 |
|
|
'alt' => 'View other users with this IP address',
|
59 |
|
|
'prefix' => '',
|
60 |
|
|
'suffix' => '',
|
61 |
|
|
'target' => '',
|
62 |
|
|
'help' => '',
|
63 |
|
|
'trim' => 0,
|
64 |
|
|
'max_length' => '',
|
65 |
|
|
'word_boundary' => 1,
|
66 |
|
|
'ellipsis' => 1,
|
67 |
|
|
'strip_tags' => 0,
|
68 |
|
|
'html' => 0,
|
69 |
|
|
),
|
70 |
|
|
'empty' => '',
|
71 |
|
|
'hide_empty' => 0,
|
72 |
|
|
'empty_zero' => 0,
|
73 |
|
|
'exclude' => 0,
|
74 |
|
|
'id' => 'ip_address',
|
75 |
|
|
'table' => 'user_stats_ips',
|
76 |
|
|
'field' => 'ip_address',
|
77 |
|
|
'relationship' => 'none',
|
78 |
|
|
'override' => array(
|
79 |
|
|
'button' => 'Override',
|
80 |
|
|
),
|
81 |
|
|
),
|
82 |
|
|
'first_seen_timestamp' => array(
|
83 |
|
|
'label' => 'First seen',
|
84 |
|
|
'alter' => array(
|
85 |
|
|
'alter_text' => 0,
|
86 |
|
|
'text' => '',
|
87 |
|
|
'make_link' => 0,
|
88 |
|
|
'path' => '',
|
89 |
|
|
'alt' => '',
|
90 |
|
|
'prefix' => '',
|
91 |
|
|
'suffix' => '',
|
92 |
|
|
'help' => '',
|
93 |
|
|
'trim' => 0,
|
94 |
|
|
'max_length' => '',
|
95 |
|
|
'word_boundary' => 1,
|
96 |
|
|
'ellipsis' => 1,
|
97 |
|
|
'html' => 0,
|
98 |
|
|
),
|
99 |
|
|
'date_format' => 'small',
|
100 |
|
|
'custom_date_format' => '',
|
101 |
|
|
'exclude' => 0,
|
102 |
|
|
'id' => 'first_seen_timestamp',
|
103 |
|
|
'table' => 'user_stats_ips',
|
104 |
|
|
'field' => 'first_seen_timestamp',
|
105 |
|
|
'relationship' => 'none',
|
106 |
|
|
),
|
107 |
|
|
'ip_user_count' => array(
|
108 |
|
|
'label' => 'Users with IP',
|
109 |
|
|
'alter' => array(
|
110 |
|
|
'alter_text' => 0,
|
111 |
|
|
'text' => '',
|
112 |
|
|
'make_link' => 0,
|
113 |
|
|
'path' => '',
|
114 |
|
|
'alt' => '',
|
115 |
|
|
'prefix' => '',
|
116 |
|
|
'suffix' => '',
|
117 |
|
|
'help' => '',
|
118 |
|
|
'trim' => 0,
|
119 |
|
|
'max_length' => '',
|
120 |
|
|
'word_boundary' => 1,
|
121 |
|
|
'ellipsis' => 1,
|
122 |
|
|
'html' => 0,
|
123 |
|
|
),
|
124 |
|
|
'set_precision' => FALSE,
|
125 |
|
|
'precision' => 0,
|
126 |
|
|
'decimal' => '.',
|
127 |
|
|
'separator' => ',',
|
128 |
|
|
'prefix' => '',
|
129 |
|
|
'suffix' => '',
|
130 |
|
|
'exclude' => 0,
|
131 |
|
|
'id' => 'ip_user_count',
|
132 |
|
|
'table' => 'user_stats_ips',
|
133 |
|
|
'field' => 'ip_user_count',
|
134 |
|
|
'relationship' => 'none',
|
135 |
|
|
),
|
136 |
|
|
'user_ip_count' => array(
|
137 |
|
|
'label' => '',
|
138 |
|
|
'alter' => array(
|
139 |
|
|
'alter_text' => 0,
|
140 |
|
|
'text' => '',
|
141 |
|
|
'make_link' => 0,
|
142 |
|
|
'path' => '',
|
143 |
|
|
'alt' => '',
|
144 |
|
|
'prefix' => '',
|
145 |
|
|
'suffix' => '',
|
146 |
|
|
'help' => '',
|
147 |
|
|
'trim' => 0,
|
148 |
|
|
'max_length' => '',
|
149 |
|
|
'word_boundary' => 0,
|
150 |
|
|
'ellipsis' => 0,
|
151 |
|
|
'html' => 0,
|
152 |
|
|
),
|
153 |
|
|
'set_precision' => FALSE,
|
154 |
|
|
'precision' => 0,
|
155 |
|
|
'decimal' => '.',
|
156 |
|
|
'separator' => '',
|
157 |
|
|
'prefix' => '',
|
158 |
|
|
'suffix' => '',
|
159 |
|
|
'exclude' => 1,
|
160 |
|
|
'id' => 'user_ip_count',
|
161 |
|
|
'table' => 'user_stats_ips',
|
162 |
|
|
'field' => 'user_ip_count',
|
163 |
|
|
'relationship' => 'none',
|
164 |
|
|
),
|
165 |
|
|
));
|
166 |
|
|
$handler->override_option('sorts', array(
|
167 |
|
|
'first_seen_timestamp' => array(
|
168 |
|
|
'order' => 'DESC',
|
169 |
|
|
'granularity' => 'second',
|
170 |
|
|
'id' => 'first_seen_timestamp',
|
171 |
|
|
'table' => 'user_stats_ips',
|
172 |
|
|
'field' => 'first_seen_timestamp',
|
173 |
|
|
'relationship' => 'none',
|
174 |
|
|
),
|
175 |
|
|
));
|
176 |
|
|
$handler->override_option('arguments', array(
|
177 |
|
|
'name' => array(
|
178 |
|
|
'default_action' => 'ignore',
|
179 |
|
|
'style_plugin' => 'default_summary',
|
180 |
|
|
'style_options' => array(),
|
181 |
|
|
'wildcard' => 'all',
|
182 |
|
|
'wildcard_substitution' => 'All',
|
183 |
|
|
'title' => '',
|
184 |
|
|
'default_argument_type' => 'fixed',
|
185 |
|
|
'default_argument' => '',
|
186 |
|
|
'validate_type' => 'none',
|
187 |
|
|
'validate_fail' => 'not found',
|
188 |
|
|
'glossary' => 0,
|
189 |
|
|
'limit' => '0',
|
190 |
|
|
'case' => 'none',
|
191 |
|
|
'path_case' => 'none',
|
192 |
|
|
'transform_dash' => 0,
|
193 |
|
|
'id' => 'name',
|
194 |
|
|
'table' => 'users',
|
195 |
|
|
'field' => 'name',
|
196 |
|
|
'relationship' => 'none',
|
197 |
|
|
'default_options_div_prefix' => '',
|
198 |
|
|
'default_argument_user' => 0,
|
199 |
|
|
'default_argument_fixed' => '',
|
200 |
|
|
'default_argument_php' => '',
|
201 |
|
|
'validate_argument_node_type' => array(
|
202 |
|
|
'poll' => 0,
|
203 |
|
|
'forum' => 0,
|
204 |
|
|
'page' => 0,
|
205 |
|
|
'project' => 0,
|
206 |
|
|
'story' => 0,
|
207 |
|
|
),
|
208 |
|
|
'validate_argument_node_access' => 0,
|
209 |
|
|
'validate_argument_nid_type' => 'nid',
|
210 |
|
|
'validate_argument_vocabulary' => array(
|
211 |
|
|
'1' => 0,
|
212 |
|
|
'3' => 0,
|
213 |
|
|
'4' => 0,
|
214 |
|
|
),
|
215 |
|
|
'validate_argument_type' => 'tid',
|
216 |
|
|
'validate_argument_php' => '',
|
217 |
|
|
),
|
218 |
|
|
));
|
219 |
|
|
$handler->override_option('filters', array(
|
220 |
|
|
'uid' => array(
|
221 |
|
|
'operator' => 'in',
|
222 |
|
|
'value' => '',
|
223 |
|
|
'group' => '0',
|
224 |
|
|
'exposed' => TRUE,
|
225 |
|
|
'expose' => array(
|
226 |
|
|
'use_operator' => 1,
|
227 |
|
|
'operator' => 'uid_op',
|
228 |
|
|
'identifier' => 'uid',
|
229 |
|
|
'label' => 'Username',
|
230 |
|
|
'optional' => 1,
|
231 |
|
|
'remember' => 0,
|
232 |
|
|
'reduce' => 0,
|
233 |
|
|
),
|
234 |
|
|
'id' => 'uid',
|
235 |
|
|
'table' => 'users',
|
236 |
|
|
'field' => 'uid',
|
237 |
|
|
'relationship' => 'none',
|
238 |
|
|
),
|
239 |
|
|
'status' => array(
|
240 |
|
|
'operator' => '=',
|
241 |
|
|
'value' => '1',
|
242 |
|
|
'group' => '0',
|
243 |
|
|
'exposed' => TRUE,
|
244 |
|
|
'expose' => array(
|
245 |
|
|
'operator' => '',
|
246 |
|
|
'identifier' => 'status',
|
247 |
|
|
'label' => 'User is active',
|
248 |
|
|
'optional' => 1,
|
249 |
|
|
'remember' => 1,
|
250 |
|
|
),
|
251 |
|
|
'id' => 'status',
|
252 |
|
|
'table' => 'users',
|
253 |
|
|
'field' => 'status',
|
254 |
|
|
'relationship' => 'none',
|
255 |
|
|
),
|
256 |
|
|
));
|
257 |
|
|
$handler->override_option('access', array(
|
258 |
|
|
'type' => 'perm',
|
259 |
|
|
'perm' => 'View IP addresses',
|
260 |
|
|
));
|
261 |
|
|
$handler->override_option('cache', array(
|
262 |
|
|
'type' => 'none',
|
263 |
|
|
));
|
264 |
|
|
$handler->override_option('title', 'IP address history by user');
|
265 |
|
|
$handler->override_option('empty', 'No IP addresses found.');
|
266 |
|
|
$handler->override_option('empty_format', '1');
|
267 |
|
|
$handler->override_option('items_per_page', 100);
|
268 |
|
|
$handler->override_option('use_pager', '1');
|
269 |
|
|
$handler->override_option('distinct', 1);
|
270 |
|
|
$handler->override_option('style_plugin', 'table');
|
271 |
|
|
$handler->override_option('style_options', array(
|
272 |
|
|
'grouping' => 'name',
|
273 |
|
|
'override' => 1,
|
274 |
|
|
'sticky' => 0,
|
275 |
|
|
'order' => 'desc',
|
276 |
|
|
'columns' => array(
|
277 |
|
|
'name' => 'name',
|
278 |
|
|
'first_seen_timestamp' => 'first_seen_timestamp',
|
279 |
|
|
'ip_address' => 'ip_address',
|
280 |
|
|
'ip_user_count' => 'ip_user_count',
|
281 |
|
|
'user_ip_count' => 'user_ip_count',
|
282 |
|
|
),
|
283 |
|
|
'info' => array(
|
284 |
|
|
'name' => array(
|
285 |
|
|
'sortable' => 1,
|
286 |
|
|
'separator' => '',
|
287 |
|
|
),
|
288 |
|
|
'first_seen_timestamp' => array(
|
289 |
|
|
'sortable' => 1,
|
290 |
|
|
'separator' => '',
|
291 |
|
|
),
|
292 |
|
|
'ip_address' => array(
|
293 |
|
|
'separator' => '',
|
294 |
|
|
),
|
295 |
|
|
'ip_user_count' => array(
|
296 |
|
|
'sortable' => 1,
|
297 |
|
|
'separator' => '',
|
298 |
|
|
),
|
299 |
|
|
'user_ip_count' => array(
|
300 |
|
|
'sortable' => 0,
|
301 |
|
|
'separator' => '',
|
302 |
|
|
),
|
303 |
|
|
),
|
304 |
|
|
'default' => 'user_ip_count',
|
305 |
|
|
));
|
306 |
|
|
$handler = $view->new_display('page', 'Page', 'page_1');
|
307 |
|
|
$handler->override_option('path', 'admin/reports/ip_tracking/by_user');
|
308 |
|
|
$handler->override_option('menu', array(
|
309 |
|
|
'type' => 'tab',
|
310 |
|
|
'title' => 'IPs by user',
|
311 |
|
|
'description' => 'Lookup users and view a history of their IP addresses.',
|
312 |
|
|
'weight' => '0',
|
313 |
|
|
'name' => 'navigation',
|
314 |
|
|
));
|
315 |
|
|
$handler->override_option('tab_options', array(
|
316 |
|
|
'type' => 'tab',
|
317 |
|
|
'title' => '',
|
318 |
|
|
'description' => '',
|
319 |
|
|
'weight' => '0',
|
320 |
|
|
));
|
321 |
|
|
$handler = $view->new_display('page', 'Lookup page', 'page_2');
|
322 |
|
|
$handler->override_option('path', 'admin/reports/ip_tracking/by_user/%');
|
323 |
|
|
$handler->override_option('menu', array(
|
324 |
|
|
'type' => 'none',
|
325 |
|
|
'title' => '',
|
326 |
|
|
'description' => '',
|
327 |
|
|
'weight' => 0,
|
328 |
|
|
'name' => 'navigation',
|
329 |
|
|
));
|
330 |
|
|
$handler->override_option('tab_options', array(
|
331 |
|
|
'type' => 'none',
|
332 |
|
|
'title' => '',
|
333 |
|
|
'description' => '',
|
334 |
|
|
'weight' => 0,
|
335 |
|
|
));
|
336 |
|
|
$handler = $view->new_display('page', 'User profile tab', 'page_3');
|
337 |
|
|
$handler->override_option('fields', array(
|
338 |
|
|
'ip_address' => array(
|
339 |
|
|
'label' => 'IP',
|
340 |
|
|
'alter' => array(
|
341 |
|
|
'alter_text' => 0,
|
342 |
|
|
'text' => '',
|
343 |
|
|
'make_link' => 1,
|
344 |
|
|
'path' => 'admin/reports/ip_tracking/by_ip/[ip_address]',
|
345 |
|
|
'link_class' => '',
|
346 |
|
|
'alt' => 'View other users with this IP address',
|
347 |
|
|
'prefix' => '',
|
348 |
|
|
'suffix' => '',
|
349 |
|
|
'target' => '',
|
350 |
|
|
'help' => '',
|
351 |
|
|
'trim' => 0,
|
352 |
|
|
'max_length' => '',
|
353 |
|
|
'word_boundary' => 1,
|
354 |
|
|
'ellipsis' => 1,
|
355 |
|
|
'strip_tags' => 0,
|
356 |
|
|
'html' => 0,
|
357 |
|
|
),
|
358 |
|
|
'empty' => '',
|
359 |
|
|
'hide_empty' => 0,
|
360 |
|
|
'empty_zero' => 0,
|
361 |
|
|
'exclude' => 0,
|
362 |
|
|
'id' => 'ip_address',
|
363 |
|
|
'table' => 'user_stats_ips',
|
364 |
|
|
'field' => 'ip_address',
|
365 |
|
|
'relationship' => 'none',
|
366 |
|
|
'override' => array(
|
367 |
|
|
'button' => 'Override',
|
368 |
|
|
),
|
369 |
|
|
),
|
370 |
|
|
'first_seen_timestamp' => array(
|
371 |
|
|
'label' => 'First seen',
|
372 |
|
|
'alter' => array(
|
373 |
|
|
'alter_text' => 0,
|
374 |
|
|
'text' => '',
|
375 |
|
|
'make_link' => 0,
|
376 |
|
|
'path' => '',
|
377 |
|
|
'alt' => '',
|
378 |
|
|
'prefix' => '',
|
379 |
|
|
'suffix' => '',
|
380 |
|
|
'help' => '',
|
381 |
|
|
'trim' => 0,
|
382 |
|
|
'max_length' => '',
|
383 |
|
|
'word_boundary' => 1,
|
384 |
|
|
'ellipsis' => 1,
|
385 |
|
|
'html' => 0,
|
386 |
|
|
),
|
387 |
|
|
'date_format' => 'small',
|
388 |
|
|
'custom_date_format' => '',
|
389 |
|
|
'exclude' => 0,
|
390 |
|
|
'id' => 'first_seen_timestamp',
|
391 |
|
|
'table' => 'user_stats_ips',
|
392 |
|
|
'field' => 'first_seen_timestamp',
|
393 |
|
|
'relationship' => 'none',
|
394 |
|
|
),
|
395 |
|
|
'ip_user_count' => array(
|
396 |
|
|
'label' => 'Users with IP',
|
397 |
|
|
'alter' => array(
|
398 |
|
|
'alter_text' => 0,
|
399 |
|
|
'text' => '',
|
400 |
|
|
'make_link' => 0,
|
401 |
|
|
'path' => '',
|
402 |
|
|
'alt' => '',
|
403 |
|
|
'prefix' => '',
|
404 |
|
|
'suffix' => '',
|
405 |
|
|
'help' => '',
|
406 |
|
|
'trim' => 0,
|
407 |
|
|
'max_length' => '',
|
408 |
|
|
'word_boundary' => 1,
|
409 |
|
|
'ellipsis' => 1,
|
410 |
|
|
'html' => 0,
|
411 |
|
|
),
|
412 |
|
|
'set_precision' => FALSE,
|
413 |
|
|
'precision' => 0,
|
414 |
|
|
'decimal' => '.',
|
415 |
|
|
'separator' => ',',
|
416 |
|
|
'prefix' => '',
|
417 |
|
|
'suffix' => '',
|
418 |
|
|
'exclude' => 0,
|
419 |
|
|
'id' => 'ip_user_count',
|
420 |
|
|
'table' => 'user_stats_ips',
|
421 |
|
|
'field' => 'ip_user_count',
|
422 |
|
|
'relationship' => 'none',
|
423 |
|
|
),
|
424 |
|
|
'user_ip_count' => array(
|
425 |
|
|
'label' => '',
|
426 |
|
|
'alter' => array(
|
427 |
|
|
'alter_text' => 0,
|
428 |
|
|
'text' => '',
|
429 |
|
|
'make_link' => 0,
|
430 |
|
|
'path' => '',
|
431 |
|
|
'alt' => '',
|
432 |
|
|
'prefix' => '',
|
433 |
|
|
'suffix' => '',
|
434 |
|
|
'help' => '',
|
435 |
|
|
'trim' => 0,
|
436 |
|
|
'max_length' => '',
|
437 |
|
|
'word_boundary' => 0,
|
438 |
|
|
'ellipsis' => 0,
|
439 |
|
|
'html' => 0,
|
440 |
|
|
),
|
441 |
|
|
'set_precision' => FALSE,
|
442 |
|
|
'precision' => 0,
|
443 |
|
|
'decimal' => '.',
|
444 |
|
|
'separator' => '',
|
445 |
|
|
'prefix' => '',
|
446 |
|
|
'suffix' => '',
|
447 |
|
|
'exclude' => 1,
|
448 |
|
|
'id' => 'user_ip_count',
|
449 |
|
|
'table' => 'user_stats_ips',
|
450 |
|
|
'field' => 'user_ip_count',
|
451 |
|
|
'relationship' => 'none',
|
452 |
|
|
),
|
453 |
|
|
));
|
454 |
|
|
$handler->override_option('arguments', array(
|
455 |
|
|
'uid' => array(
|
456 |
|
|
'default_action' => 'empty',
|
457 |
|
|
'style_plugin' => 'default_summary',
|
458 |
|
|
'style_options' => array(),
|
459 |
|
|
'wildcard' => 'all',
|
460 |
|
|
'wildcard_substitution' => 'All',
|
461 |
|
|
'title' => '',
|
462 |
|
|
'breadcrumb' => '',
|
463 |
|
|
'default_argument_type' => 'fixed',
|
464 |
|
|
'default_argument' => '',
|
465 |
|
|
'validate_type' => 'none',
|
466 |
|
|
'validate_fail' => 'not found',
|
467 |
|
|
'break_phrase' => 0,
|
468 |
|
|
'not' => 0,
|
469 |
|
|
'id' => 'uid',
|
470 |
|
|
'table' => 'users',
|
471 |
|
|
'field' => 'uid',
|
472 |
|
|
'validate_user_argument_type' => 'uid',
|
473 |
|
|
'validate_user_roles' => array(
|
474 |
|
|
'2' => 0,
|
475 |
|
|
'1000006' => 0,
|
476 |
|
|
'1000047' => 0,
|
477 |
|
|
'1000054' => 0,
|
478 |
|
|
'1000059' => 0,
|
479 |
|
|
'1000048' => 0,
|
480 |
|
|
'1000002' => 0,
|
481 |
|
|
'1000058' => 0,
|
482 |
|
|
'1000056' => 0,
|
483 |
|
|
'1000057' => 0,
|
484 |
|
|
'1000046' => 0,
|
485 |
|
|
'1000055' => 0,
|
486 |
|
|
'1000051' => 0,
|
487 |
|
|
'1000053' => 0,
|
488 |
|
|
'1000003' => 0,
|
489 |
|
|
),
|
490 |
|
|
'override' => array(
|
491 |
|
|
'button' => 'Use default',
|
492 |
|
|
),
|
493 |
|
|
'relationship' => 'none',
|
494 |
|
|
'default_options_div_prefix' => '',
|
495 |
|
|
'default_argument_user' => 0,
|
496 |
|
|
'default_argument_fixed' => '',
|
497 |
|
|
'default_argument_php' => '',
|
498 |
|
|
'validate_argument_node_type' => array(
|
499 |
|
|
'poll' => 0,
|
500 |
|
|
'ad' => 0,
|
501 |
|
|
'forum' => 0,
|
502 |
|
|
'book' => 0,
|
503 |
|
|
'page' => 0,
|
504 |
|
|
'project' => 0,
|
505 |
|
|
'story' => 0,
|
506 |
|
|
),
|
507 |
|
|
'validate_argument_node_access' => 0,
|
508 |
|
|
'validate_argument_nid_type' => 'nid',
|
509 |
|
|
'validate_argument_vocabulary' => array(
|
510 |
|
|
'1' => 0,
|
511 |
|
|
'6' => 0,
|
512 |
|
|
'3' => 0,
|
513 |
|
|
'4' => 0,
|
514 |
|
|
),
|
515 |
|
|
'validate_argument_type' => 'tid',
|
516 |
|
|
'validate_argument_transform' => 0,
|
517 |
|
|
'validate_user_restrict_roles' => 0,
|
518 |
|
|
'validate_argument_node_flag_name' => '*relationship*',
|
519 |
|
|
'validate_argument_node_flag_test' => 'flaggable',
|
520 |
|
|
'validate_argument_node_flag_id_type' => 'id',
|
521 |
|
|
'validate_argument_user_flag_name' => '*relationship*',
|
522 |
|
|
'validate_argument_user_flag_test' => 'flaggable',
|
523 |
|
|
'validate_argument_user_flag_id_type' => 'id',
|
524 |
|
|
'validate_argument_php' => '',
|
525 |
|
|
),
|
526 |
|
|
));
|
527 |
|
|
$handler->override_option('filters', array());
|
528 |
|
|
$handler->override_option('path', 'user/%/ip_tracking');
|
529 |
|
|
$handler->override_option('menu', array(
|
530 |
|
|
'type' => 'tab',
|
531 |
|
|
'title' => 'IP addresses',
|
532 |
|
|
'description' => '',
|
533 |
|
|
'weight' => '0',
|
534 |
|
|
'name' => 'navigation',
|
535 |
|
|
));
|
536 |
|
|
$handler->override_option('tab_options', array(
|
537 |
|
|
'type' => 'none',
|
538 |
|
|
'title' => '',
|
539 |
|
|
'description' => '',
|
540 |
|
|
'weight' => '0',
|
541 |
|
|
));
|
542 |
|
|
$views[$view->name] = $view;
|
543 |
|
|
|
544 |
|
|
/*
|
545 |
|
|
* View 'user_stats_online_users'
|
546 |
|
|
*/
|
547 |
|
|
$view = new view;
|
548 |
|
|
$view->name = 'user_stats_online_users';
|
549 |
|
|
$view->description = 'A list of online users.';
|
550 |
|
|
$view->tag = '';
|
551 |
|
|
$view->view_php = '';
|
552 |
|
|
$view->base_table = 'users';
|
553 |
|
|
$view->is_cacheable = FALSE;
|
554 |
|
|
$view->api_version = 2;
|
555 |
|
|
$view->disabled = TRUE; /* Edit this to true to make a default view disabled initially */
|
556 |
|
|
$handler = $view->new_display('default', 'Defaults', 'default');
|
557 |
|
|
$handler->override_option('fields', array(
|
558 |
|
|
'name' => array(
|
559 |
|
|
'label' => '',
|
560 |
|
|
'alter' => array(
|
561 |
|
|
'alter_text' => 0,
|
562 |
|
|
'text' => '',
|
563 |
|
|
'make_link' => 0,
|
564 |
|
|
'path' => '',
|
565 |
|
|
'alt' => '',
|
566 |
|
|
'prefix' => '',
|
567 |
|
|
'suffix' => '',
|
568 |
|
|
'help' => '',
|
569 |
|
|
'trim' => 0,
|
570 |
|
|
'max_length' => '',
|
571 |
|
|
'word_boundary' => 1,
|
572 |
|
|
'ellipsis' => 1,
|
573 |
|
|
'html' => 0,
|
574 |
|
|
),
|
575 |
|
|
'link_to_user' => 1,
|
576 |
|
|
'overwrite_anonymous' => 0,
|
577 |
|
|
'anonymous_text' => '',
|
578 |
|
|
'exclude' => 0,
|
579 |
|
|
'id' => 'name',
|
580 |
|
|
'table' => 'users',
|
581 |
|
|
'field' => 'name',
|
582 |
|
|
'relationship' => 'none',
|
583 |
|
|
),
|
584 |
|
|
));
|
585 |
|
|
$handler->override_option('filters', array(
|
586 |
|
|
'is_online' => array(
|
587 |
|
|
'operator' => '=',
|
588 |
|
|
'value' => '1',
|
589 |
|
|
'group' => '0',
|
590 |
|
|
'exposed' => FALSE,
|
591 |
|
|
'expose' => array(
|
592 |
|
|
'operator' => FALSE,
|
593 |
|
|
'label' => '',
|
594 |
|
|
),
|
595 |
|
|
'id' => 'is_online',
|
596 |
|
|
'table' => 'users',
|
597 |
|
|
'field' => 'is_online',
|
598 |
|
|
'relationship' => 'none',
|
599 |
|
|
),
|
600 |
|
|
));
|
601 |
|
|
$handler->override_option('access', array(
|
602 |
|
|
'type' => 'perm',
|
603 |
|
|
'perm' => 'View statistics',
|
604 |
|
|
));
|
605 |
|
|
$handler->override_option('cache', array(
|
606 |
|
|
'type' => 'none',
|
607 |
|
|
));
|
608 |
|
|
$handler->override_option('title', 'Online users');
|
609 |
|
|
$handler->override_option('use_ajax', TRUE);
|
610 |
|
|
$handler->override_option('use_pager', 'mini');
|
611 |
|
|
$handler->override_option('style_options', array(
|
612 |
|
|
'grouping' => '',
|
613 |
|
|
));
|
614 |
|
|
$handler = $view->new_display('block', 'Block', 'block_1');
|
615 |
|
|
$handler->override_option('block_description', 'Online users');
|
616 |
|
|
$handler->override_option('block_caching', -1);
|
617 |
|
|
$views[$view->name] = $view;
|
618 |
|
|
|
619 |
|
|
/*
|
620 |
|
|
* View 'user_stats_online_users_pictures'
|
621 |
|
|
*/
|
622 |
|
|
$view = new view;
|
623 |
|
|
$view->name = 'user_stats_online_users_pictures';
|
624 |
|
|
$view->description = 'Shows who is online by displaying their user pictures (avatars).';
|
625 |
|
|
$view->tag = '';
|
626 |
|
|
$view->view_php = '';
|
627 |
|
|
$view->base_table = 'users';
|
628 |
|
|
$view->is_cacheable = FALSE;
|
629 |
|
|
$view->api_version = 2;
|
630 |
|
|
$view->disabled = TRUE; /* Edit this to true to make a default view disabled initially */
|
631 |
|
|
$handler = $view->new_display('default', 'Defaults', 'default');
|
632 |
|
|
$handler->override_option('fields', array(
|
633 |
|
|
'uid' => array(
|
634 |
|
|
'label' => 'Uid',
|
635 |
|
|
'alter' => array(
|
636 |
|
|
'alter_text' => 0,
|
637 |
|
|
'text' => '',
|
638 |
|
|
'make_link' => 0,
|
639 |
|
|
'path' => '',
|
640 |
|
|
'alt' => '',
|
641 |
|
|
'prefix' => '',
|
642 |
|
|
'suffix' => '',
|
643 |
|
|
'help' => '',
|
644 |
|
|
'trim' => 0,
|
645 |
|
|
'max_length' => '',
|
646 |
|
|
'word_boundary' => 1,
|
647 |
|
|
'ellipsis' => 1,
|
648 |
|
|
'html' => 0,
|
649 |
|
|
),
|
650 |
|
|
'link_to_user' => 0,
|
651 |
|
|
'exclude' => 1,
|
652 |
|
|
'id' => 'uid',
|
653 |
|
|
'table' => 'users',
|
654 |
|
|
'field' => 'uid',
|
655 |
|
|
'relationship' => 'none',
|
656 |
|
|
),
|
657 |
|
|
'picture_bare' => array(
|
658 |
|
|
'label' => '',
|
659 |
|
|
'alter' => array(
|
660 |
|
|
'alter_text' => 0,
|
661 |
|
|
'text' => '',
|
662 |
|
|
'make_link' => 1,
|
663 |
|
|
'path' => 'user/[uid]',
|
664 |
|
|
'alt' => '',
|
665 |
|
|
'prefix' => '',
|
666 |
|
|
'suffix' => '',
|
667 |
|
|
'help' => '',
|
668 |
|
|
'trim' => 0,
|
669 |
|
|
'max_length' => '',
|
670 |
|
|
'word_boundary' => 1,
|
671 |
|
|
'ellipsis' => 1,
|
672 |
|
|
'html' => 0,
|
673 |
|
|
),
|
674 |
|
|
'exclude' => 0,
|
675 |
|
|
'id' => 'picture_bare',
|
676 |
|
|
'table' => 'users',
|
677 |
|
|
'field' => 'picture_bare',
|
678 |
|
|
'relationship' => 'none',
|
679 |
|
|
),
|
680 |
|
|
));
|
681 |
|
|
$handler->override_option('filters', array(
|
682 |
|
|
'is_online' => array(
|
683 |
|
|
'operator' => '=',
|
684 |
|
|
'value' => '1',
|
685 |
|
|
'group' => '0',
|
686 |
|
|
'exposed' => FALSE,
|
687 |
|
|
'expose' => array(
|
688 |
|
|
'operator' => FALSE,
|
689 |
|
|
'label' => '',
|
690 |
|
|
),
|
691 |
|
|
'id' => 'is_online',
|
692 |
|
|
'table' => 'users',
|
693 |
|
|
'field' => 'is_online',
|
694 |
|
|
'relationship' => 'none',
|
695 |
|
|
),
|
696 |
|
|
));
|
697 |
|
|
$handler->override_option('access', array(
|
698 |
|
|
'type' => 'perm',
|
699 |
|
|
'perm' => 'View statistics',
|
700 |
|
|
));
|
701 |
|
|
$handler->override_option('cache', array(
|
702 |
|
|
'type' => 'none',
|
703 |
|
|
));
|
704 |
|
|
$handler->override_option('title', 'Online users');
|
705 |
|
|
$handler->override_option('use_ajax', TRUE);
|
706 |
|
|
$handler->override_option('use_pager', 'mini');
|
707 |
|
|
$handler->override_option('style_options', array(
|
708 |
|
|
'grouping' => '',
|
709 |
|
|
));
|
710 |
|
|
$handler = $view->new_display('block', 'Block', 'block_1');
|
711 |
|
|
$handler->override_option('block_description', 'Online users (pictures)');
|
712 |
|
|
$handler->override_option('block_caching', -1);
|
713 |
|
|
$views[$view->name] = $view;
|
714 |
|
|
|
715 |
|
|
/*
|
716 |
|
|
* View 'user_stats_top_posters'
|
717 |
|
|
*/
|
718 |
|
|
$view = new view;
|
719 |
|
|
$view->name = 'user_stats_top_posters';
|
720 |
|
|
$view->description = 'Provides a block and page showing users with the highest post counts.';
|
721 |
|
|
$view->tag = '';
|
722 |
|
|
$view->view_php = '';
|
723 |
|
|
$view->base_table = 'users';
|
724 |
|
|
$view->is_cacheable = FALSE;
|
725 |
|
|
$view->api_version = 2;
|
726 |
|
|
$view->disabled = TRUE; /* Edit this to true to make a default view disabled initially */
|
727 |
|
|
$handler = $view->new_display('default', 'Defaults', 'default');
|
728 |
|
|
$handler->override_option('fields', array(
|
729 |
|
|
'name' => array(
|
730 |
|
|
'label' => 'Name',
|
731 |
|
|
'alter' => array(
|
732 |
|
|
'alter_text' => 0,
|
733 |
|
|
'text' => '',
|
734 |
|
|
'make_link' => 0,
|
735 |
|
|
'path' => '',
|
736 |
|
|
'alt' => '',
|
737 |
|
|
'prefix' => '',
|
738 |
|
|
'suffix' => '',
|
739 |
|
|
'help' => '',
|
740 |
|
|
'trim' => 0,
|
741 |
|
|
'max_length' => '',
|
742 |
|
|
'word_boundary' => 1,
|
743 |
|
|
'ellipsis' => 1,
|
744 |
|
|
'html' => 0,
|
745 |
|
|
),
|
746 |
|
|
'link_to_user' => 1,
|
747 |
|
|
'exclude' => 0,
|
748 |
|
|
'id' => 'name',
|
749 |
|
|
'table' => 'users',
|
750 |
|
|
'field' => 'name',
|
751 |
|
|
'relationship' => 'none',
|
752 |
|
|
),
|
753 |
|
|
'value' => array(
|
754 |
|
|
'label' => 'Posts',
|
755 |
|
|
'alter' => array(
|
756 |
|
|
'alter_text' => 0,
|
757 |
|
|
'text' => '',
|
758 |
|
|
'make_link' => 0,
|
759 |
|
|
'path' => '',
|
760 |
|
|
'alt' => '',
|
761 |
|
|
'prefix' => '',
|
762 |
|
|
'suffix' => '',
|
763 |
|
|
'help' => '',
|
764 |
|
|
'trim' => 0,
|
765 |
|
|
'max_length' => '',
|
766 |
|
|
'word_boundary' => 1,
|
767 |
|
|
'ellipsis' => 1,
|
768 |
|
|
'html' => 0,
|
769 |
|
|
),
|
770 |
|
|
'set_precision' => FALSE,
|
771 |
|
|
'precision' => 0,
|
772 |
|
|
'decimal' => '.',
|
773 |
|
|
'separator' => ',',
|
774 |
|
|
'prefix' => '',
|
775 |
|
|
'suffix' => '',
|
776 |
|
|
'exclude' => 0,
|
777 |
|
|
'id' => 'value',
|
778 |
|
|
'table' => 'user_stats_values',
|
779 |
|
|
'field' => 'value',
|
780 |
|
|
'relationship' => 'none',
|
781 |
|
|
),
|
782 |
|
|
));
|
783 |
|
|
$handler->override_option('sorts', array(
|
784 |
|
|
'value' => array(
|
785 |
|
|
'order' => 'DESC',
|
786 |
|
|
'id' => 'value',
|
787 |
|
|
'table' => 'user_stats_values',
|
788 |
|
|
'field' => 'value',
|
789 |
|
|
'relationship' => 'none',
|
790 |
|
|
),
|
791 |
|
|
));
|
792 |
|
|
$handler->override_option('filters', array(
|
793 |
|
|
'name' => array(
|
794 |
|
|
'operator' => '=',
|
795 |
|
|
'value' => 'post_count',
|
796 |
|
|
'group' => '0',
|
797 |
|
|
'exposed' => FALSE,
|
798 |
|
|
'expose' => array(
|
799 |
|
|
'operator' => FALSE,
|
800 |
|
|
'label' => '',
|
801 |
|
|
),
|
802 |
|
|
'case' => 1,
|
803 |
|
|
'id' => 'name',
|
804 |
|
|
'table' => 'user_stats_values',
|
805 |
|
|
'field' => 'name',
|
806 |
|
|
'relationship' => 'none',
|
807 |
|
|
),
|
808 |
|
|
'status' => array(
|
809 |
|
|
'operator' => '=',
|
810 |
|
|
'value' => '1',
|
811 |
|
|
'group' => '0',
|
812 |
|
|
'exposed' => FALSE,
|
813 |
|
|
'expose' => array(
|
814 |
|
|
'operator' => FALSE,
|
815 |
|
|
'label' => '',
|
816 |
|
|
),
|
817 |
|
|
'id' => 'status',
|
818 |
|
|
'table' => 'users',
|
819 |
|
|
'field' => 'status',
|
820 |
|
|
'relationship' => 'none',
|
821 |
|
|
),
|
822 |
|
|
));
|
823 |
|
|
$handler->override_option('access', array(
|
824 |
|
|
'type' => 'perm',
|
825 |
|
|
'perm' => 'View statistics',
|
826 |
|
|
));
|
827 |
|
|
$handler->override_option('cache', array(
|
828 |
|
|
'type' => 'none',
|
829 |
|
|
));
|
830 |
|
|
$handler->override_option('title', 'Top posters');
|
831 |
|
|
$handler->override_option('items_per_page', 20);
|
832 |
|
|
$handler->override_option('use_pager', '1');
|
833 |
|
|
$handler->override_option('use_more', 0);
|
834 |
|
|
$handler->override_option('style_plugin', 'table');
|
835 |
|
|
$handler->override_option('style_options', array(
|
836 |
|
|
'grouping' => '',
|
837 |
|
|
'override' => 1,
|
838 |
|
|
'sticky' => 0,
|
839 |
|
|
'order' => 'asc',
|
840 |
|
|
'columns' => array(
|
841 |
|
|
'name' => 'name',
|
842 |
|
|
'value' => 'value',
|
843 |
|
|
),
|
844 |
|
|
'info' => array(
|
845 |
|
|
'name' => array(
|
846 |
|
|
'sortable' => 0,
|
847 |
|
|
'separator' => '',
|
848 |
|
|
),
|
849 |
|
|
'value' => array(
|
850 |
|
|
'sortable' => 0,
|
851 |
|
|
'separator' => '',
|
852 |
|
|
),
|
853 |
|
|
),
|
854 |
|
|
'default' => '-1',
|
855 |
|
|
));
|
856 |
|
|
$handler = $view->new_display('block', 'Block', 'block_1');
|
857 |
|
|
$handler->override_option('use_ajax', TRUE);
|
858 |
|
|
$handler->override_option('items_per_page', 10);
|
859 |
|
|
$handler->override_option('use_pager', 'mini');
|
860 |
|
|
$handler->override_option('use_more', 1);
|
861 |
|
|
$handler->override_option('block_description', 'Top 10 posters');
|
862 |
|
|
$handler->override_option('block_caching', -1);
|
863 |
|
|
$handler = $view->new_display('page', 'Page', 'page_1');
|
864 |
|
|
$handler->override_option('path', 'top-posters');
|
865 |
|
|
$handler->override_option('menu', array(
|
866 |
|
|
'type' => 'normal',
|
867 |
|
|
'title' => 'Top posters',
|
868 |
|
|
'description' => 'Site users ordered by post count',
|
869 |
|
|
'weight' => '0',
|
870 |
|
|
'name' => 'navigation',
|
871 |
|
|
));
|
872 |
|
|
$handler->override_option('tab_options', array(
|
873 |
|
|
'type' => 'none',
|
874 |
|
|
'title' => '',
|
875 |
|
|
'description' => '',
|
876 |
|
|
'weight' => 0,
|
877 |
|
|
));
|
878 |
|
|
$views[$view->name] = $view;
|
879 |
|
|
|
880 |
|
|
/*
|
881 |
|
|
* View 'user_stats_users_by_ip'
|
882 |
|
|
*/
|
883 |
|
|
$view = new view;
|
884 |
|
|
$view->name = 'user_stats_users_by_ip';
|
885 |
|
|
$view->description = 'Users grouped by IP address. Shows IP addresses in use by multiple users. This views works in conjunction with user_stats_ips_by_user and will not work correctly unless it is also enabled.';
|
886 |
|
|
$view->tag = '';
|
887 |
|
|
$view->view_php = '';
|
888 |
|
|
$view->base_table = 'users';
|
889 |
|
|
$view->is_cacheable = FALSE;
|
890 |
|
|
$view->api_version = 2;
|
891 |
|
|
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
|
892 |
|
|
$handler = $view->new_display('default', 'Defaults', 'default');
|
893 |
|
|
$handler->override_option('fields', array(
|
894 |
|
|
'ip_address' => array(
|
895 |
|
|
'label' => 'IP',
|
896 |
|
|
'alter' => array(
|
897 |
|
|
'alter_text' => 1,
|
898 |
|
|
'text' => '<strong>[ip_address]</strong>',
|
899 |
|
|
'make_link' => 0,
|
900 |
|
|
'path' => '',
|
901 |
|
|
'alt' => '',
|
902 |
|
|
'prefix' => '',
|
903 |
|
|
'suffix' => '',
|
904 |
|
|
'help' => '',
|
905 |
|
|
'trim' => 0,
|
906 |
|
|
'max_length' => '',
|
907 |
|
|
'word_boundary' => 1,
|
908 |
|
|
'ellipsis' => 1,
|
909 |
|
|
'html' => 0,
|
910 |
|
|
),
|
911 |
|
|
'exclude' => 1,
|
912 |
|
|
'id' => 'ip_address',
|
913 |
|
|
'table' => 'user_stats_ips',
|
914 |
|
|
'field' => 'ip_address',
|
915 |
|
|
'relationship' => 'none',
|
916 |
|
|
'override' => array(
|
917 |
|
|
'button' => 'Override',
|
918 |
|
|
),
|
919 |
|
|
),
|
920 |
|
|
'name' => array(
|
921 |
|
|
'label' => 'Name',
|
922 |
|
|
'alter' => array(
|
923 |
|
|
'alter_text' => 0,
|
924 |
|
|
'text' => '',
|
925 |
|
|
'make_link' => 1,
|
926 |
|
|
'path' => 'admin/reports/ip_tracking/by_user/[name]',
|
927 |
|
|
'link_class' => '',
|
928 |
|
|
'alt' => 'View other IP addresses used by this user',
|
929 |
|
|
'prefix' => '',
|
930 |
|
|
'suffix' => '',
|
931 |
|
|
'target' => '',
|
932 |
|
|
'help' => '',
|
933 |
|
|
'trim' => 0,
|
934 |
|
|
'max_length' => '',
|
935 |
|
|
'word_boundary' => 1,
|
936 |
|
|
'ellipsis' => 1,
|
937 |
|
|
'strip_tags' => 0,
|
938 |
|
|
'html' => 0,
|
939 |
|
|
),
|
940 |
|
|
'empty' => '',
|
941 |
|
|
'hide_empty' => 0,
|
942 |
|
|
'empty_zero' => 0,
|
943 |
|
|
'link_to_user' => 0,
|
944 |
|
|
'overwrite_anonymous' => 0,
|
945 |
|
|
'anonymous_text' => '',
|
946 |
|
|
'exclude' => 0,
|
947 |
|
|
'id' => 'name',
|
948 |
|
|
'table' => 'users',
|
949 |
|
|
'field' => 'name',
|
950 |
|
|
'relationship' => 'none',
|
951 |
|
|
'override' => array(
|
952 |
|
|
'button' => 'Override',
|
953 |
|
|
),
|
954 |
|
|
),
|
955 |
|
|
'ip_user_count' => array(
|
956 |
|
|
'label' => 'Users with IP',
|
957 |
|
|
'alter' => array(
|
958 |
|
|
'alter_text' => 0,
|
959 |
|
|
'text' => '',
|
960 |
|
|
'make_link' => 0,
|
961 |
|
|
'path' => '',
|
962 |
|
|
'alt' => '',
|
963 |
|
|
'prefix' => '',
|
964 |
|
|
'suffix' => '',
|
965 |
|
|
'help' => '',
|
966 |
|
|
'trim' => 0,
|
967 |
|
|
'max_length' => '',
|
968 |
|
|
'word_boundary' => 1,
|
969 |
|
|
'ellipsis' => 1,
|
970 |
|
|
'html' => 0,
|
971 |
|
|
),
|
972 |
|
|
'set_precision' => FALSE,
|
973 |
|
|
'precision' => 0,
|
974 |
|
|
'decimal' => '.',
|
975 |
|
|
'separator' => ',',
|
976 |
|
|
'prefix' => '',
|
977 |
|
|
'suffix' => '',
|
978 |
|
|
'exclude' => 1,
|
979 |
|
|
'id' => 'ip_user_count',
|
980 |
|
|
'table' => 'user_stats_ips',
|
981 |
|
|
'field' => 'ip_user_count',
|
982 |
|
|
'relationship' => 'none',
|
983 |
|
|
),
|
984 |
|
|
'created' => array(
|
985 |
|
|
'label' => 'Created date',
|
986 |
|
|
'alter' => array(
|
987 |
|
|
'alter_text' => 0,
|
988 |
|
|
'text' => '',
|
989 |
|
|
'make_link' => 0,
|
990 |
|
|
'path' => '',
|
991 |
|
|
'link_class' => '',
|
992 |
|
|
'alt' => '',
|
993 |
|
|
'prefix' => '',
|
994 |
|
|
'suffix' => '',
|
995 |
|
|
'target' => '',
|
996 |
|
|
'help' => '',
|
997 |
|
|
'trim' => 0,
|
998 |
|
|
'max_length' => '',
|
999 |
|
|
'word_boundary' => 1,
|
1000 |
|
|
'ellipsis' => 1,
|
1001 |
|
|
'strip_tags' => 0,
|
1002 |
|
|
'html' => 0,
|
1003 |
|
|
),
|
1004 |
|
|
'empty' => '',
|
1005 |
|
|
'hide_empty' => 0,
|
1006 |
|
|
'empty_zero' => 0,
|
1007 |
|
|
'date_format' => 'small',
|
1008 |
|
|
'custom_date_format' => '',
|
1009 |
|
|
'exclude' => 0,
|
1010 |
|
|
'id' => 'created',
|
1011 |
|
|
'table' => 'users',
|
1012 |
|
|
'field' => 'created',
|
1013 |
|
|
'relationship' => 'none',
|
1014 |
|
|
),
|
1015 |
|
|
'access' => array(
|
1016 |
|
|
'label' => 'Last access',
|
1017 |
|
|
'alter' => array(
|
1018 |
|
|
'alter_text' => 0,
|
1019 |
|
|
'text' => '',
|
1020 |
|
|
'make_link' => 0,
|
1021 |
|
|
'path' => '',
|
1022 |
|
|
'link_class' => '',
|
1023 |
|
|
'alt' => '',
|
1024 |
|
|
'prefix' => '',
|
1025 |
|
|
'suffix' => '',
|
1026 |
|
|
'target' => '',
|
1027 |
|
|
'help' => '',
|
1028 |
|
|
'trim' => 0,
|
1029 |
|
|
'max_length' => '',
|
1030 |
|
|
'word_boundary' => 1,
|
1031 |
|
|
'ellipsis' => 1,
|
1032 |
|
|
'strip_tags' => 0,
|
1033 |
|
|
'html' => 0,
|
1034 |
|
|
),
|
1035 |
|
|
'empty' => '',
|
1036 |
|
|
'hide_empty' => 0,
|
1037 |
|
|
'empty_zero' => 0,
|
1038 |
|
|
'date_format' => 'raw time ago',
|
1039 |
|
|
'custom_date_format' => '',
|
1040 |
|
|
'exclude' => 0,
|
1041 |
|
|
'id' => 'access',
|
1042 |
|
|
'table' => 'users',
|
1043 |
|
|
'field' => 'access',
|
1044 |
|
|
'relationship' => 'none',
|
1045 |
|
|
),
|
1046 |
|
|
'status' => array(
|
1047 |
|
|
'label' => 'Active',
|
1048 |
|
|
'alter' => array(
|
1049 |
|
|
'alter_text' => 0,
|
1050 |
|
|
'text' => '',
|
1051 |
|
|
'make_link' => 0,
|
1052 |
|
|
'path' => '',
|
1053 |
|
|
'link_class' => '',
|
1054 |
|
|
'alt' => '',
|
1055 |
|
|
'prefix' => '',
|
1056 |
|
|
'suffix' => '',
|
1057 |
|
|
'target' => '',
|
1058 |
|
|
'help' => '',
|
1059 |
|
|
'trim' => 0,
|
1060 |
|
|
'max_length' => '',
|
1061 |
|
|
'word_boundary' => 1,
|
1062 |
|
|
'ellipsis' => 1,
|
1063 |
|
|
'strip_tags' => 0,
|
1064 |
|
|
'html' => 0,
|
1065 |
|
|
),
|
1066 |
|
|
'empty' => '',
|
1067 |
|
|
'hide_empty' => 0,
|
1068 |
|
|
'empty_zero' => 0,
|
1069 |
|
|
'type' => 'yes-no',
|
1070 |
|
|
'not' => 0,
|
1071 |
|
|
'exclude' => 0,
|
1072 |
|
|
'id' => 'status',
|
1073 |
|
|
'table' => 'users',
|
1074 |
|
|
'field' => 'status',
|
1075 |
|
|
'relationship' => 'none',
|
1076 |
|
|
),
|
1077 |
|
|
'edit_node' => array(
|
1078 |
|
|
'label' => '',
|
1079 |
|
|
'alter' => array(
|
1080 |
|
|
'alter_text' => 0,
|
1081 |
|
|
'text' => '',
|
1082 |
|
|
'make_link' => 0,
|
1083 |
|
|
'path' => '',
|
1084 |
|
|
'link_class' => '',
|
1085 |
|
|
'alt' => '',
|
1086 |
|
|
'prefix' => '',
|
1087 |
|
|
'suffix' => '',
|
1088 |
|
|
'target' => '',
|
1089 |
|
|
'help' => '',
|
1090 |
|
|
'trim' => 0,
|
1091 |
|
|
'max_length' => '',
|
1092 |
|
|
'word_boundary' => 1,
|
1093 |
|
|
'ellipsis' => 1,
|
1094 |
|
|
'strip_tags' => 0,
|
1095 |
|
|
'html' => 0,
|
1096 |
|
|
),
|
1097 |
|
|
'empty' => '',
|
1098 |
|
|
'hide_empty' => 0,
|
1099 |
|
|
'empty_zero' => 0,
|
1100 |
|
|
'text' => 'edit user',
|
1101 |
|
|
'exclude' => 0,
|
1102 |
|
|
'id' => 'edit_node',
|
1103 |
|
|
'table' => 'users',
|
1104 |
|
|
'field' => 'edit_node',
|
1105 |
|
|
'relationship' => 'none',
|
1106 |
|
|
),
|
1107 |
|
|
));
|
1108 |
|
|
$handler->override_option('arguments', array(
|
1109 |
|
|
'ip_address' => array(
|
1110 |
|
|
'default_action' => 'ignore',
|
1111 |
|
|
'style_plugin' => 'default_summary',
|
1112 |
|
|
'style_options' => array(),
|
1113 |
|
|
'wildcard' => 'all',
|
1114 |
|
|
'wildcard_substitution' => 'All',
|
1115 |
|
|
'title' => 'Searching for: %1',
|
1116 |
|
|
'default_argument_type' => 'fixed',
|
1117 |
|
|
'default_argument' => '',
|
1118 |
|
|
'validate_type' => 'none',
|
1119 |
|
|
'validate_fail' => 'not found',
|
1120 |
|
|
'glossary' => 0,
|
1121 |
|
|
'limit' => '0',
|
1122 |
|
|
'case' => 'none',
|
1123 |
|
|
'path_case' => 'none',
|
1124 |
|
|
'transform_dash' => 0,
|
1125 |
|
|
'id' => 'ip_address',
|
1126 |
|
|
'table' => 'user_stats_ips',
|
1127 |
|
|
'field' => 'ip_address',
|
1128 |
|
|
'relationship' => 'none',
|
1129 |
|
|
'default_options_div_prefix' => '',
|
1130 |
|
|
'default_argument_user' => 0,
|
1131 |
|
|
'default_argument_fixed' => '',
|
1132 |
|
|
'default_argument_php' => '',
|
1133 |
|
|
'validate_argument_node_type' => array(
|
1134 |
|
|
'poll' => 0,
|
1135 |
|
|
'forum' => 0,
|
1136 |
|
|
'page' => 0,
|
1137 |
|
|
'project' => 0,
|
1138 |
|
|
'story' => 0,
|
1139 |
|
|
),
|
1140 |
|
|
'validate_argument_node_access' => 0,
|
1141 |
|
|
'validate_argument_nid_type' => 'nid',
|
1142 |
|
|
'validate_argument_vocabulary' => array(
|
1143 |
|
|
'1' => 0,
|
1144 |
|
|
'3' => 0,
|
1145 |
|
|
'4' => 0,
|
1146 |
|
|
),
|
1147 |
|
|
'validate_argument_type' => 'tid',
|
1148 |
|
|
'validate_argument_php' => '',
|
1149 |
|
|
),
|
1150 |
|
|
));
|
1151 |
|
|
$handler->override_option('filters', array(
|
1152 |
|
|
'ip_address' => array(
|
1153 |
|
|
'operator' => '!=',
|
1154 |
|
|
'value' => '',
|
1155 |
|
|
'group' => '0',
|
1156 |
|
|
'exposed' => FALSE,
|
1157 |
|
|
'expose' => array(
|
1158 |
|
|
'operator' => FALSE,
|
1159 |
|
|
'label' => '',
|
1160 |
|
|
),
|
1161 |
|
|
'case' => 1,
|
1162 |
|
|
'id' => 'ip_address',
|
1163 |
|
|
'table' => 'user_stats_ips',
|
1164 |
|
|
'field' => 'ip_address',
|
1165 |
|
|
'relationship' => 'none',
|
1166 |
|
|
),
|
1167 |
|
|
'ip_address_1' => array(
|
1168 |
|
|
'operator' => 'starts',
|
1169 |
|
|
'value' => '',
|
1170 |
|
|
'group' => '0',
|
1171 |
|
|
'exposed' => TRUE,
|
1172 |
|
|
'expose' => array(
|
1173 |
|
|
'use_operator' => 1,
|
1174 |
|
|
'operator' => 'ip_address_1_op',
|
1175 |
|
|
'identifier' => 'ip_address_1',
|
1176 |
|
|
'label' => 'IP address',
|
1177 |
|
|
'optional' => 1,
|
1178 |
|
|
'remember' => 0,
|
1179 |
|
|
),
|
1180 |
|
|
'case' => 1,
|
1181 |
|
|
'id' => 'ip_address_1',
|
1182 |
|
|
'table' => 'user_stats_ips',
|
1183 |
|
|
'field' => 'ip_address',
|
1184 |
|
|
'relationship' => 'none',
|
1185 |
|
|
),
|
1186 |
|
|
'status' => array(
|
1187 |
|
|
'operator' => '=',
|
1188 |
|
|
'value' => '1',
|
1189 |
|
|
'group' => '0',
|
1190 |
|
|
'exposed' => TRUE,
|
1191 |
|
|
'expose' => array(
|
1192 |
|
|
'operator' => '',
|
1193 |
|
|
'identifier' => 'status',
|
1194 |
|
|
'label' => 'User is active',
|
1195 |
|
|
'optional' => 1,
|
1196 |
|
|
'remember' => 1,
|
1197 |
|
|
),
|
1198 |
|
|
'id' => 'status',
|
1199 |
|
|
'table' => 'users',
|
1200 |
|
|
'field' => 'status',
|
1201 |
|
|
'relationship' => 'none',
|
1202 |
|
|
),
|
1203 |
|
|
));
|
1204 |
|
|
$handler->override_option('access', array(
|
1205 |
|
|
'type' => 'perm',
|
1206 |
|
|
'perm' => 'View IP addresses',
|
1207 |
|
|
));
|
1208 |
|
|
$handler->override_option('cache', array(
|
1209 |
|
|
'type' => 'none',
|
1210 |
|
|
));
|
1211 |
|
|
$handler->override_option('title', 'Users by IP address');
|
1212 |
|
|
$handler->override_option('empty', 'No IP address recorded.');
|
1213 |
|
|
$handler->override_option('empty_format', '1');
|
1214 |
|
|
$handler->override_option('items_per_page', 100);
|
1215 |
|
|
$handler->override_option('use_pager', '1');
|
1216 |
|
|
$handler->override_option('distinct', 1);
|
1217 |
|
|
$handler->override_option('style_plugin', 'table');
|
1218 |
|
|
$handler->override_option('style_options', array(
|
1219 |
|
|
'grouping' => 'ip_address',
|
1220 |
|
|
'override' => 1,
|
1221 |
|
|
'sticky' => 0,
|
1222 |
|
|
'order' => 'desc',
|
1223 |
|
|
'columns' => array(
|
1224 |
|
|
'ip_address' => 'ip_address',
|
1225 |
|
|
'name' => 'name',
|
1226 |
|
|
'ip_user_count' => 'ip_user_count',
|
1227 |
|
|
),
|
1228 |
|
|
'info' => array(
|
1229 |
|
|
'ip_address' => array(
|
1230 |
|
|
'separator' => '',
|
1231 |
|
|
),
|
1232 |
|
|
'name' => array(
|
1233 |
|
|
'sortable' => 0,
|
1234 |
|
|
'separator' => '',
|
1235 |
|
|
),
|
1236 |
|
|
'ip_user_count' => array(
|
1237 |
|
|
'sortable' => 1,
|
1238 |
|
|
'separator' => '',
|
1239 |
|
|
),
|
1240 |
|
|
),
|
1241 |
|
|
'default' => 'ip_user_count',
|
1242 |
|
|
));
|
1243 |
|
|
$handler = $view->new_display('page', 'Page', 'page_1');
|
1244 |
|
|
$handler->override_option('path', 'admin/reports/ip_tracking/by_ip');
|
1245 |
|
|
$handler->override_option('menu', array(
|
1246 |
|
|
'type' => 'default tab',
|
1247 |
|
|
'title' => 'Users by IP',
|
1248 |
|
|
'description' => 'Lookup IPs and view which users share IP addresses.',
|
1249 |
|
|
'weight' => '-2',
|
1250 |
|
|
'name' => 'navigation',
|
1251 |
|
|
));
|
1252 |
|
|
$handler->override_option('tab_options', array(
|
1253 |
|
|
'type' => 'normal',
|
1254 |
|
|
'title' => 'IP address tracking',
|
1255 |
|
|
'description' => 'View IP addresses and the users associated with them.',
|
1256 |
|
|
'weight' => '0',
|
1257 |
|
|
));
|
1258 |
|
|
$handler = $view->new_display('page', 'Lookup page', 'page_2');
|
1259 |
|
|
$handler->override_option('path', 'admin/reports/ip_tracking/by_ip/%');
|
1260 |
|
|
$handler->override_option('menu', array(
|
1261 |
|
|
'type' => 'none',
|
1262 |
|
|
'title' => '',
|
1263 |
|
|
'description' => '',
|
1264 |
|
|
'weight' => 0,
|
1265 |
|
|
'name' => 'navigation',
|
1266 |
|
|
));
|
1267 |
|
|
$handler->override_option('tab_options', array(
|
1268 |
|
|
'type' => 'none',
|
1269 |
|
|
'title' => '',
|
1270 |
|
|
'description' => '',
|
1271 |
|
|
'weight' => 0,
|
1272 |
|
|
));
|
1273 |
|
|
$views[$view->name] = $view;
|
1274 |
|
|
|
1275 |
|
|
return $views;
|
1276 |
|
|
} |