Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 14.33 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. $view = new view;
  2. $view->name = 'blog';
  3. $view->description = 'Provides some blog listings';
  4. $view->tag = 'blog';
  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('fields', array(
  12.   'title' => array(
  13.     'label' => '',
  14.     'alter' => array(
  15.       'alter_text' => 0,
  16.       'text' => '',
  17.       'make_link' => 0,
  18.       'path' => '',
  19.       'link_class' => '',
  20.       'alt' => '',
  21.       'prefix' => '',
  22.       'suffix' => '',
  23.       'target' => '',
  24.       'help' => '',
  25.       'trim' => 0,
  26.       'max_length' => '',
  27.       'word_boundary' => 1,
  28.       'ellipsis' => 1,
  29.       'html' => 0,
  30.       'strip_tags' => 0,
  31.     ),
  32.     'empty' => '',
  33.     'hide_empty' => 0,
  34.     'empty_zero' => 0,
  35.     'link_to_node' => 1,
  36.     'exclude' => 0,
  37.     'id' => 'title',
  38.     'table' => 'node',
  39.     'field' => 'title',
  40.     'relationship' => 'none',
  41.   ),
  42.   'created' => array(
  43.     'label' => 'Post date',
  44.     'alter' => array(
  45.       'alter_text' => 0,
  46.       'text' => '',
  47.       'make_link' => 0,
  48.       'path' => '',
  49.       'link_class' => '',
  50.       'alt' => '',
  51.       'prefix' => '',
  52.       'suffix' => '',
  53.       'target' => '',
  54.       'help' => '',
  55.       'trim' => 0,
  56.       'max_length' => '',
  57.       'word_boundary' => 1,
  58.       'ellipsis' => 1,
  59.       'html' => 0,
  60.       'strip_tags' => 0,
  61.     ),
  62.     'empty' => '',
  63.     'hide_empty' => 0,
  64.     'empty_zero' => 0,
  65.     'date_format' => 'small',
  66.     'custom_date_format' => '',
  67.     'exclude' => 0,
  68.     'id' => 'created',
  69.     'table' => 'node',
  70.     'field' => 'created',
  71.     'relationship' => 'none',
  72.   ),
  73.   'teaser' => array(
  74.     'label' => 'Teaser',
  75.     'alter' => array(
  76.       'alter_text' => 0,
  77.       'text' => '',
  78.       'make_link' => 0,
  79.       'path' => '',
  80.       'link_class' => '',
  81.       'alt' => '',
  82.       'prefix' => '',
  83.       'suffix' => '',
  84.       'target' => '',
  85.       'help' => '',
  86.       'trim' => 0,
  87.       'max_length' => '',
  88.       'word_boundary' => 1,
  89.       'ellipsis' => 1,
  90.       'html' => 0,
  91.       'strip_tags' => 0,
  92.     ),
  93.     'empty' => '',
  94.     'hide_empty' => 0,
  95.     'empty_zero' => 0,
  96.     'exclude' => 0,
  97.     'id' => 'teaser',
  98.     'table' => 'node_revisions',
  99.     'field' => 'teaser',
  100.     'relationship' => 'none',
  101.   ),
  102.   'timestamp' => array(
  103.     'label' => 'Created date',
  104.     'alter' => array(
  105.       'alter_text' => 0,
  106.       'text' => '',
  107.       'make_link' => 0,
  108.       'path' => '',
  109.       'link_class' => '',
  110.       'alt' => '',
  111.       'prefix' => '',
  112.       'suffix' => '',
  113.       'target' => '',
  114.       'help' => '',
  115.       'trim' => 0,
  116.       'max_length' => '',
  117.       'word_boundary' => 1,
  118.       'ellipsis' => 1,
  119.       'html' => 0,
  120.       'strip_tags' => 0,
  121.     ),
  122.     'empty' => '',
  123.     'hide_empty' => 0,
  124.     'empty_zero' => 0,
  125.     'date_format' => 'small',
  126.     'custom_date_format' => '',
  127.     'exclude' => 0,
  128.     'id' => 'timestamp',
  129.     'table' => 'node_revisions',
  130.     'field' => 'timestamp',
  131.     'relationship' => 'none',
  132.   ),
  133.   'tid' => array(
  134.     'label' => 'All terms',
  135.     'alter' => array(
  136.       'alter_text' => 0,
  137.       'text' => '',
  138.       'make_link' => 0,
  139.       'path' => '',
  140.       'link_class' => '',
  141.       'alt' => '',
  142.       'prefix' => '',
  143.       'suffix' => '',
  144.       'target' => '',
  145.       'help' => '',
  146.       'trim' => 0,
  147.       'max_length' => '',
  148.       'word_boundary' => 1,
  149.       'ellipsis' => 1,
  150.       'html' => 0,
  151.       'strip_tags' => 0,
  152.     ),
  153.     'empty' => '',
  154.     'hide_empty' => 0,
  155.     'empty_zero' => 0,
  156.     'type' => 'separator',
  157.     'separator' => ', ',
  158.     'link_to_taxonomy' => 1,
  159.     'limit' => 0,
  160.     'vids' => array(
  161.       '1' => 0,
  162.       '2' => 0,
  163.     ),
  164.     'exclude' => 0,
  165.     'id' => 'tid',
  166.     'table' => 'term_node',
  167.     'field' => 'tid',
  168.     'relationship' => 'none',
  169.   ),
  170.   'name' => array(
  171.     'label' => 'Name',
  172.     'alter' => array(
  173.       'alter_text' => 0,
  174.       'text' => '',
  175.       'make_link' => 0,
  176.       'path' => '',
  177.       'link_class' => '',
  178.       'alt' => '',
  179.       'prefix' => '',
  180.       'suffix' => '',
  181.       'target' => '',
  182.       'help' => '',
  183.       'trim' => 0,
  184.       'max_length' => '',
  185.       'word_boundary' => 1,
  186.       'ellipsis' => 1,
  187.       'html' => 0,
  188.       'strip_tags' => 0,
  189.     ),
  190.     'empty' => '',
  191.     'hide_empty' => 0,
  192.     'empty_zero' => 0,
  193.     'link_to_user' => 1,
  194.     'overwrite_anonymous' => 0,
  195.     'anonymous_text' => '',
  196.     'exclude' => 0,
  197.     'id' => 'name',
  198.     'table' => 'users',
  199.     'field' => 'name',
  200.     'relationship' => 'none',
  201.   ),
  202.   'picture' => array(
  203.     'label' => 'Picture',
  204.     'alter' => array(
  205.       'alter_text' => 0,
  206.       'text' => '',
  207.       'make_link' => 0,
  208.       'path' => '',
  209.       'link_class' => '',
  210.       'alt' => '',
  211.       'prefix' => '',
  212.       'suffix' => '',
  213.       'target' => '',
  214.       'help' => '',
  215.       'trim' => 0,
  216.       'max_length' => '',
  217.       'word_boundary' => 1,
  218.       'ellipsis' => 1,
  219.       'html' => 0,
  220.       'strip_tags' => 0,
  221.     ),
  222.     'empty' => '',
  223.     'hide_empty' => 0,
  224.     'empty_zero' => 0,
  225.     'exclude' => 0,
  226.     'id' => 'picture',
  227.     'table' => 'users',
  228.     'field' => 'picture',
  229.     'relationship' => 'none',
  230.   ),
  231. ));
  232. $handler->override_option('arguments', array(
  233.   'created_year' => array(
  234.     'default_action' => 'ignore',
  235.     'style_plugin' => 'default_summary',
  236.     'style_options' => array(
  237.       'count' => 1,
  238.       'override' => 0,
  239.       'items_per_page' => '25',
  240.     ),
  241.     'wildcard' => 'all',
  242.     'wildcard_substitution' => 'All',
  243.     'title' => 'Blog archive: %1',
  244.     'breadcrumb' => '',
  245.     'default_argument_type' => 'fixed',
  246.     'default_argument' => '',
  247.     'validate_type' => 'none',
  248.     'validate_fail' => 'not found',
  249.     'id' => 'created_year',
  250.     'table' => 'node',
  251.     'field' => 'created_year',
  252.     'validate_user_argument_type' => 'uid',
  253.     'validate_user_roles' => array(
  254.       '2' => 0,
  255.       '4' => 0,
  256.       '5' => 0,
  257.       '6' => 0,
  258.       '3' => 0,
  259.     ),
  260.     'relationship' => 'none',
  261.     'default_options_div_prefix' => '',
  262.     'default_argument_fixed' => '',
  263.     'default_argument_user' => 0,
  264.     'default_argument_php' => '',
  265.     'validate_argument_node_type' => array(
  266.       'blog' => 0,
  267.       'document' => 0,
  268.       'page' => 0,
  269.       'poll' => 0,
  270.       'story' => 0,
  271.     ),
  272.     'validate_argument_node_access' => 0,
  273.     'validate_argument_nid_type' => 'nid',
  274.     'validate_argument_vocabulary' => array(
  275.       '3' => 0,
  276.       '4' => 0,
  277.       '1' => 0,
  278.       '2' => 0,
  279.     ),
  280.     'validate_argument_type' => 'tid',
  281.     'validate_argument_transform' => 0,
  282.     'validate_user_restrict_roles' => 0,
  283.     'validate_argument_php' => '',
  284.     'override' => array(
  285.       'button' => 'Override',
  286.     ),
  287.     'me_redirect' => 0,
  288.     'me_validate_user_argument_type' => 'uid',
  289.     'me_validate_user_roles' => array(
  290.       '2' => 0,
  291.       '4' => 0,
  292.       '5' => 0,
  293.       '6' => 0,
  294.       '3' => 0,
  295.     ),
  296.     'me_validate_user_restrict_roles' => 0,
  297.   ),
  298.   'created_month' => array(
  299.     'default_action' => 'ignore',
  300.     'style_plugin' => 'default_summary',
  301.     'style_options' => array(
  302.       'count' => 1,
  303.       'override' => 0,
  304.       'items_per_page' => '25',
  305.     ),
  306.     'wildcard' => 'all',
  307.     'wildcard_substitution' => 'All',
  308.     'title' => 'Blog archive: %1 / %2',
  309.     'breadcrumb' => '%1',
  310.     'default_argument_type' => 'fixed',
  311.     'default_argument' => '',
  312.     'validate_type' => 'none',
  313.     'validate_fail' => 'not found',
  314.     'id' => 'created_month',
  315.     'table' => 'node',
  316.     'field' => 'created_month',
  317.     'validate_user_argument_type' => 'uid',
  318.     'validate_user_roles' => array(
  319.       '2' => 0,
  320.       '4' => 0,
  321.       '5' => 0,
  322.       '6' => 0,
  323.       '3' => 0,
  324.     ),
  325.     'relationship' => 'none',
  326.     'default_options_div_prefix' => '',
  327.     'default_argument_fixed' => '',
  328.     'default_argument_user' => 0,
  329.     'default_argument_php' => '',
  330.     'validate_argument_node_type' => array(
  331.       'blog' => 0,
  332.       'document' => 0,
  333.       'page' => 0,
  334.       'poll' => 0,
  335.       'story' => 0,
  336.     ),
  337.     'validate_argument_node_access' => 0,
  338.     'validate_argument_nid_type' => 'nid',
  339.     'validate_argument_vocabulary' => array(
  340.       '3' => 0,
  341.       '4' => 0,
  342.       '1' => 0,
  343.       '2' => 0,
  344.     ),
  345.     'validate_argument_type' => 'tid',
  346.     'validate_argument_transform' => 0,
  347.     'validate_user_restrict_roles' => 0,
  348.     'validate_argument_php' => '',
  349.     'override' => array(
  350.       'button' => 'Override',
  351.     ),
  352.     'me_redirect' => 0,
  353.     'me_validate_user_argument_type' => 'uid',
  354.     'me_validate_user_roles' => array(
  355.       '2' => 0,
  356.       '4' => 0,
  357.       '5' => 0,
  358.       '6' => 0,
  359.       '3' => 0,
  360.     ),
  361.     'me_validate_user_restrict_roles' => 0,
  362.   ),
  363.   'created_day' => array(
  364.     'default_action' => 'ignore',
  365.     'style_plugin' => 'default_summary',
  366.     'style_options' => array(
  367.       'count' => 1,
  368.       'override' => 0,
  369.       'items_per_page' => '25',
  370.     ),
  371.     'wildcard' => 'all',
  372.     'wildcard_substitution' => 'All',
  373.     'title' => 'Blog archive: %1 / %2 / %3',
  374.     'breadcrumb' => '%2',
  375.     'default_argument_type' => 'fixed',
  376.     'default_argument' => '',
  377.     'validate_type' => 'none',
  378.     'validate_fail' => 'not found',
  379.     'id' => 'created_day',
  380.     'table' => 'node',
  381.     'field' => 'created_day',
  382.     'validate_user_argument_type' => 'uid',
  383.     'validate_user_roles' => array(
  384.       '2' => 0,
  385.       '4' => 0,
  386.       '5' => 0,
  387.       '6' => 0,
  388.       '3' => 0,
  389.     ),
  390.     'relationship' => 'none',
  391.     'default_options_div_prefix' => '',
  392.     'default_argument_fixed' => '',
  393.     'default_argument_user' => 0,
  394.     'default_argument_php' => '',
  395.     'validate_argument_node_type' => array(
  396.       'blog' => 0,
  397.       'document' => 0,
  398.       'page' => 0,
  399.       'poll' => 0,
  400.       'story' => 0,
  401.     ),
  402.     'validate_argument_node_access' => 0,
  403.     'validate_argument_nid_type' => 'nid',
  404.     'validate_argument_vocabulary' => array(
  405.       '3' => 0,
  406.       '4' => 0,
  407.       '1' => 0,
  408.       '2' => 0,
  409.     ),
  410.     'validate_argument_type' => 'tid',
  411.     'validate_argument_transform' => 0,
  412.     'validate_user_restrict_roles' => 0,
  413.     'validate_argument_php' => '',
  414.     'override' => array(
  415.       'button' => 'Override',
  416.     ),
  417.     'me_redirect' => 0,
  418.     'me_validate_user_argument_type' => 'uid',
  419.     'me_validate_user_roles' => array(
  420.       '2' => 0,
  421.       '4' => 0,
  422.       '5' => 0,
  423.       '6' => 0,
  424.       '3' => 0,
  425.     ),
  426.     'me_validate_user_restrict_roles' => 0,
  427.   ),
  428.   'created_year_month' => array(
  429.     'id' => 'created_year_month',
  430.     'table' => 'node',
  431.     'field' => 'created_year_month',
  432.   ),
  433. ));
  434. $handler->override_option('filters', array(
  435.   'status' => array(
  436.     'operator' => '=',
  437.     'value' => '1',
  438.     'group' => '0',
  439.     'exposed' => FALSE,
  440.     'expose' => array(
  441.       'operator' => FALSE,
  442.       'label' => '',
  443.     ),
  444.     'id' => 'status',
  445.     'table' => 'node',
  446.     'field' => 'status',
  447.     'relationship' => 'none',
  448.   ),
  449.   'type' => array(
  450.     'operator' => 'in',
  451.     'value' => array(
  452.       'blog' => 'blog',
  453.     ),
  454.     'group' => '0',
  455.     'exposed' => FALSE,
  456.     'expose' => array(
  457.       'operator' => FALSE,
  458.       'label' => '',
  459.     ),
  460.     'id' => 'type',
  461.     'table' => 'node',
  462.     'field' => 'type',
  463.     'relationship' => 'none',
  464.   ),
  465. ));
  466. $handler->override_option('access', array(
  467.   'type' => 'none',
  468. ));
  469. $handler->override_option('cache', array(
  470.   'type' => 'none',
  471. ));
  472. $handler->override_option('title', 'Blog');
  473. $handler->override_option('items_per_page', 8);
  474. $handler->override_option('use_pager', '1');
  475. $handler->override_option('row_plugin', 'node');
  476. $handler->override_option('row_options', array(
  477.   'relationship' => 'none',
  478.   'build_mode' => 'teaser',
  479.   'links' => 1,
  480.   'comments' => 0,
  481. ));
  482. $handler = $view->new_display('page', 'Page', 'page_1');
  483. $handler->override_option('path', 'blog');
  484. $handler->override_option('menu', array(
  485.   'type' => 'none',
  486.   'title' => '',
  487.   'description' => '',
  488.   'weight' => 0,
  489.   'name' => 'navigation',
  490. ));
  491. $handler->override_option('tab_options', array(
  492.   'type' => 'none',
  493.   'title' => '',
  494.   'description' => '',
  495.   'weight' => 0,
  496.   'name' => 'navigation',
  497. ));
  498. $handler = $view->new_display('block', 'Block', 'block_1');
  499. $handler->override_option('arguments', array(
  500.   'created_year_month' => array(
  501.     'default_action' => 'summary desc',
  502.     'style_plugin' => 'default_summary',
  503.     'style_options' => array(
  504.       'count' => 1,
  505.       'override' => 0,
  506.       'items_per_page' => '25',
  507.     ),
  508.     'wildcard' => 'all',
  509.     'wildcard_substitution' => 'All',
  510.     'title' => '',
  511.     'breadcrumb' => '',
  512.     'default_argument_type' => 'fixed',
  513.     'default_argument' => '',
  514.     'validate_type' => 'none',
  515.     'validate_fail' => 'not found',
  516.     'id' => 'created_year_month',
  517.     'table' => 'node',
  518.     'field' => 'created_year_month',
  519.     'validate_user_argument_type' => 'uid',
  520.     'validate_user_roles' => array(
  521.       '2' => 0,
  522.       '4' => 0,
  523.       '5' => 0,
  524.       '6' => 0,
  525.       '3' => 0,
  526.     ),
  527.     'me_redirect' => 0,
  528.     'me_validate_user_argument_type' => 'uid',
  529.     'me_validate_user_roles' => array(
  530.       '2' => 0,
  531.       '4' => 0,
  532.       '5' => 0,
  533.       '6' => 0,
  534.       '3' => 0,
  535.     ),
  536.     'override' => array(
  537.       'button' => 'Use default',
  538.     ),
  539.     'relationship' => 'none',
  540.     'default_options_div_prefix' => '',
  541.     'default_argument_fixed' => '',
  542.     'default_argument_user' => 0,
  543.     'default_argument_php' => '',
  544.     'validate_argument_node_type' => array(
  545.       'blog' => 0,
  546.       'document' => 0,
  547.       'page' => 0,
  548.       'poll' => 0,
  549.       'story' => 0,
  550.     ),
  551.     'validate_argument_node_access' => 0,
  552.     'validate_argument_nid_type' => 'nid',
  553.     'validate_argument_vocabulary' => array(
  554.       '3' => 0,
  555.       '4' => 0,
  556.       '1' => 0,
  557.       '2' => 0,
  558.     ),
  559.     'validate_argument_type' => 'tid',
  560.     'validate_argument_transform' => 0,
  561.     'validate_user_restrict_roles' => 0,
  562.     'validate_argument_php' => '',
  563.     'me_validate_user_restrict_roles' => 0,
  564.   ),
  565. ));
  566. $handler->override_option('items_per_page', 0);
  567. $handler->override_option('use_pager', '0');
  568. $handler->override_option('block_description', 'Blog Archive');
  569. $handler->override_option('block_caching', -1);