You are here

function forward_views_default_views in Forward 5

Same name and namespace in other branches
  1. 6 forward.views_default.inc \forward_views_default_views()
  2. 7.3 views/forward.views_default.inc \forward_views_default_views()
  3. 7 forward.views_default.inc \forward_views_default_views()
  4. 7.2 views/forward.views_default.inc \forward_views_default_views()

File

./forward.module, line 1114

Code

function forward_views_default_views() {

  // Most Forwarded
  $view = new stdClass();
  $view->name = 'forward_forwards';
  $view->description = 'Display most forwarded nodes';
  $view->access = array();
  $view->view_args_php = '';
  $view->block = TRUE;
  $view->block_title = 'Most forwarded';
  $view->block_header = '';
  $view->block_header_format = '3';
  $view->block_footer = '';
  $view->block_footer_format = '3';
  $view->block_empty = '';
  $view->block_empty_format = '3';
  $view->block_type = 'list';
  $view->nodes_per_block = '5';
  $view->block_more = FALSE;
  $view->block_use_page_header = FALSE;
  $view->block_use_page_footer = FALSE;
  $view->block_use_page_empty = FALSE;
  $view->sort = array(
    array(
      'tablename' => 'forward_statistics',
      'field' => 'forward_count',
      'sortorder' => 'DESC',
      'options' => '',
    ),
  );
  $view->argument = array();
  $view->field = array(
    array(
      'tablename' => 'node',
      'field' => 'title',
      'label' => '',
      'handler' => 'views_handler_field_nodelink',
      'options' => 'link',
    ),
    array(
      'tablename' => 'forward_statistics',
      'field' => 'forward_count',
      'label' => 'forwards',
    ),
  );
  $view->filter = array();
  $view->exposed_filter = array();
  $view->requires = array(
    forward_statistics,
    node,
  );
  $views[$view->name] = $view;

  // Most Clickthroughs
  $view = new stdClass();
  $view->name = 'forward_clickthroughs';
  $view->description = 'Display nodes with highest forward clickthrough rate';
  $view->access = array();
  $view->view_args_php = '';
  $view->block = TRUE;
  $view->block_title = 'Most clickthroughs';
  $view->block_header = '';
  $view->block_header_format = '3';
  $view->block_footer = '';
  $view->block_footer_format = '3';
  $view->block_empty = '';
  $view->block_empty_format = '3';
  $view->block_type = 'list';
  $view->nodes_per_block = '5';
  $view->block_more = FALSE;
  $view->block_use_page_header = FALSE;
  $view->block_use_page_footer = FALSE;
  $view->block_use_page_empty = FALSE;
  $view->sort = array(
    array(
      'tablename' => 'forward_statistics',
      'field' => 'clickthrough_count',
      'sortorder' => 'DESC',
      'options' => '',
    ),
  );
  $view->argument = array();
  $view->field = array(
    array(
      'tablename' => 'node',
      'field' => 'title',
      'label' => '',
      'handler' => 'views_handler_field_nodelink',
      'options' => 'link',
    ),
    array(
      'tablename' => 'forward_statistics',
      'field' => 'clickthrough_count',
      'label' => 'clickthroughs',
    ),
  );
  $view->filter = array();
  $view->exposed_filter = array();
  $view->requires = array(
    forward_statistics,
    node,
  );
  $views[$view->name] = $view;

  /*// Most Active
    $view = new stdClass();
    $view->name = 'forward_active';
    $view->description = 'Display most active nodes (forwards + comments)';
    $view->access = array();
    $view->view_args_php = '';
    $view->block = TRUE;
    $view->block_title = 'Most active';
    $view->block_header = '';
    $view->block_header_format = '3';
    $view->block_footer = '';
    $view->block_footer_format = '3';
    $view->block_empty = '';
    $view->block_empty_format = '3';
    $view->block_type = 'list';
    $view->nodes_per_block = '5';
    $view->block_more = FALSE;
    $view->block_use_page_header = FALSE;
    $view->block_use_page_footer = FALSE;
    $view->block_use_page_empty = FALSE;
    $view->sort = array (
      array (
        'tablename' => 'node_comment_statistics',
        'field' => 'active',
        'sortorder' => 'DESC',
        'options' => '',
      ),
    );
    $view->argument = array (
    );
    $view->field = array (
      array (
        'tablename' => 'node',
        'field' => 'title',
        'label' => '',
        'handler' => 'views_handler_field_nodelink',
        'options' => 'link',
      ),
      array (
        'tablename' => 'forward_statistics',
        'field' => 'clickthrough_count',
        'label' => 'clickthroughs',
      ),
      array (
        'tablename' => 'forward_statistics',
        'field' => 'forward_count',
        'label' => 'forwards',
      ),
    );
    $view->filter = array();
    $view->exposed_filter = array();
    $view->requires = array(forward_statistics, node_comment_statistics, node);
    $views[$view->name] = $view;*/
  return $views;
}