$view = new view; $view->name = 'facebook_status_ur'; $view->description = 'Facebook-style Statuses: User Relationships'; $view->tag = 'facebook_status'; $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', 'Statuses', 'default'); $handler->override_option('fields', array( 'picture' => 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, ), 'exclude' => 0, 'id' => 'picture', 'table' => 'users', 'field' => 'picture', 'override' => array( 'button' => 'Override', ), 'relationship' => 'none', ), 'respond' => array( 'label' => '', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'exclude' => 1, 'id' => 'respond', 'table' => 'facebook_status', 'field' => 'respond', 'relationship' => 'none', ), 'pid_extra' => array( 'label' => '', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'exclude' => 1, 'id' => 'pid_extra', 'table' => 'facebook_status', 'field' => 'pid_extra', 'relationship' => 'none', ), 'status' => array( 'label' => '', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'exclude' => 1, 'id' => 'status', 'table' => 'facebook_status', 'field' => 'status', 'relationship' => 'none', 'override' => array( 'button' => 'Override', ), ), 'status_time' => array( 'label' => '', 'alter' => array( 'alter_text' => 1, 'text' => '[pid_extra] [status] [status_time] [respond]', 'make_link' => 0, 'path' => '', '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' => '1', 'exclude' => 0, 'id' => 'status_time', 'table' => 'facebook_status', 'field' => 'status_time', 'relationship' => 'none', 'override' => array( 'button' => 'Override', ), ), 'delete' => 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, ), 'exclude' => 0, 'id' => 'delete', 'table' => 'facebook_status', 'field' => 'delete', 'override' => array( 'button' => 'Override', ), 'relationship' => 'none', ), )); $handler->override_option('sorts', array( 'sid' => array( 'order' => 'DESC', 'id' => 'sid', 'table' => 'facebook_status', 'field' => 'sid', 'relationship' => 'none', ), )); $handler->override_option('arguments', array( 'name' => array( 'default_action' => 'not found', 'style_plugin' => 'default_summary', 'style_options' => array(), 'wildcard' => 'all', 'wildcard_substitution' => 'All', 'title' => '%1\'s Statuses', 'default_argument_type' => 'fixed', 'default_argument' => '', 'validate_type' => 'php', 'validate_fail' => 'not found', 'glossary' => 0, 'limit' => '0', 'case' => 'none', 'path_case' => 'none', 'transform_dash' => 1, 'id' => 'name', 'table' => 'users', 'field' => 'name', 'validate_user_argument_type' => 'uid', 'validate_user_roles' => array( '2' => 0, '3' => 0, ), 'relationship' => 'none', 'default_options_div_prefix' => '', 'default_argument_user' => 0, 'default_argument_fixed' => '', 'default_argument_php' => '', 'validate_argument_node_type' => array( 'panel' => 0, 'page' => 0, ), 'validate_argument_node_access' => 0, 'validate_argument_nid_type' => 'nid', 'validate_argument_vocabulary' => array( '1' => 0, ), 'validate_argument_type' => 'tid', 'validate_argument_transform' => 0, 'validate_user_restrict_roles' => 0, 'validate_argument_node_flag_name' => '*relationship*', 'validate_argument_node_flag_test' => 'flaggable', 'validate_argument_node_flag_id_type' => 'id', 'validate_argument_user_flag_name' => '*relationship*', 'validate_argument_user_flag_test' => 'flaggable', 'validate_argument_user_flag_id_type' => 'id', 'validate_argument_php' => '$account = user_load(array(\'name\' => $argument)); if ($account->uid) { $handler->argument = $account->name; return TRUE; } else { $account = user_load(array(\'uid\' => $argument)); if ($account->uid) { $handler->argument = $account->name; return TRUE; } } return FALSE;', ), )); $handler->override_option('filters', array( 'status' => array( 'operator' => '!=', 'value' => '', 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'case' => 1, 'id' => 'status', 'table' => 'facebook_status', 'field' => 'status', 'relationship' => 'none', ), 'pid_extra_2' => array( 'operator' => '=', 'value' => '0', 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'pid_extra_2', 'table' => 'facebook_status', 'field' => 'pid_extra_2', 'relationship' => 'none', ), 'rtype' => array( 'id' => 'rtype', 'table' => 'user_relationships', 'field' => 'rtype', ), )); $handler->override_option('access', array( 'type' => 'perm', 'perm' => 'maintain own relationships', )); $handler->override_option('cache', array( 'type' => 'none', )); $handler->override_option('title', 'My Network Statuses'); $handler->override_option('empty', ' arg(1))); if (!$account->uid) { echo t(\'This user has no statuses yet.\'); return; } $count = facebook_status_has_status(arg(1)); if (!$count) { global $user; if ($user->uid == $account->uid) { echo t(\'You have no statuses yet.\'); } else { echo t(\'@name has no statuses yet.\', array(\'@name\' => check_plain($account->name))); } } ?>'); $handler->override_option('empty_format', '3'); $handler->override_option('use_ajax', TRUE); $handler->override_option('use_pager', '1'); $handler->override_option('use_more', 1); $handler->override_option('distinct', 0); $handler->override_option('style_plugin', 'table'); $handler->override_option('style_options', array( 'grouping' => '', 'override' => 1, 'sticky' => 1, 'order' => 'desc', 'columns' => array( 'name' => 'name', 'uid' => 'uid', 'status' => 'status', ), 'info' => array( 'name' => array( 'sortable' => 0, 'separator' => '', ), 'uid' => array( 'sortable' => 0, 'separator' => '', ), 'status' => array( 'sortable' => 0, 'separator' => '', ), ), 'default' => '-1', )); $handler = $view->new_display('page', 'My Status', 'page_1'); $handler->override_option('arguments', array( 'name' => array( 'default_action' => 'not found', 'style_plugin' => 'default_summary', 'style_options' => array(), 'wildcard' => 'all', 'wildcard_substitution' => 'All', 'title' => '%1\'s Statuses', 'breadcrumb' => '', 'default_argument_type' => 'fixed', 'default_argument' => '', 'validate_type' => 'php', 'validate_fail' => 'not found', 'glossary' => 0, 'limit' => '0', 'case' => 'none', 'path_case' => 'none', 'transform_dash' => 1, 'me_alias' => 0, 'me_redirect' => 0, 'id' => 'name', 'table' => 'users', 'field' => 'name', 'validate_user_argument_type' => 'uid', 'validate_user_roles' => array( '2' => 0, '5' => 0, '4' => 0, '3' => 0, '6' => 0, '9' => 0, '7' => 0, ), 'relationship' => 'none', 'default_options_div_prefix' => '', 'default_argument_user' => 0, 'default_argument_fixed' => '', 'default_argument_php' => '', 'validate_argument_node_type' => array( 'product' => 0, 'admin_message' => 0, 'advertisement' => 0, 'article' => 0, 'casting' => 0, 'equipment' => 0, 'event' => 0, 'finance' => 0, 'jobs' => 0, 'jobwanted' => 0, 'page' => 0, 'profile' => 0, 'project' => 0, ), 'validate_argument_node_access' => 0, 'validate_argument_nid_type' => 'nid', 'validate_argument_vocabulary' => array( '2' => 0, '3' => 0, '4' => 0, '6' => 0, '5' => 0, '10' => 0, '11' => 0, '9' => 0, '12' => 0, ), 'validate_argument_type' => 'tid', 'validate_argument_transform' => 0, 'validate_user_restrict_roles' => 0, 'validate_argument_node_flag_name' => '*relationship*', 'validate_argument_node_flag_test' => 'flaggable', 'validate_argument_node_flag_id_type' => 'id', 'validate_argument_user_flag_name' => '*relationship*', 'validate_argument_user_flag_test' => 'flaggable', 'validate_argument_user_flag_id_type' => 'id', 'validate_argument_php' => '$account = user_load(array(\'name\' => $argument)); if ($account->uid) { $handler->argument = $account->name; return TRUE; } else { $account = user_load(array(\'uid\' => $argument)); if ($account->uid) { $handler->argument = $account->name; return TRUE; } } return FALSE;', 'override' => array( 'button' => 'Use default', ), ), )); $handler->override_option('path', 'status/%/mine'); $handler->override_option('menu', array( 'type' => 'tab', 'title' => 'My Status', 'description' => '', 'weight' => '0', 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'description' => '', 'weight' => 0, )); $handler = $view->new_display('block', 'Block', 'block_1'); $handler->override_option('block_description', 'Facebook-style Statuses Profile'); $handler->override_option('block_caching', -1); $handler = $view->new_display('page', 'All Statuses', 'page_2'); $handler->override_option('arguments', array()); $handler->override_option('path', 'status/%/all'); $handler->override_option('menu', array( 'type' => 'default tab', 'title' => 'All Status', 'description' => '', 'weight' => '0', 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'normal', 'title' => 'All', 'description' => '', 'weight' => '0', )); $handler = $view->new_display('page', 'Relationships', 'page_3'); $handler->override_option('relationships', array( 'requestee_id' => array( 'label' => 'requestee', 'required' => 0, 'id' => 'requestee_id', 'table' => 'user_relationships', 'field' => 'requestee_id', 'override' => array( 'button' => 'Use default', ), 'relationship' => 'none', ), 'requester_id' => array( 'label' => 'requester', 'required' => 0, 'id' => 'requester_id', 'table' => 'user_relationships', 'field' => 'requester_id', 'override' => array( 'button' => 'Use default', ), 'relationship' => 'none', ), )); $handler->override_option('arguments', array( 'requester_id' => array( 'default_action' => 'default', 'style_plugin' => 'default_summary', 'style_options' => array(), 'wildcard' => 'all', 'wildcard_substitution' => 'All', 'title' => '', 'breadcrumb' => '', 'default_argument_type' => 'current_user', 'default_argument' => '', 'validate_type' => 'none', 'validate_fail' => 'not found', 'break_phrase' => 0, 'not' => 0, 'id' => 'requester_id', 'table' => 'user_relationships', 'field' => 'requester_id', 'validate_user_argument_type' => 'uid', 'validate_user_roles' => array( '2' => 0, '5' => 0, '4' => 0, '3' => 0, '6' => 0, '9' => 0, '7' => 0, ), 'override' => array( 'button' => 'Use default', ), 'relationship' => 'none', 'default_options_div_prefix' => '', 'default_argument_user' => 0, 'default_argument_fixed' => '', 'default_argument_php' => '', 'validate_argument_node_type' => array( 'product' => 0, 'admin_message' => 0, 'advertisement' => 0, 'article' => 0, 'casting' => 0, 'equipment' => 0, 'event' => 0, 'finance' => 0, 'jobs' => 0, 'jobwanted' => 0, 'page' => 0, 'profile' => 0, 'project' => 0, ), 'validate_argument_node_access' => 0, 'validate_argument_nid_type' => 'nid', 'validate_argument_vocabulary' => array( '2' => 0, '3' => 0, '4' => 0, '6' => 0, '5' => 0, '10' => 0, '11' => 0, '9' => 0, '12' => 0, ), 'validate_argument_type' => 'tid', 'validate_argument_transform' => 0, 'validate_user_restrict_roles' => 0, 'validate_argument_node_flag_name' => '*relationship*', 'validate_argument_node_flag_test' => 'flaggable', 'validate_argument_node_flag_id_type' => 'id', 'validate_argument_user_flag_name' => '*relationship*', 'validate_argument_user_flag_test' => 'flaggable', 'validate_argument_user_flag_id_type' => 'id', 'validate_argument_php' => '', ), )); $handler->override_option('filters', array( 'status' => array( 'operator' => '!=', 'value' => '', 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'case' => 1, 'id' => 'status', 'table' => 'facebook_status', 'field' => 'status', 'relationship' => 'none', ), 'pid_extra_2' => array( 'operator' => '=', 'value' => '0', 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'pid_extra_2', 'table' => 'facebook_status', 'field' => 'pid_extra_2', 'relationship' => 'none', ), 'rtype' => array( 'operator' => 'in', 'value' => array( '0' => '1', ), 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'rtype', 'table' => 'user_relationships', 'field' => 'rtype', 'override' => array( 'button' => 'Use default', ), 'relationship' => 'none', ), 'sid_extra' => array( 'operator' => '=', 'value' => '1', 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'sid_extra', 'table' => 'facebook_status', 'field' => 'sid_extra', 'override' => array( 'button' => 'Use default', ), 'relationship' => 'requestee_id', ), 'approved' => array( 'operator' => '=', 'value' => '1', 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'approved', 'table' => 'user_relationships', 'field' => 'approved', 'override' => array( 'button' => 'Use default', ), 'relationship' => 'none', ), )); $handler->override_option('path', 'status/%/friends'); $handler->override_option('menu', array( 'type' => 'tab', 'title' => 'My Friends', 'description' => '', 'weight' => '0', 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'description' => '', 'weight' => 0, ));