[support] How To See Number Of Stories Posted By An Author

Swapnil swapnil.bhartiya at gmail.com
Tue Nov 20 08:29:58 UTC 2012


Hi Adan,

Thanks a lot. Just one tiny request. I want to be able to
1: expose views so I can enter name of the author and see only his stories
2: give a date range to see how many stories he posted from a-b date.

I really appreciate your help.

Swapnil

On 11/19/2012 02:13 PM, Idan Arbel wrote:
> $view = new view;
> $view->name = 'total';
> $view->description = '';
> $view->tag = 'default';
> $view->base_table = 'users';
> $view->human_name = 'total';
> $view->core = 7;
> $view->api_version = '3.0-alpha1';
> $view->disabled = FALSE; /* Edit this to true to make a default view 
> disabled initially */
>
> /* Display: Master */
> $handler = $view->new_display('default', 'Master', 'default');
> $handler->display->display_options['title'] = 'total';
> $handler->display->display_options['group_by'] = TRUE;
> $handler->display->display_options['access']['type'] = 'perm';
> $handler->display->display_options['access']['perm'] = 'access user 
> profiles';
> $handler->display->display_options['cache']['type'] = 'none';
> $handler->display->display_options['query']['type'] = 'views_query';
> $handler->display->display_options['query']['options']['distinct'] = TRUE;
> $handler->display->display_options['query']['options']['query_comment'] = 
> FALSE;
> $handler->display->display_options['exposed_form']['type'] = 'basic';
> $handler->display->display_options['pager']['type'] = 'full';
> $handler->display->display_options['pager']['options']['items_per_page'] 
> = '10';
> $handler->display->display_options['style_plugin'] = 'default';
> $handler->display->display_options['row_plugin'] = 'fields';
> $handler->display->display_options['row_options']['hide_empty'] = 0;
> $handler->display->display_options['row_options']['default_field_elements'] 
> = 1;
> /* Relationship: User: Content authored */
> $handler->display->display_options['relationships']['uid']['id'] = 'uid';
> $handler->display->display_options['relationships']['uid']['table'] = 
> 'users';
> $handler->display->display_options['relationships']['uid']['field'] = 
> 'uid';
> $handler->display->display_options['relationships']['uid']['required'] 
> = 0;
> /* Field: User: Name */
> $handler->display->display_options['fields']['name']['id'] = 'name';
> $handler->display->display_options['fields']['name']['table'] = 'users';
> $handler->display->display_options['fields']['name']['field'] = 'name';
> $handler->display->display_options['fields']['name']['label'] = '';
> $handler->display->display_options['fields']['name']['alter']['alter_text'] 
> = 0;
> $handler->display->display_options['fields']['name']['alter']['make_link'] 
> = 0;
> $handler->display->display_options['fields']['name']['alter']['absolute'] 
> = 0;
> $handler->display->display_options['fields']['name']['alter']['word_boundary'] 
> = 0;
> $handler->display->display_options['fields']['name']['alter']['ellipsis'] 
> = 0;
> $handler->display->display_options['fields']['name']['alter']['strip_tags'] 
> = 0;
> $handler->display->display_options['fields']['name']['alter']['trim'] = 0;
> $handler->display->display_options['fields']['name']['alter']['html'] = 0;
> $handler->display->display_options['fields']['name']['hide_empty'] = 0;
> $handler->display->display_options['fields']['name']['empty_zero'] = 0;
> $handler->display->display_options['fields']['name']['link_to_user'] = 1;
> $handler->display->display_options['fields']['name']['overwrite_anonymous'] 
> = 0;
> /* Field: COUNT(Content: Nid) */
> $handler->display->display_options['fields']['nid']['id'] = 'nid';
> $handler->display->display_options['fields']['nid']['table'] = 'node';
> $handler->display->display_options['fields']['nid']['field'] = 'nid';
> $handler->display->display_options['fields']['nid']['relationship'] = 
> 'uid';
> $handler->display->display_options['fields']['nid']['group_type'] = 
> 'count';
> $handler->display->display_options['fields']['nid']['alter']['alter_text'] 
> = 0;
> $handler->display->display_options['fields']['nid']['alter']['make_link'] 
> = 0;
> $handler->display->display_options['fields']['nid']['alter']['absolute'] 
> = 0;
> $handler->display->display_options['fields']['nid']['alter']['external'] 
> = 0;
> $handler->display->display_options['fields']['nid']['alter']['replace_spaces'] 
> = 0;
> $handler->display->display_options['fields']['nid']['alter']['trim_whitespace'] 
> = 0;
> $handler->display->display_options['fields']['nid']['alter']['nl2br'] = 0;
> $handler->display->display_options['fields']['nid']['alter']['word_boundary'] 
> = 1;
> $handler->display->display_options['fields']['nid']['alter']['ellipsis'] 
> = 1;
> $handler->display->display_options['fields']['nid']['alter']['strip_tags'] 
> = 0;
> $handler->display->display_options['fields']['nid']['alter']['trim'] = 0;
> $handler->display->display_options['fields']['nid']['alter']['html'] = 0;
> $handler->display->display_options['fields']['nid']['element_label_colon'] 
> = 1;
> $handler->display->display_options['fields']['nid']['element_default_classes'] 
> = 1;
> $handler->display->display_options['fields']['nid']['hide_empty'] = 0;
> $handler->display->display_options['fields']['nid']['empty_zero'] = 0;
> $handler->display->display_options['fields']['nid']['hide_alter_empty'] = 
> 0;
> $handler->display->display_options['fields']['nid']['format_plural'] = 0;
> /* Sort criterion: User: Created date */
> $handler->display->display_options['sorts']['created']['id'] = 'created';
> $handler->display->display_options['sorts']['created']['table'] = 'users';
> $handler->display->display_options['sorts']['created']['field'] = 
> 'created';
> $handler->display->display_options['sorts']['created']['order'] = 'DESC';
> /* Filter criterion: User: Active */
> $handler->display->display_options['filters']['status']['id'] = 'status';
> $handler->display->display_options['filters']['status']['table'] = 
> 'users';
> $handler->display->display_options['filters']['status']['field'] = 
> 'status';
> $handler->display->display_options['filters']['status']['value'] = '1';
> $handler->display->display_options['filters']['status']['group'] = 0;
> $handler->display->display_options['filters']['status']['expose']['operator'] 
> = FALSE;
>
> /* Display: Page */
> $handler = $view->new_display('page', 'Page', 'page');
> $handler->display->display_options['path'] = 'total';



More information about the support mailing list