<?php
// $Id: archive.inc,v 1.1.2.2 2006/12/20 17:02:20 merlinofchaos Exp $
// $Name: DRUPAL-4-7--1-1 $

function views_bonus_archive_info() {
  $items['archive'] = array(
    'name' => t('The monthly archive view'),
    'description' => t('Provides the classic monthly archive view as a default view. When activated, you will find the new view in administer >> views'),
  );
  return $items;
}

function views_bonus_archive_default_views() {
  $view = new stdClass();
  $view->name = 'archive';
  $view->description = t('Bonus Pack: Monthly archive');
  $view->access = array ();
  $view->view_args_php = 'if ($type == \'page\' && !$arg[0]) {
  $limit = 25;
}';
  $view->page = TRUE;
  $view->page_title = t('Month');
  $view->page_header = '';
  $view->page_header_format = '1';
  $view->page_footer = '';
  $view->page_footer_format = '1';
  $view->page_empty = '';
  $view->page_empty_format = '1';
  $view->page_type = 'teaser';
  $view->url = 'archive';
  $view->use_pager = TRUE;
  $view->nodes_per_page = '10';
  $view->block = TRUE;
  $view->block_title = t('Archive');
  $view->block_header = '';
  $view->block_header_format = '1';
  $view->block_footer = '';
  $view->block_footer_format = '1';
  $view->block_empty = '';
  $view->block_empty_format = '1';
  $view->block_type = 'teaser';
  $view->nodes_per_block = '5';
  $view->block_more = '1';
  $view->block_use_page_header = FALSE;
  $view->block_use_page_footer = FALSE;
  $view->block_use_page_empty = FALSE;
  $view->sort = array (
    array (
      'tablename' => 'node',
      'field' => 'created',
      'sortorder' => 'DESC',
      'options' => '',
    ),
  );
  $view->argument = array (
    array (
      'type' => 'monthyear',
      'argdefault' => '5',
      'title' => '%1',
      'options' => '',
      'wildcard' => '',
      'wildcard_substitution' => '',
    ),
  );
  $view->field = array (
  );
  $view->filter = array ();
  $view->exposed_filter = array (
  );
  $views[$view->name] = $view;

  return $views;
}
