Drupal views: upcoming event block


$view = new view;
$view->name = 'og_event';
$view->description = 'Volgende keer block';
$view->tag = 'volgende keer';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
'title' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 1,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
),
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
'field_datum_value' => array(
'id' => 'field_datum_value',
'table' => 'node_data_field_datum',
'field' => 'field_datum_value',
),
));
$handler->override_option('sorts', array(
'field_datum_value' => array(
'order' => 'ASC',
'delta' => -1,
'id' => 'field_datum_value',
'table' => 'node_data_field_datum',
'field' => 'field_datum_value',
'relationship' => 'none',
),
));
$handler->override_option('arguments', array(
'group_nid' => array(
'default_action' => 'default',
'style_plugin' => 'default_summary',
'style_options' => array(),
'wildcard' => 'all',
'wildcard_substitution' => 'Alle',
'title' => '',
'breadcrumb' => '',
'default_argument_type' => 'php',
'default_argument' => '',
'validate_type' => 'og_group_types',
'validate_fail' => 'not found',
'break_phrase' => 0,
'not' => 0,
'id' => 'group_nid',
'table' => 'og_ancestry',
'field' => 'group_nid',
'validate_user_argument_type' => 'uid',
'validate_user_roles' => array(
'2' => 0,
'5' => 0,
'3' => 0,
'4' => 0,
),
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_user' => 0,
'default_argument_fixed' => '',
'default_argument_php' => 'if ($node = og_get_group_context()) {
return $node->nid;
}
else {
return NULL;
}',
'validate_argument_node_type' => array(
'event2' => 'event2',
'poll' => 0,
'faq' => 0,
'event' => 0,
'group' => 0,
'page' => 0,
'startpagina' => 0,
'story' => 0,
'takpagina' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_user_restrict_roles' => 0,
'validate_argument_is_member' => 0,
'validate_argument_php' => '',
'override' => array(
'button' => 'Override',
),
),
));
$handler->override_option('filters', array(
'date_filter' => array(
'operator' => '=',
'value' => array(
'min' => NULL,
'max' => NULL,
'value' => NULL,
'default_date' => 'now',
'default_to_date' => '',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'date_fields' => array(
'node_data_field_datum.field_datum_value' => 'node_data_field_datum.field_datum_value',
),
'date_method' => 'OR',
'granularity' => 'day',
'form_type' => 'date_popup',
'default_date' => 'now',
'default_to_date' => '',
'year_range' => '-3:+3',
'id' => 'date_filter',
'table' => 'node',
'field' => 'date_filter',
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('cache', array(
'type' => 'none',
));
$handler->override_option('header', '
<h2><img style="position: relative; top: 5px; height: 26px; width: 26px;" src="/files/toeter.gif" alt="toeter" /> Volgende keer</h2>
');
$handler->override_option('header_format', '2');
$handler->override_option('header_empty', 1);
$handler->override_option('footer', '
');
$handler->override_option('footer_format', '2');
$handler->override_option('footer_empty', 0);
$handler->override_option('empty', 'Geen vergaderingen gevonden.');
$handler->override_option('empty_format', '2');
$handler->override_option('items_per_page', 1);
$handler->override_option('use_more', 1);
$handler = $view->new_display('block', 'Blok', 'block_1');
$handler->override_option('filters', array(
'type' => array(
'operator' => 'in',
'value' => array(
'event2' => 'event2',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
'date_filter' => array(
'operator' => '>=',
'value' => array(
'value' => NULL,
'min' => NULL,
'max' => NULL,
'default_date' => 'now',
'default_to_date' => '',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'date_fields' => array(
'node_data_field_datum.field_datum_value' => 'node_data_field_datum.field_datum_value',
),
'date_method' => 'OR',
'granularity' => 'day',
'form_type' => 'date_popup',
'default_date' => 'now',
'default_to_date' => '',
'year_range' => '-3:+3',
'id' => 'date_filter',
'table' => 'node',
'field' => 'date_filter',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
));
$handler->override_option('block_description', '');
$handler->override_option('block_caching', -1);

Reageer