$view = new view; $view->name = 'whosonline'; $view->description = 'Who\'s online extra block'; $view->tag = 'whosonline'; $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( 'name' => 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, ), 'link_to_user' => 1, 'overwrite_anonymous' => 0, 'anonymous_text' => '', 'exclude' => 0, 'id' => 'name', 'table' => 'users', 'field' => 'name', 'override' => array( 'button' => 'Override', ), 'relationship' => 'none', ), 'login' => array( 'id' => 'login', 'table' => 'users', 'field' => 'login', ), )); $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', 'override' => array( 'button' => 'Override', ), 'relationship' => 'none', ), )); $handler->override_option('access', array( 'type' => 'role', 'role' => array( '2' => 2, ), )); $handler->override_option('cache', array( 'type' => 'none', )); $handler = $view->new_display('block', 'Block Who\'s online', 'block_1'); $handler->override_option('title', 'Who\'s online'); $handler->override_option('items_per_page', 5); $handler->override_option('use_more', 1); $handler->override_option('block_description', ''); $handler->override_option('block_caching', -1); $handler = $view->new_display('page', 'Page Who\'s online', 'page_1'); $handler->override_option('fields', array( 'name' => 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, ), 'link_to_user' => 1, 'overwrite_anonymous' => 0, 'anonymous_text' => '', 'exclude' => 0, 'id' => 'name', 'table' => 'users', 'field' => 'name', 'override' => array( 'button' => 'Override', ), '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' => 'small', 'custom_date_format' => '', 'exclude' => 0, 'id' => 'login', 'table' => 'users', 'field' => 'login', 'override' => array( 'button' => 'Use default', ), 'relationship' => 'none', ), )); $handler->override_option('title', 'Who\'s online'); $handler->override_option('items_per_page', 25); $handler->override_option('use_pager', '1'); $handler->override_option('path', 'users-online'); $handler->override_option('menu', array( 'type' => 'none', 'title' => '', 'description' => '', 'weight' => 0, 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'description' => '', 'weight' => 0, ));