Skip to content

Instantly share code, notes, and snippets.

@ceejayoz
Created August 27, 2009 19:41

Revisions

  1. ceejayoz created this gist Aug 27, 2009.
    302 changes: 302 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,302 @@
    $view = new view;
    $view->name = 'admin_users';
    $view->description = '';
    $view->tag = '';
    $view->view_php = '';
    $view->base_table = 'users';
    $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(
    'mail' => array(
    'label' => 'E-mail',
    'alter' => array(
    'alter_text' => 0,
    'text' => '',
    'make_link' => 0,
    'path' => '',
    'link_class' => '',
    'alt' => '',
    'prefix' => '',
    'suffix' => '',
    'help' => '',
    'trim' => 0,
    'max_length' => '',
    'word_boundary' => 1,
    'ellipsis' => 1,
    'strip_tags' => 0,
    'html' => 0,
    ),
    'link_to_user' => 'user',
    'exclude' => 0,
    'id' => 'mail',
    'table' => 'users',
    'field' => 'mail',
    'relationship' => 'none',
    'override' => array(
    'button' => 'Override',
    ),
    ),
    'status' => array(
    'label' => 'Active',
    'alter' => array(
    'alter_text' => 0,
    'text' => '',
    'make_link' => 0,
    'path' => '',
    'link_class' => '',
    'alt' => '',
    'prefix' => '',
    'suffix' => '',
    'help' => '',
    'trim' => 0,
    'max_length' => '',
    'word_boundary' => 1,
    'ellipsis' => 1,
    'strip_tags' => 0,
    'html' => 0,
    ),
    'type' => 'yes-no',
    'not' => 0,
    'exclude' => 0,
    'id' => 'status',
    'table' => 'users',
    'field' => 'status',
    'relationship' => 'none',
    ),
    'created' => array(
    'label' => 'Created',
    'alter' => array(
    'alter_text' => 0,
    'text' => '',
    'make_link' => 0,
    'path' => '',
    'link_class' => '',
    'alt' => '',
    'prefix' => '',
    'suffix' => '',
    'help' => '',
    'trim' => 0,
    'max_length' => '',
    'word_boundary' => 1,
    'ellipsis' => 1,
    'strip_tags' => 0,
    'html' => 0,
    ),
    'date_format' => 'small',
    'custom_date_format' => '',
    'exclude' => 0,
    'id' => 'created',
    'table' => 'users',
    'field' => 'created',
    'relationship' => 'none',
    ),
    'login' => array(
    'label' => 'Last login',
    'alter' => array(
    'alter_text' => 0,
    'text' => '',
    'make_link' => 0,
    'path' => '',
    'link_class' => '',
    'alt' => '',
    'prefix' => '',
    'suffix' => '',
    'help' => '',
    'trim' => 0,
    'max_length' => '',
    'word_boundary' => 1,
    'ellipsis' => 1,
    'strip_tags' => 0,
    'html' => 0,
    ),
    'date_format' => 'time ago',
    'custom_date_format' => '',
    'exclude' => 0,
    'id' => 'login',
    'table' => 'users',
    'field' => 'login',
    'relationship' => 'none',
    ),
    'access' => array(
    'label' => 'Last access',
    'alter' => array(
    'alter_text' => 0,
    'text' => '',
    'make_link' => 0,
    'path' => '',
    'link_class' => '',
    'alt' => '',
    'prefix' => '',
    'suffix' => '',
    'help' => '',
    'trim' => 0,
    'max_length' => '',
    'word_boundary' => 1,
    'ellipsis' => 1,
    'strip_tags' => 0,
    'html' => 0,
    ),
    'date_format' => 'time ago',
    'custom_date_format' => '',
    'exclude' => 0,
    'id' => 'access',
    'table' => 'users',
    'field' => 'access',
    'relationship' => 'none',
    ),
    'edit_node' => array(
    'label' => '',
    'alter' => array(
    'alter_text' => 0,
    'text' => '',
    'make_link' => 0,
    'path' => '',
    'link_class' => '',
    'alt' => '',
    'prefix' => '',
    'suffix' => '',
    'help' => '',
    'trim' => 0,
    'max_length' => '',
    'word_boundary' => 1,
    'ellipsis' => 1,
    'strip_tags' => 0,
    'html' => 0,
    ),
    'text' => '',
    'exclude' => 0,
    'id' => 'edit_node',
    'table' => 'users',
    'field' => 'edit_node',
    'relationship' => 'none',
    ),
    ));
    $handler->override_option('filters', array(
    'uid' => array(
    'operator' => 'not in',
    'value' => array(
    '0' => 0,
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
    'operator' => FALSE,
    'label' => '',
    ),
    'id' => 'uid',
    'table' => 'users',
    'field' => 'uid',
    'relationship' => 'none',
    ),
    'mail' => array(
    'operator' => 'starts',
    'value' => '',
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
    'use_operator' => 1,
    'operator' => 'mail_op',
    'identifier' => 'mail',
    'label' => 'E-mail address',
    'optional' => 1,
    'remember' => 0,
    ),
    'case' => 0,
    'id' => 'mail',
    'table' => 'users',
    'field' => 'mail',
    'override' => array(
    'button' => 'Override',
    ),
    'relationship' => 'none',
    ),
    ));
    $handler->override_option('access', array(
    'type' => 'role',
    'role' => array(
    '5' => 5,
    '3' => 3,
    '4' => 4,
    ),
    ));
    $handler->override_option('cache', array(
    'type' => 'none',
    ));
    $handler->override_option('items_per_page', 50);
    $handler->override_option('use_pager', '1');
    $handler->override_option('style_plugin', 'bulk');
    $handler->override_option('style_options', array(
    'grouping' => '',
    'override' => 1,
    'sticky' => 1,
    'order' => 'desc',
    'columns' => array(
    'mail' => 'mail',
    'status' => 'status',
    'created' => 'created',
    'login' => 'login',
    'access' => 'access',
    'edit_node' => 'edit_node',
    ),
    'info' => array(
    'mail' => array(
    'sortable' => 1,
    'separator' => '',
    ),
    'status' => array(
    'sortable' => 1,
    'separator' => '',
    ),
    'created' => array(
    'sortable' => 1,
    'separator' => '',
    ),
    'login' => array(
    'sortable' => 1,
    'separator' => '',
    ),
    'access' => array(
    'sortable' => 1,
    'separator' => '',
    ),
    'edit_node' => array(
    'separator' => '',
    ),
    ),
    'default' => 'login',
    'execution_type' => '1',
    'display_type' => '0',
    'skip_confirmation' => 0,
    'display_result' => 1,
    'merge_single_action' => 1,
    'selected_operations' => array(
    '4d075a755ad70f936bf89570e66196f1' => '4d075a755ad70f936bf89570e66196f1',
    'a011c04389ff75f79af39bb612089bca' => 'a011c04389ff75f79af39bb612089bca',
    '73e0815d78610c8e7538ec8c5ad0be0c' => '73e0815d78610c8e7538ec8c5ad0be0c',
    'daa75f478e3093ab107e657da6620a91' => 'daa75f478e3093ab107e657da6620a91',
    '4bd509ad947296ffe30e8092a438e096' => '4bd509ad947296ffe30e8092a438e096',
    'dfdea479cc7ae8cb9d3e8749e57f86b4' => 0,
    '4fff50383fdc48042390841723c0d719' => 0,
    '132fddcb3f367a243bee632db31985c1' => 0,
    '334d20af1ae7ac4b770b7ec3210b2638' => 0,
    'df39f786ee434ca702b268783466a7ab' => 0,
    '52aec7fee2070ce530da1304653ae1ec' => 0,
    ),
    ));
    $handler = $view->new_display('page', 'Page', 'page_1');
    $handler->override_option('path', 'admin/classifieds/users');
    $handler->override_option('menu', array(
    'type' => 'normal',
    'title' => 'Users',
    'description' => '',
    'weight' => '0',
    'name' => 'navigation',
    ));
    $handler->override_option('tab_options', array(
    'type' => 'none',
    'title' => '',
    'description' => '',
    'weight' => 0,
    ));