1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276 |
- <?php
- /**
- * @file
- * Default views provided by the User Stats module.
- */
- /**
- * Implements hook_views_default_views().
- */
- function user_stats_views_default_views() {
- /*
- * View 'user_stats_ips_by_user'
- */
- $view = new view;
- $view->name = 'user_stats_ips_by_user';
- $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.';
- $view->tag = '';
- $view->view_php = '';
- $view->base_table = 'users';
- $view->is_cacheable = FALSE;
- $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('fields', array(
- 'name' => array(
- 'label' => 'Name',
- 'alter' => array(
- 'alter_text' => 1,
- 'text' => '<strong>[name]</strong>',
- 'make_link' => 0,
- 'path' => '',
- 'alt' => '',
- 'prefix' => '',
- 'suffix' => '',
- 'help' => '',
- 'trim' => 0,
- 'max_length' => '',
- 'word_boundary' => 1,
- 'ellipsis' => 1,
- 'html' => 0,
- ),
- 'link_to_user' => 1,
- 'exclude' => 1,
- 'id' => 'name',
- 'table' => 'users',
- 'field' => 'name',
- 'relationship' => 'none',
- ),
- 'ip_address' => array(
- 'label' => 'IP',
- 'alter' => array(
- 'alter_text' => 0,
- 'text' => '',
- 'make_link' => 1,
- 'path' => 'admin/reports/ip_tracking/by_ip/[ip_address]',
- 'link_class' => '',
- 'alt' => 'View other users with this IP address',
- 'prefix' => '',
- 'suffix' => '',
- 'target' => '',
- 'help' => '',
- 'trim' => 0,
- 'max_length' => '',
- 'word_boundary' => 1,
- 'ellipsis' => 1,
- 'strip_tags' => 0,
- 'html' => 0,
- ),
- 'empty' => '',
- 'hide_empty' => 0,
- 'empty_zero' => 0,
- 'exclude' => 0,
- 'id' => 'ip_address',
- 'table' => 'user_stats_ips',
- 'field' => 'ip_address',
- 'relationship' => 'none',
- 'override' => array(
- 'button' => 'Override',
- ),
- ),
- 'first_seen_timestamp' => array(
- 'label' => 'First seen',
- 'alter' => array(
- 'alter_text' => 0,
- 'text' => '',
- 'make_link' => 0,
- 'path' => '',
- 'alt' => '',
- 'prefix' => '',
- 'suffix' => '',
- 'help' => '',
- 'trim' => 0,
- 'max_length' => '',
- 'word_boundary' => 1,
- 'ellipsis' => 1,
- 'html' => 0,
- ),
- 'date_format' => 'small',
- 'custom_date_format' => '',
- 'exclude' => 0,
- 'id' => 'first_seen_timestamp',
- 'table' => 'user_stats_ips',
- 'field' => 'first_seen_timestamp',
- 'relationship' => 'none',
- ),
- 'ip_user_count' => array(
- 'label' => 'Users with IP',
- 'alter' => array(
- 'alter_text' => 0,
- 'text' => '',
- 'make_link' => 0,
- 'path' => '',
- 'alt' => '',
- 'prefix' => '',
- 'suffix' => '',
- 'help' => '',
- 'trim' => 0,
- 'max_length' => '',
- 'word_boundary' => 1,
- 'ellipsis' => 1,
- 'html' => 0,
- ),
- 'set_precision' => FALSE,
- 'precision' => 0,
- 'decimal' => '.',
- 'separator' => ',',
- 'prefix' => '',
- 'suffix' => '',
- 'exclude' => 0,
- 'id' => 'ip_user_count',
- 'table' => 'user_stats_ips',
- 'field' => 'ip_user_count',
- 'relationship' => 'none',
- ),
- 'user_ip_count' => array(
- 'label' => '',
- 'alter' => array(
- 'alter_text' => 0,
- 'text' => '',
- 'make_link' => 0,
- 'path' => '',
- 'alt' => '',
- 'prefix' => '',
- 'suffix' => '',
- 'help' => '',
- 'trim' => 0,
- 'max_length' => '',
- 'word_boundary' => 0,
- 'ellipsis' => 0,
- 'html' => 0,
- ),
- 'set_precision' => FALSE,
- 'precision' => 0,
- 'decimal' => '.',
- 'separator' => '',
- 'prefix' => '',
- 'suffix' => '',
- 'exclude' => 1,
- 'id' => 'user_ip_count',
- 'table' => 'user_stats_ips',
- 'field' => 'user_ip_count',
- 'relationship' => 'none',
- ),
- ));
- $handler->override_option('sorts', array(
- 'first_seen_timestamp' => array(
- 'order' => 'DESC',
- 'granularity' => 'second',
- 'id' => 'first_seen_timestamp',
- 'table' => 'user_stats_ips',
- 'field' => 'first_seen_timestamp',
- 'relationship' => 'none',
- ),
- ));
- $handler->override_option('arguments', array(
- 'name' => array(
- 'default_action' => 'ignore',
- 'style_plugin' => 'default_summary',
- 'style_options' => array(),
- 'wildcard' => 'all',
- 'wildcard_substitution' => 'All',
- 'title' => '',
- 'default_argument_type' => 'fixed',
- 'default_argument' => '',
- 'validate_type' => 'none',
- 'validate_fail' => 'not found',
- 'glossary' => 0,
- 'limit' => '0',
- 'case' => 'none',
- 'path_case' => 'none',
- 'transform_dash' => 0,
- 'id' => 'name',
- 'table' => 'users',
- 'field' => 'name',
- 'relationship' => 'none',
- 'default_options_div_prefix' => '',
- 'default_argument_user' => 0,
- 'default_argument_fixed' => '',
- 'default_argument_php' => '',
- 'validate_argument_node_type' => array(
- 'poll' => 0,
- 'forum' => 0,
- 'page' => 0,
- 'project' => 0,
- 'story' => 0,
- ),
- 'validate_argument_node_access' => 0,
- 'validate_argument_nid_type' => 'nid',
- 'validate_argument_vocabulary' => array(
- '1' => 0,
- '3' => 0,
- '4' => 0,
- ),
- 'validate_argument_type' => 'tid',
- 'validate_argument_php' => '',
- ),
- ));
- $handler->override_option('filters', array(
- 'uid' => array(
- 'operator' => 'in',
- 'value' => '',
- 'group' => '0',
- 'exposed' => TRUE,
- 'expose' => array(
- 'use_operator' => 1,
- 'operator' => 'uid_op',
- 'identifier' => 'uid',
- 'label' => 'Username',
- 'optional' => 1,
- 'remember' => 0,
- 'reduce' => 0,
- ),
- 'id' => 'uid',
- 'table' => 'users',
- 'field' => 'uid',
- 'relationship' => 'none',
- ),
- 'status' => array(
- 'operator' => '=',
- 'value' => '1',
- 'group' => '0',
- 'exposed' => TRUE,
- 'expose' => array(
- 'operator' => '',
- 'identifier' => 'status',
- 'label' => 'User is active',
- 'optional' => 1,
- 'remember' => 1,
- ),
- 'id' => 'status',
- 'table' => 'users',
- 'field' => 'status',
- 'relationship' => 'none',
- ),
- ));
- $handler->override_option('access', array(
- 'type' => 'perm',
- 'perm' => 'View IP addresses',
- ));
- $handler->override_option('cache', array(
- 'type' => 'none',
- ));
- $handler->override_option('title', 'IP address history by user');
- $handler->override_option('empty', 'No IP addresses found.');
- $handler->override_option('empty_format', '1');
- $handler->override_option('items_per_page', 100);
- $handler->override_option('use_pager', '1');
- $handler->override_option('distinct', 1);
- $handler->override_option('style_plugin', 'table');
- $handler->override_option('style_options', array(
- 'grouping' => 'name',
- 'override' => 1,
- 'sticky' => 0,
- 'order' => 'desc',
- 'columns' => array(
- 'name' => 'name',
- 'first_seen_timestamp' => 'first_seen_timestamp',
- 'ip_address' => 'ip_address',
- 'ip_user_count' => 'ip_user_count',
- 'user_ip_count' => 'user_ip_count',
- ),
- 'info' => array(
- 'name' => array(
- 'sortable' => 1,
- 'separator' => '',
- ),
- 'first_seen_timestamp' => array(
- 'sortable' => 1,
- 'separator' => '',
- ),
- 'ip_address' => array(
- 'separator' => '',
- ),
- 'ip_user_count' => array(
- 'sortable' => 1,
- 'separator' => '',
- ),
- 'user_ip_count' => array(
- 'sortable' => 0,
- 'separator' => '',
- ),
- ),
- 'default' => 'user_ip_count',
- ));
- $handler = $view->new_display('page', 'Page', 'page_1');
- $handler->override_option('path', 'admin/reports/ip_tracking/by_user');
- $handler->override_option('menu', array(
- 'type' => 'tab',
- 'title' => 'IPs by user',
- 'description' => 'Lookup users and view a history of their IP addresses.',
- 'weight' => '0',
- 'name' => 'navigation',
- ));
- $handler->override_option('tab_options', array(
- 'type' => 'tab',
- 'title' => '',
- 'description' => '',
- 'weight' => '0',
- ));
- $handler = $view->new_display('page', 'Lookup page', 'page_2');
- $handler->override_option('path', 'admin/reports/ip_tracking/by_user/%');
- $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,
- ));
- $handler = $view->new_display('page', 'User profile tab', 'page_3');
- $handler->override_option('fields', array(
- 'ip_address' => array(
- 'label' => 'IP',
- 'alter' => array(
- 'alter_text' => 0,
- 'text' => '',
- 'make_link' => 1,
- 'path' => 'admin/reports/ip_tracking/by_ip/[ip_address]',
- 'link_class' => '',
- 'alt' => 'View other users with this IP address',
- 'prefix' => '',
- 'suffix' => '',
- 'target' => '',
- 'help' => '',
- 'trim' => 0,
- 'max_length' => '',
- 'word_boundary' => 1,
- 'ellipsis' => 1,
- 'strip_tags' => 0,
- 'html' => 0,
- ),
- 'empty' => '',
- 'hide_empty' => 0,
- 'empty_zero' => 0,
- 'exclude' => 0,
- 'id' => 'ip_address',
- 'table' => 'user_stats_ips',
- 'field' => 'ip_address',
- 'relationship' => 'none',
- 'override' => array(
- 'button' => 'Override',
- ),
- ),
- 'first_seen_timestamp' => array(
- 'label' => 'First seen',
- 'alter' => array(
- 'alter_text' => 0,
- 'text' => '',
- 'make_link' => 0,
- 'path' => '',
- 'alt' => '',
- 'prefix' => '',
- 'suffix' => '',
- 'help' => '',
- 'trim' => 0,
- 'max_length' => '',
- 'word_boundary' => 1,
- 'ellipsis' => 1,
- 'html' => 0,
- ),
- 'date_format' => 'small',
- 'custom_date_format' => '',
- 'exclude' => 0,
- 'id' => 'first_seen_timestamp',
- 'table' => 'user_stats_ips',
- 'field' => 'first_seen_timestamp',
- 'relationship' => 'none',
- ),
- 'ip_user_count' => array(
- 'label' => 'Users with IP',
- 'alter' => array(
- 'alter_text' => 0,
- 'text' => '',
- 'make_link' => 0,
- 'path' => '',
- 'alt' => '',
- 'prefix' => '',
- 'suffix' => '',
- 'help' => '',
- 'trim' => 0,
- 'max_length' => '',
- 'word_boundary' => 1,
- 'ellipsis' => 1,
- 'html' => 0,
- ),
- 'set_precision' => FALSE,
- 'precision' => 0,
- 'decimal' => '.',
- 'separator' => ',',
- 'prefix' => '',
- 'suffix' => '',
- 'exclude' => 0,
- 'id' => 'ip_user_count',
- 'table' => 'user_stats_ips',
- 'field' => 'ip_user_count',
- 'relationship' => 'none',
- ),
- 'user_ip_count' => array(
- 'label' => '',
- 'alter' => array(
- 'alter_text' => 0,
- 'text' => '',
- 'make_link' => 0,
- 'path' => '',
- 'alt' => '',
- 'prefix' => '',
- 'suffix' => '',
- 'help' => '',
- 'trim' => 0,
- 'max_length' => '',
- 'word_boundary' => 0,
- 'ellipsis' => 0,
- 'html' => 0,
- ),
- 'set_precision' => FALSE,
- 'precision' => 0,
- 'decimal' => '.',
- 'separator' => '',
- 'prefix' => '',
- 'suffix' => '',
- 'exclude' => 1,
- 'id' => 'user_ip_count',
- 'table' => 'user_stats_ips',
- 'field' => 'user_ip_count',
- 'relationship' => 'none',
- ),
- ));
- $handler->override_option('arguments', array(
- 'uid' => array(
- 'default_action' => 'empty',
- 'style_plugin' => 'default_summary',
- 'style_options' => array(),
- 'wildcard' => 'all',
- 'wildcard_substitution' => 'All',
- 'title' => '',
- 'breadcrumb' => '',
- 'default_argument_type' => 'fixed',
- 'default_argument' => '',
- 'validate_type' => 'none',
- 'validate_fail' => 'not found',
- 'break_phrase' => 0,
- 'not' => 0,
- 'id' => 'uid',
- 'table' => 'users',
- 'field' => 'uid',
- 'validate_user_argument_type' => 'uid',
- 'validate_user_roles' => array(
- '2' => 0,
- '1000006' => 0,
- '1000047' => 0,
- '1000054' => 0,
- '1000059' => 0,
- '1000048' => 0,
- '1000002' => 0,
- '1000058' => 0,
- '1000056' => 0,
- '1000057' => 0,
- '1000046' => 0,
- '1000055' => 0,
- '1000051' => 0,
- '1000053' => 0,
- '1000003' => 0,
- ),
- 'override' => array(
- 'button' => 'Use default',
- ),
- 'relationship' => 'none',
- 'default_options_div_prefix' => '',
- 'default_argument_user' => 0,
- 'default_argument_fixed' => '',
- 'default_argument_php' => '',
- 'validate_argument_node_type' => array(
- 'poll' => 0,
- 'ad' => 0,
- 'forum' => 0,
- 'book' => 0,
- 'page' => 0,
- 'project' => 0,
- 'story' => 0,
- ),
- 'validate_argument_node_access' => 0,
- 'validate_argument_nid_type' => 'nid',
- 'validate_argument_vocabulary' => array(
- '1' => 0,
- '6' => 0,
- '3' => 0,
- '4' => 0,
- ),
- 'validate_argument_type' => 'tid',
- 'validate_argument_transform' => 0,
- 'validate_user_restrict_roles' => 0,
- 'validate_argument_node_flag_name' => '*relationship*',
- 'validate_argument_node_flag_test' => 'flaggable',
- 'validate_argument_node_flag_id_type' => 'id',
- 'validate_argument_user_flag_name' => '*relationship*',
- 'validate_argument_user_flag_test' => 'flaggable',
- 'validate_argument_user_flag_id_type' => 'id',
- 'validate_argument_php' => '',
- ),
- ));
- $handler->override_option('filters', array());
- $handler->override_option('path', 'user/%/ip_tracking');
- $handler->override_option('menu', array(
- 'type' => 'tab',
- 'title' => 'IP addresses',
- 'description' => '',
- 'weight' => '0',
- 'name' => 'navigation',
- ));
- $handler->override_option('tab_options', array(
- 'type' => 'none',
- 'title' => '',
- 'description' => '',
- 'weight' => '0',
- ));
- $views[$view->name] = $view;
- /*
- * View 'user_stats_online_users'
- */
- $view = new view;
- $view->name = 'user_stats_online_users';
- $view->description = 'A list of online users.';
- $view->tag = '';
- $view->view_php = '';
- $view->base_table = 'users';
- $view->is_cacheable = FALSE;
- $view->api_version = 2;
- $view->disabled = TRUE; /* Edit this to true to make a default view disabled initially */
- $handler = $view->new_display('default', 'Defaults', 'default');
- $handler->override_option('fields', array(
- 'name' => array(
- 'label' => '',
- 'alter' => array(
- 'alter_text' => 0,
- 'text' => '',
- 'make_link' => 0,
- 'path' => '',
- 'alt' => '',
- 'prefix' => '',
- 'suffix' => '',
- 'help' => '',
- 'trim' => 0,
- 'max_length' => '',
- 'word_boundary' => 1,
- 'ellipsis' => 1,
- 'html' => 0,
- ),
- 'link_to_user' => 1,
- 'overwrite_anonymous' => 0,
- 'anonymous_text' => '',
- 'exclude' => 0,
- 'id' => 'name',
- 'table' => 'users',
- 'field' => 'name',
- 'relationship' => 'none',
- ),
- ));
- $handler->override_option('filters', array(
- 'is_online' => array(
- 'operator' => '=',
- 'value' => '1',
- 'group' => '0',
- 'exposed' => FALSE,
- 'expose' => array(
- 'operator' => FALSE,
- 'label' => '',
- ),
- 'id' => 'is_online',
- 'table' => 'users',
- 'field' => 'is_online',
- 'relationship' => 'none',
- ),
- ));
- $handler->override_option('access', array(
- 'type' => 'perm',
- 'perm' => 'View statistics',
- ));
- $handler->override_option('cache', array(
- 'type' => 'none',
- ));
- $handler->override_option('title', 'Online users');
- $handler->override_option('use_ajax', TRUE);
- $handler->override_option('use_pager', 'mini');
- $handler->override_option('style_options', array(
- 'grouping' => '',
- ));
- $handler = $view->new_display('block', 'Block', 'block_1');
- $handler->override_option('block_description', 'Online users');
- $handler->override_option('block_caching', -1);
- $views[$view->name] = $view;
- /*
- * View 'user_stats_online_users_pictures'
- */
- $view = new view;
- $view->name = 'user_stats_online_users_pictures';
- $view->description = 'Shows who is online by displaying their user pictures (avatars).';
- $view->tag = '';
- $view->view_php = '';
- $view->base_table = 'users';
- $view->is_cacheable = FALSE;
- $view->api_version = 2;
- $view->disabled = TRUE; /* Edit this to true to make a default view disabled initially */
- $handler = $view->new_display('default', 'Defaults', 'default');
- $handler->override_option('fields', array(
- 'uid' => array(
- 'label' => 'Uid',
- 'alter' => array(
- 'alter_text' => 0,
- 'text' => '',
- 'make_link' => 0,
- 'path' => '',
- 'alt' => '',
- 'prefix' => '',
- 'suffix' => '',
- 'help' => '',
- 'trim' => 0,
- 'max_length' => '',
- 'word_boundary' => 1,
- 'ellipsis' => 1,
- 'html' => 0,
- ),
- 'link_to_user' => 0,
- 'exclude' => 1,
- 'id' => 'uid',
- 'table' => 'users',
- 'field' => 'uid',
- 'relationship' => 'none',
- ),
- 'picture_bare' => array(
- 'label' => '',
- 'alter' => array(
- 'alter_text' => 0,
- 'text' => '',
- 'make_link' => 1,
- 'path' => 'user/[uid]',
- 'alt' => '',
- 'prefix' => '',
- 'suffix' => '',
- 'help' => '',
- 'trim' => 0,
- 'max_length' => '',
- 'word_boundary' => 1,
- 'ellipsis' => 1,
- 'html' => 0,
- ),
- 'exclude' => 0,
- 'id' => 'picture_bare',
- 'table' => 'users',
- 'field' => 'picture_bare',
- 'relationship' => 'none',
- ),
- ));
- $handler->override_option('filters', array(
- 'is_online' => array(
- 'operator' => '=',
- 'value' => '1',
- 'group' => '0',
- 'exposed' => FALSE,
- 'expose' => array(
- 'operator' => FALSE,
- 'label' => '',
- ),
- 'id' => 'is_online',
- 'table' => 'users',
- 'field' => 'is_online',
- 'relationship' => 'none',
- ),
- ));
- $handler->override_option('access', array(
- 'type' => 'perm',
- 'perm' => 'View statistics',
- ));
- $handler->override_option('cache', array(
- 'type' => 'none',
- ));
- $handler->override_option('title', 'Online users');
- $handler->override_option('use_ajax', TRUE);
- $handler->override_option('use_pager', 'mini');
- $handler->override_option('style_options', array(
- 'grouping' => '',
- ));
- $handler = $view->new_display('block', 'Block', 'block_1');
- $handler->override_option('block_description', 'Online users (pictures)');
- $handler->override_option('block_caching', -1);
- $views[$view->name] = $view;
- /*
- * View 'user_stats_top_posters'
- */
- $view = new view;
- $view->name = 'user_stats_top_posters';
- $view->description = 'Provides a block and page showing users with the highest post counts.';
- $view->tag = '';
- $view->view_php = '';
- $view->base_table = 'users';
- $view->is_cacheable = FALSE;
- $view->api_version = 2;
- $view->disabled = TRUE; /* Edit this to true to make a default view disabled initially */
- $handler = $view->new_display('default', 'Defaults', 'default');
- $handler->override_option('fields', array(
- 'name' => array(
- 'label' => 'Name',
- 'alter' => array(
- 'alter_text' => 0,
- 'text' => '',
- 'make_link' => 0,
- 'path' => '',
- 'alt' => '',
- 'prefix' => '',
- 'suffix' => '',
- 'help' => '',
- 'trim' => 0,
- 'max_length' => '',
- 'word_boundary' => 1,
- 'ellipsis' => 1,
- 'html' => 0,
- ),
- 'link_to_user' => 1,
- 'exclude' => 0,
- 'id' => 'name',
- 'table' => 'users',
- 'field' => 'name',
- 'relationship' => 'none',
- ),
- 'value' => array(
- 'label' => 'Posts',
- 'alter' => array(
- 'alter_text' => 0,
- 'text' => '',
- 'make_link' => 0,
- 'path' => '',
- 'alt' => '',
- 'prefix' => '',
- 'suffix' => '',
- 'help' => '',
- 'trim' => 0,
- 'max_length' => '',
- 'word_boundary' => 1,
- 'ellipsis' => 1,
- 'html' => 0,
- ),
- 'set_precision' => FALSE,
- 'precision' => 0,
- 'decimal' => '.',
- 'separator' => ',',
- 'prefix' => '',
- 'suffix' => '',
- 'exclude' => 0,
- 'id' => 'value',
- 'table' => 'user_stats_values',
- 'field' => 'value',
- 'relationship' => 'none',
- ),
- ));
- $handler->override_option('sorts', array(
- 'value' => array(
- 'order' => 'DESC',
- 'id' => 'value',
- 'table' => 'user_stats_values',
- 'field' => 'value',
- 'relationship' => 'none',
- ),
- ));
- $handler->override_option('filters', array(
- 'name' => array(
- 'operator' => '=',
- 'value' => 'post_count',
- 'group' => '0',
- 'exposed' => FALSE,
- 'expose' => array(
- 'operator' => FALSE,
- 'label' => '',
- ),
- 'case' => 1,
- 'id' => 'name',
- 'table' => 'user_stats_values',
- 'field' => 'name',
- 'relationship' => 'none',
- ),
- 'status' => array(
- 'operator' => '=',
- 'value' => '1',
- 'group' => '0',
- 'exposed' => FALSE,
- 'expose' => array(
- 'operator' => FALSE,
- 'label' => '',
- ),
- 'id' => 'status',
- 'table' => 'users',
- 'field' => 'status',
- 'relationship' => 'none',
- ),
- ));
- $handler->override_option('access', array(
- 'type' => 'perm',
- 'perm' => 'View statistics',
- ));
- $handler->override_option('cache', array(
- 'type' => 'none',
- ));
- $handler->override_option('title', 'Top posters');
- $handler->override_option('items_per_page', 20);
- $handler->override_option('use_pager', '1');
- $handler->override_option('use_more', 0);
- $handler->override_option('style_plugin', 'table');
- $handler->override_option('style_options', array(
- 'grouping' => '',
- 'override' => 1,
- 'sticky' => 0,
- 'order' => 'asc',
- 'columns' => array(
- 'name' => 'name',
- 'value' => 'value',
- ),
- 'info' => array(
- 'name' => array(
- 'sortable' => 0,
- 'separator' => '',
- ),
- 'value' => array(
- 'sortable' => 0,
- 'separator' => '',
- ),
- ),
- 'default' => '-1',
- ));
- $handler = $view->new_display('block', 'Block', 'block_1');
- $handler->override_option('use_ajax', TRUE);
- $handler->override_option('items_per_page', 10);
- $handler->override_option('use_pager', 'mini');
- $handler->override_option('use_more', 1);
- $handler->override_option('block_description', 'Top 10 posters');
- $handler->override_option('block_caching', -1);
- $handler = $view->new_display('page', 'Page', 'page_1');
- $handler->override_option('path', 'top-posters');
- $handler->override_option('menu', array(
- 'type' => 'normal',
- 'title' => 'Top posters',
- 'description' => 'Site users ordered by post count',
- 'weight' => '0',
- 'name' => 'navigation',
- ));
- $handler->override_option('tab_options', array(
- 'type' => 'none',
- 'title' => '',
- 'description' => '',
- 'weight' => 0,
- ));
- $views[$view->name] = $view;
- /*
- * View 'user_stats_users_by_ip'
- */
- $view = new view;
- $view->name = 'user_stats_users_by_ip';
- $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.';
- $view->tag = '';
- $view->view_php = '';
- $view->base_table = 'users';
- $view->is_cacheable = FALSE;
- $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('fields', array(
- 'ip_address' => array(
- 'label' => 'IP',
- 'alter' => array(
- 'alter_text' => 1,
- 'text' => '<strong>[ip_address]</strong>',
- 'make_link' => 0,
- 'path' => '',
- 'alt' => '',
- 'prefix' => '',
- 'suffix' => '',
- 'help' => '',
- 'trim' => 0,
- 'max_length' => '',
- 'word_boundary' => 1,
- 'ellipsis' => 1,
- 'html' => 0,
- ),
- 'exclude' => 1,
- 'id' => 'ip_address',
- 'table' => 'user_stats_ips',
- 'field' => 'ip_address',
- 'relationship' => 'none',
- 'override' => array(
- 'button' => 'Override',
- ),
- ),
- 'name' => array(
- 'label' => 'Name',
- 'alter' => array(
- 'alter_text' => 0,
- 'text' => '',
- 'make_link' => 1,
- 'path' => 'admin/reports/ip_tracking/by_user/[name]',
- 'link_class' => '',
- 'alt' => 'View other IP addresses used by this user',
- 'prefix' => '',
- 'suffix' => '',
- 'target' => '',
- 'help' => '',
- 'trim' => 0,
- 'max_length' => '',
- 'word_boundary' => 1,
- 'ellipsis' => 1,
- 'strip_tags' => 0,
- 'html' => 0,
- ),
- 'empty' => '',
- 'hide_empty' => 0,
- 'empty_zero' => 0,
- 'link_to_user' => 0,
- 'overwrite_anonymous' => 0,
- 'anonymous_text' => '',
- 'exclude' => 0,
- 'id' => 'name',
- 'table' => 'users',
- 'field' => 'name',
- 'relationship' => 'none',
- 'override' => array(
- 'button' => 'Override',
- ),
- ),
- 'ip_user_count' => array(
- 'label' => 'Users with IP',
- 'alter' => array(
- 'alter_text' => 0,
- 'text' => '',
- 'make_link' => 0,
- 'path' => '',
- 'alt' => '',
- 'prefix' => '',
- 'suffix' => '',
- 'help' => '',
- 'trim' => 0,
- 'max_length' => '',
- 'word_boundary' => 1,
- 'ellipsis' => 1,
- 'html' => 0,
- ),
- 'set_precision' => FALSE,
- 'precision' => 0,
- 'decimal' => '.',
- 'separator' => ',',
- 'prefix' => '',
- 'suffix' => '',
- 'exclude' => 1,
- 'id' => 'ip_user_count',
- 'table' => 'user_stats_ips',
- 'field' => 'ip_user_count',
- 'relationship' => 'none',
- ),
- 'created' => array(
- 'label' => 'Created date',
- 'alter' => array(
- 'alter_text' => 0,
- 'text' => '',
- 'make_link' => 0,
- 'path' => '',
- 'link_class' => '',
- 'alt' => '',
- 'prefix' => '',
- 'suffix' => '',
- 'target' => '',
- 'help' => '',
- 'trim' => 0,
- 'max_length' => '',
- 'word_boundary' => 1,
- 'ellipsis' => 1,
- 'strip_tags' => 0,
- 'html' => 0,
- ),
- 'empty' => '',
- 'hide_empty' => 0,
- 'empty_zero' => 0,
- 'date_format' => 'small',
- 'custom_date_format' => '',
- 'exclude' => 0,
- 'id' => 'created',
- 'table' => 'users',
- 'field' => 'created',
- 'relationship' => 'none',
- ),
- 'access' => array(
- 'label' => 'Last access',
- 'alter' => array(
- 'alter_text' => 0,
- 'text' => '',
- 'make_link' => 0,
- 'path' => '',
- 'link_class' => '',
- 'alt' => '',
- 'prefix' => '',
- 'suffix' => '',
- 'target' => '',
- 'help' => '',
- 'trim' => 0,
- 'max_length' => '',
- 'word_boundary' => 1,
- 'ellipsis' => 1,
- 'strip_tags' => 0,
- 'html' => 0,
- ),
- 'empty' => '',
- 'hide_empty' => 0,
- 'empty_zero' => 0,
- 'date_format' => 'raw time ago',
- 'custom_date_format' => '',
- 'exclude' => 0,
- 'id' => 'access',
- 'table' => 'users',
- 'field' => 'access',
- 'relationship' => 'none',
- ),
- 'status' => array(
- 'label' => 'Active',
- 'alter' => array(
- 'alter_text' => 0,
- 'text' => '',
- 'make_link' => 0,
- 'path' => '',
- 'link_class' => '',
- 'alt' => '',
- 'prefix' => '',
- 'suffix' => '',
- 'target' => '',
- 'help' => '',
- 'trim' => 0,
- 'max_length' => '',
- 'word_boundary' => 1,
- 'ellipsis' => 1,
- 'strip_tags' => 0,
- 'html' => 0,
- ),
- 'empty' => '',
- 'hide_empty' => 0,
- 'empty_zero' => 0,
- 'type' => 'yes-no',
- 'not' => 0,
- 'exclude' => 0,
- 'id' => 'status',
- 'table' => 'users',
- 'field' => 'status',
- 'relationship' => 'none',
- ),
- 'edit_node' => array(
- 'label' => '',
- 'alter' => array(
- 'alter_text' => 0,
- 'text' => '',
- 'make_link' => 0,
- 'path' => '',
- 'link_class' => '',
- 'alt' => '',
- 'prefix' => '',
- 'suffix' => '',
- 'target' => '',
- 'help' => '',
- 'trim' => 0,
- 'max_length' => '',
- 'word_boundary' => 1,
- 'ellipsis' => 1,
- 'strip_tags' => 0,
- 'html' => 0,
- ),
- 'empty' => '',
- 'hide_empty' => 0,
- 'empty_zero' => 0,
- 'text' => 'edit user',
- 'exclude' => 0,
- 'id' => 'edit_node',
- 'table' => 'users',
- 'field' => 'edit_node',
- 'relationship' => 'none',
- ),
- ));
- $handler->override_option('arguments', array(
- 'ip_address' => array(
- 'default_action' => 'ignore',
- 'style_plugin' => 'default_summary',
- 'style_options' => array(),
- 'wildcard' => 'all',
- 'wildcard_substitution' => 'All',
- 'title' => 'Searching for: %1',
- 'default_argument_type' => 'fixed',
- 'default_argument' => '',
- 'validate_type' => 'none',
- 'validate_fail' => 'not found',
- 'glossary' => 0,
- 'limit' => '0',
- 'case' => 'none',
- 'path_case' => 'none',
- 'transform_dash' => 0,
- 'id' => 'ip_address',
- 'table' => 'user_stats_ips',
- 'field' => 'ip_address',
- 'relationship' => 'none',
- 'default_options_div_prefix' => '',
- 'default_argument_user' => 0,
- 'default_argument_fixed' => '',
- 'default_argument_php' => '',
- 'validate_argument_node_type' => array(
- 'poll' => 0,
- 'forum' => 0,
- 'page' => 0,
- 'project' => 0,
- 'story' => 0,
- ),
- 'validate_argument_node_access' => 0,
- 'validate_argument_nid_type' => 'nid',
- 'validate_argument_vocabulary' => array(
- '1' => 0,
- '3' => 0,
- '4' => 0,
- ),
- 'validate_argument_type' => 'tid',
- 'validate_argument_php' => '',
- ),
- ));
- $handler->override_option('filters', array(
- 'ip_address' => array(
- 'operator' => '!=',
- 'value' => '',
- 'group' => '0',
- 'exposed' => FALSE,
- 'expose' => array(
- 'operator' => FALSE,
- 'label' => '',
- ),
- 'case' => 1,
- 'id' => 'ip_address',
- 'table' => 'user_stats_ips',
- 'field' => 'ip_address',
- 'relationship' => 'none',
- ),
- 'ip_address_1' => array(
- 'operator' => 'starts',
- 'value' => '',
- 'group' => '0',
- 'exposed' => TRUE,
- 'expose' => array(
- 'use_operator' => 1,
- 'operator' => 'ip_address_1_op',
- 'identifier' => 'ip_address_1',
- 'label' => 'IP address',
- 'optional' => 1,
- 'remember' => 0,
- ),
- 'case' => 1,
- 'id' => 'ip_address_1',
- 'table' => 'user_stats_ips',
- 'field' => 'ip_address',
- 'relationship' => 'none',
- ),
- 'status' => array(
- 'operator' => '=',
- 'value' => '1',
- 'group' => '0',
- 'exposed' => TRUE,
- 'expose' => array(
- 'operator' => '',
- 'identifier' => 'status',
- 'label' => 'User is active',
- 'optional' => 1,
- 'remember' => 1,
- ),
- 'id' => 'status',
- 'table' => 'users',
- 'field' => 'status',
- 'relationship' => 'none',
- ),
- ));
- $handler->override_option('access', array(
- 'type' => 'perm',
- 'perm' => 'View IP addresses',
- ));
- $handler->override_option('cache', array(
- 'type' => 'none',
- ));
- $handler->override_option('title', 'Users by IP address');
- $handler->override_option('empty', 'No IP address recorded.');
- $handler->override_option('empty_format', '1');
- $handler->override_option('items_per_page', 100);
- $handler->override_option('use_pager', '1');
- $handler->override_option('distinct', 1);
- $handler->override_option('style_plugin', 'table');
- $handler->override_option('style_options', array(
- 'grouping' => 'ip_address',
- 'override' => 1,
- 'sticky' => 0,
- 'order' => 'desc',
- 'columns' => array(
- 'ip_address' => 'ip_address',
- 'name' => 'name',
- 'ip_user_count' => 'ip_user_count',
- ),
- 'info' => array(
- 'ip_address' => array(
- 'separator' => '',
- ),
- 'name' => array(
- 'sortable' => 0,
- 'separator' => '',
- ),
- 'ip_user_count' => array(
- 'sortable' => 1,
- 'separator' => '',
- ),
- ),
- 'default' => 'ip_user_count',
- ));
- $handler = $view->new_display('page', 'Page', 'page_1');
- $handler->override_option('path', 'admin/reports/ip_tracking/by_ip');
- $handler->override_option('menu', array(
- 'type' => 'default tab',
- 'title' => 'Users by IP',
- 'description' => 'Lookup IPs and view which users share IP addresses.',
- 'weight' => '-2',
- 'name' => 'navigation',
- ));
- $handler->override_option('tab_options', array(
- 'type' => 'normal',
- 'title' => 'IP address tracking',
- 'description' => 'View IP addresses and the users associated with them.',
- 'weight' => '0',
- ));
- $handler = $view->new_display('page', 'Lookup page', 'page_2');
- $handler->override_option('path', 'admin/reports/ip_tracking/by_ip/%');
- $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,
- ));
- $views[$view->name] = $view;
- return $views;
- }
|