Fix for Code

  1. function special_bulletin_views_default_views() {
  2.  
  3.     $view = new view;
  4.     $view->name = 'special_bulletin';
  5.     $view->description = 'Loads a link field and title from the special_bulletin cck type.';
  6.     $view->tag = 'special_bulletin';
  7.     $view->view_php = '';
  8.     $view->base_table = 'node';
  9.     $view->is_cacheable = FALSE;
  10.     $view->api_version = 2;
  11.     $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  12.     $handler = $view->new_display('default', 'Defaults', 'default');
  13.     $handler->override_option('fields', array(
  14.       'field_special_bulletin_link_value' => array(
  15.         'label' => '',
  16.         'alter' => array(
  17.           'alter_text' => 0,
  18.           'text' => '',
  19.           'make_link' => 0,
  20.           'path' => '',
  21.           'link_class' => '',
  22.           'alt' => '',
  23.           'prefix' => '',
  24.           'suffix' => '',
  25.           'target' => '',
  26.           'help' => '',
  27.           'trim' => 0,
  28.           'max_length' => '',
  29.           'word_boundary' => 1,
  30.           'ellipsis' => 1,
  31.           'strip_tags' => 0,
  32.           'html' => 0,
  33.         ),
  34.         'empty' => '',
  35.         'hide_empty' => 0,
  36.         'empty_zero' => 0,
  37.         'link_to_node' => 0,
  38.         'label_type' => 'none',
  39.         'format' => 'plain',
  40.         'multiple' => array(
  41.           'group' => TRUE,
  42.           'multiple_number' => '',
  43.           'multiple_from' => '',
  44.           'multiple_reversed' => FALSE,
  45.         ),
  46.         'exclude' => 1,
  47.         'id' => 'field_special_bulletin_link_value',
  48.         'table' => 'node_data_field_special_bulletin_link',
  49.         'field' => 'field_special_bulletin_link_value',
  50.         'relationship' => 'none',
  51.       ),
  52.       'title' => array(
  53.         'label' => '',
  54.         'alter' => array(
  55.           'alter_text' => 0,
  56.           'text' => '',
  57.           'make_link' => 1,
  58.           'path' => '[field_special_bulletin_link_value]',
  59.           'link_class' => '',
  60.           'alt' => '',
  61.           'prefix' => '',
  62.           'suffix' => '',
  63.           'target' => '',
  64.           'help' => '',
  65.           'trim' => 0,
  66.           'max_length' => '',
  67.           'word_boundary' => 1,
  68.           'ellipsis' => 1,
  69.           'strip_tags' => 0,
  70.           'html' => 0,
  71.         ),
  72.         'empty' => '',
  73.         'hide_empty' => 0,
  74.         'empty_zero' => 0,
  75.         'link_to_node' => 0,
  76.         'exclude' => 0,
  77.         'id' => 'title',
  78.         'table' => 'node',
  79.         'field' => 'title',
  80.         'relationship' => 'none',
  81.       ),
  82.     ));
  83.     $handler->override_option('arguments', array(
  84.       'field_special_bulletin_page_display_value' => array(
  85.         'default_action' => 'ignore',
  86.         'style_plugin' => 'default_summary',
  87.         'style_options' => array(),
  88.         'wildcard' => 'all',
  89.         'wildcard_substitution' => 'All',
  90.         'title' => '',
  91.         'breadcrumb' => '',
  92.         'default_argument_type' => 'fixed',
  93.         'default_argument' => '',
  94.         'validate_type' => 'none',
  95.         'validate_fail' => 'not found',
  96.         'add_table' => 1,
  97.         'require_value' => 0,
  98.         'reduce_duplicates' => 1,
  99.         'id' => 'field_special_bulletin_page_display_value',
  100.         'table' => 'node_data_field_special_bulletin_page_display',
  101.         'field' => 'field_special_bulletin_page_display_value',
  102.         'validate_user_argument_type' => 'uid',
  103.         'validate_user_roles' => array(
  104.           '2' => 0,
  105.         ),
  106.         'relationship' => 'none',
  107.         'default_options_div_prefix' => '',
  108.         'default_argument_user' => 0,
  109.         'default_argument_fixed' => '',
  110.         'default_argument_php' => '',
  111.         'validate_argument_node_type' => array(
  112.           'page' => 0,
  113.           'special_bulletin' => 0,
  114.           'story' => 0,
  115.         ),
  116.         'validate_argument_node_access' => 0,
  117.         'validate_argument_nid_type' => 'nid',
  118.         'validate_argument_vocabulary' => array(),
  119.         'validate_argument_type' => 'tid',
  120.         'validate_argument_transform' => 0,
  121.         'validate_user_restrict_roles' => 0,
  122.         'validate_argument_php' => '',
  123.       ),
  124.     ));
  125.     $handler->override_option('filters', array(
  126.       'type' => array(
  127.         'operator' => 'in',
  128.         'value' => array(
  129.           'special_bulletin' => 'special_bulletin',
  130.         ),
  131.         'group' => '0',
  132.         'exposed' => FALSE,
  133.         'expose' => array(
  134.           'operator' => FALSE,
  135.           'label' => '',
  136.         ),
  137.         'id' => 'type',
  138.         'table' => 'node',
  139.         'field' => 'type',
  140.         'relationship' => 'none',
  141.       ),
  142.       'status' => array(
  143.         'operator' => '=',
  144.         'value' => '1',
  145.         'group' => '0',
  146.         'exposed' => FALSE,
  147.         'expose' => array(
  148.           'operator' => FALSE,
  149.           'label' => '',
  150.         ),
  151.         'id' => 'status',
  152.         'table' => 'node',
  153.         'field' => 'status',
  154.         'relationship' => 'none',
  155.       ),
  156.       'field_special_bulletin_active_value_many_to_one' => array(
  157.         'operator' => 'or',
  158.         'value' => array(
  159.           '1' => '1',
  160.         ),
  161.         'group' => '0',
  162.         'exposed' => FALSE,
  163.         'expose' => array(
  164.           'operator' => FALSE,
  165.           'label' => '',
  166.         ),
  167.         'id' => 'field_special_bulletin_active_value_many_to_one',
  168.         'table' => 'node_data_field_special_bulletin_active',
  169.         'field' => 'field_special_bulletin_active_value_many_to_one',
  170.         'relationship' => 'none',
  171.         'reduce_duplicates' => 0,
  172.       ),
  173.     ));
  174.     $handler->override_option('access', array(
  175.       'type' => 'none',
  176.     ));
  177.     $handler->override_option('cache', array(
  178.       'type' => 'none',
  179.     ));
  180.  
  181.  
  182. $views[$view->name] = $view;
  183.  
  184. return $views;
  185. }

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.