$view = new view; $view->name = 'CiviMembv1'; $view->description = ''; $view->tag = ''; $view->base_table = 'civicrm_membership'; $view->core = 6; $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('relationships', array( 'drupal_id' => array( 'label' => 'Drupal User', 'required' => 0, 'id' => 'drupal_id', 'table' => 'civicrm_contact', 'field' => 'drupal_id', 'relationship' => 'none', ), )); $handler->override_option('fields', array( 'id' => array( 'label' => 'Member ID', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'absolute' => 0, 'link_class' => '', 'alt' => '', 'rel' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'html' => 0, 'strip_tags' => 0, ), 'empty' => '', 'hide_empty' => 0, 'empty_zero' => 0, 'hide_alter_empty' => 1, 'set_precision' => FALSE, 'precision' => 0, 'decimal' => '.', 'separator' => '', 'format_plural' => 0, 'format_plural_singular' => '1', 'format_plural_plural' => '@count', 'prefix' => '', 'suffix' => '', 'exclude' => 0, 'id' => 'id', 'table' => 'civicrm_contact', 'field' => 'id', 'relationship' => 'none', ), 'membership_type' => array( 'id' => 'membership_type', 'table' => 'civicrm_membership', 'field' => 'membership_type', 'exclude' => 0, 'relationship' => 'none', 'label' => 'Type', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'absolute' => 0, 'link_class' => '', 'alt' => '', 'rel' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 0, 'ellipsis' => 0, 'html' => 0, 'strip_tags' => 0, ), 'empty' => '', 'empty_zero' => 0, 'hide_empty' => 0, 'hide_alter_empty' => 0, ), 'join_date' => array( 'label' => 'Join Date', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'absolute' => 0, 'link_class' => '', 'alt' => '', 'rel' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'html' => 0, 'strip_tags' => 0, ), 'empty' => '', 'hide_empty' => 0, 'empty_zero' => 0, 'hide_alter_empty' => 1, 'date_format' => 'custom', 'custom_date_format' => 'd M Y', 'exclude' => 0, 'id' => 'join_date', 'table' => 'civicrm_membership', 'field' => 'join_date', 'relationship' => 'none', ), 'end_date' => array( 'label' => 'End Date', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'absolute' => 0, 'link_class' => '', 'alt' => '', 'rel' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'html' => 0, 'strip_tags' => 0, ), 'empty' => '', 'hide_empty' => 0, 'empty_zero' => 0, 'hide_alter_empty' => 1, 'date_format' => 'custom', 'custom_date_format' => 'd M Y', 'exclude' => 0, 'id' => 'end_date', 'table' => 'civicrm_membership', 'field' => 'end_date', 'relationship' => 'none', ), )); $handler->override_option('filters', array( 'uid_current' => array( 'operator' => '=', 'value' => '1', 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'uid_current', 'table' => 'users', 'field' => 'uid_current', 'relationship' => 'drupal_id', 'override' => array( 'button' => 'Override', ), ), )); $handler->override_option('access', array( 'type' => 'none', )); $handler->override_option('cache', array( 'type' => 'none', )); $handler = $view->new_display('block', 'Block', 'block_1'); $handler->override_option('title', 'My Membership'); $handler->override_option('block_description', ''); $handler->override_option('block_caching', -1);