Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Advertising

Archive View
Thursday, September 2nd, 2010 at 12:00:01am MDT 

  1. $view = new view;
  2. $view->name = 'archive_year';
  3. $view->description = 'Content archive';
  4. $view->tag = '';
  5. $view->view_php = '';
  6. $view->base_table = 'node';
  7. $view->is_cacheable = FALSE;
  8. $view->api_version = 2;
  9. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  10. $handler = $view->new_display('default', 'Defaults', 'default');
  11. $handler->override_option('sorts', array(
  12.   'created' => array(
  13.     'id' => 'created',
  14.     'table' => 'node',
  15.     'field' => 'created',
  16.     'order' => 'DESC',
  17.     'granularity' => 'second',
  18.     'relationship' => 'none',
  19.   ),
  20. ));
  21. $handler->override_option('arguments', array(
  22.   'created_year' => array(
  23.     'default_action' => 'summary desc',
  24.     'style_plugin' => 'default_summary',
  25.     'style_options' => array(
  26.       'count' => 1,
  27.       'override' => 0,
  28.       'items_per_page' => '25',
  29.     ),
  30.     'wildcard' => 'all',
  31.     'wildcard_substitution' => 'All',
  32.     'title' => '',
  33.     'breadcrumb' => '',
  34.     'default_argument_type' => 'fixed',
  35.     'default_argument' => '',
  36.     'validate_type' => 'none',
  37.     'validate_fail' => 'not found',
  38.     'id' => 'created_year',
  39.     'table' => 'node',
  40.     'field' => 'created_year',
  41.     'validate_user_argument_type' => 'uid',
  42.     'validate_user_roles' => array(
  43.       '2' => 0,
  44.       '3' => 0,
  45.       '4' => 0,
  46.     ),
  47.     'relationship' => 'none',
  48.     'default_options_div_prefix' => '',
  49.     'default_argument_fixed' => '',
  50.     'default_argument_user' => 0,
  51.     'default_argument_php' => '',
  52.     'validate_argument_node_type' => array(
  53.       'undpaul_news' => 0,
  54.       'page' => 0,
  55.       'story' => 0,
  56.     ),
  57.     'validate_argument_node_access' => 0,
  58.     'validate_argument_nid_type' => 'nid',
  59.     'validate_argument_vocabulary' => array(
  60.       '1' => 0,
  61.     ),
  62.     'validate_argument_type' => 'tid',
  63.     'validate_argument_transform' => 0,
  64.     'validate_user_restrict_roles' => 0,
  65.     'validate_argument_node_flag_name' => '*relationship*',
  66.     'validate_argument_node_flag_test' => 'flaggable',
  67.     'validate_argument_node_flag_id_type' => 'id',
  68.     'validate_argument_user_flag_name' => '*relationship*',
  69.     'validate_argument_user_flag_test' => 'flaggable',
  70.     'validate_argument_user_flag_id_type' => 'id',
  71.     'validate_argument_php' => '',
  72.   ),
  73.   'created_month' => array(
  74.     'default_action' => 'summary asc',
  75.     'style_plugin' => 'default_summary',
  76.     'style_options' => array(
  77.       'count' => 1,
  78.       'override' => 1,
  79.       'items_per_page' => '12',
  80.     ),
  81.     'wildcard' => 'all',
  82.     'wildcard_substitution' => 'All',
  83.     'title' => '',
  84.     'breadcrumb' => '',
  85.     'default_argument_type' => 'fixed',
  86.     'default_argument' => '',
  87.     'validate_type' => 'none',
  88.     'validate_fail' => 'not found',
  89.     'id' => 'created_month',
  90.     'table' => 'node',
  91.     'field' => 'created_month',
  92.     'validate_user_argument_type' => 'uid',
  93.     'validate_user_roles' => array(
  94.       '2' => 0,
  95.       '3' => 0,
  96.       '4' => 0,
  97.     ),
  98.     'relationship' => 'none',
  99.     'default_options_div_prefix' => '',
  100.     'default_argument_fixed' => '',
  101.     'default_argument_user' => 0,
  102.     'default_argument_php' => '',
  103.     'validate_argument_node_type' => array(
  104.       'undpaul_news' => 0,
  105.       'page' => 0,
  106.       'story' => 0,
  107.     ),
  108.     'validate_argument_node_access' => 0,
  109.     'validate_argument_nid_type' => 'nid',
  110.     'validate_argument_vocabulary' => array(
  111.       '1' => 0,
  112.     ),
  113.     'validate_argument_type' => 'tid',
  114.     'validate_argument_transform' => 0,
  115.     'validate_user_restrict_roles' => 0,
  116.     'validate_argument_node_flag_name' => '*relationship*',
  117.     'validate_argument_node_flag_test' => 'flaggable',
  118.     'validate_argument_node_flag_id_type' => 'id',
  119.     'validate_argument_user_flag_name' => '*relationship*',
  120.     'validate_argument_user_flag_test' => 'flaggable',
  121.     'validate_argument_user_flag_id_type' => 'id',
  122.     'validate_argument_php' => '',
  123.   ),
  124. ));
  125. $handler->override_option('filters', array(
  126.   'status' => array(
  127.     'id' => 'status',
  128.     'table' => 'node',
  129.     'field' => 'status',
  130.     'operator' => '=',
  131.     'value' => 1,
  132.     'group' => 0,
  133.     'exposed' => FALSE,
  134.     'expose' => array(
  135.       'operator' => FALSE,
  136.       'label' => '',
  137.     ),
  138.     'relationship' => 'none',
  139.   ),
  140. ));
  141. $handler->override_option('access', array(
  142.   'type' => 'none',
  143.   'role' => array(),
  144.   'perm' => '',
  145. ));
  146. $handler->override_option('cache', array(
  147.   'type' => 'none',
  148. ));
  149. $handler->override_option('title', 'Archive');
  150. $handler->override_option('use_pager', '1');
  151. $handler->override_option('row_plugin', 'node');
  152. $handler->override_option('row_options', array(
  153.   'teaser' => TRUE,
  154.   'links' => TRUE,
  155. ));
  156. $handler = $view->new_display('page', 'Page', 'page');
  157. $handler->override_option('path', 'archive');
  158. $handler->override_option('menu', array(
  159.   'type' => 'none',
  160.   'title' => '',
  161.   'description' => '',
  162.   'weight' => 0,
  163.   'name' => 'navigation',
  164. ));
  165. $handler->override_option('tab_options', array(
  166.   'type' => 'none',
  167.   'title' => '',
  168.   'description' => '',
  169.   'weight' => 0,
  170.   'name' => 'navigation',
  171. ));

Paste Details

Tags: drupal

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

worth-right
fantasy-obligation
fantasy-obligation