function user_views_default_views in Views (for Drupal 7) 5
File
- modules/
views_user.inc, line 137
Code
function user_views_default_views() {
$view = new stdClass();
$view->name = 'tracker';
$view->requires = array(
'node_comment_statistics',
);
$view->description = t('Shows all new activity on system.');
$view->page = true;
$view->url = 'tracker';
$view->page_title = t('Recent posts');
$view->page_type = 'table';
$view->use_pager = true;
$view->nodes_per_page = '25';
$view->menu = true;
$view->menu_title = t('Recent posts');
$view->block = false;
$view->field = array(
array(
'tablename' => 'node',
'field' => 'type',
'label' => t('Type'),
),
array(
'tablename' => 'node',
'field' => 'title',
'label' => t('Title'),
'handler' => 'views_handler_field_nodelink_with_mark',
),
array(
'tablename' => 'users',
'field' => 'name',
'label' => t('Author'),
),
array(
'tablename' => 'node_comment_statistics',
'field' => 'comment_count',
'label' => t('Replies'),
'handler' => 'views_handler_comments_with_new',
),
array(
'tablename' => 'node_comment_statistics',
'field' => 'last_comment_timestamp',
'label' => t('Last Post'),
'handler' => 'views_handler_field_since',
),
);
$view->sort = array(
array(
'tablename' => 'node_comment_statistics',
'field' => 'last_comment_timestamp',
'sortorder' => 'DESC',
),
);
$view->argument = array(
array(
'type' => 'uid',
'argdefault' => '2',
'title' => t('recent posts for %1'),
),
);
$view->filter = array(
array(
'tablename' => 'node',
'field' => 'status',
'operator' => '=',
'value' => '1',
),
);
$views[$view->name] = $view;
return $views;
}