Hi,
Can any one help
I user the user relationships module and I am trying to create a tweet view where only user relationships=Approved show in the list (ie - only a users friends tweets).
If I add a views relationship to content profile, I am able to then see the relationships RTID/Requestee/Requester fields. Adding these fields doest seem to help and I am unable to get the relationship status returned in the view.
Has anyone had any success in getting something like this working or should I upgrade the module to the latest dev release?
Thanks in advance for any assistance
Luke
Exported view
$view = new view;
$view->name = 'tweets_friends';
$view->description = 'tweets_friends';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'twitter';
$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', 'Tweets', 'default');
$handler->override_option('relationships', array(
'content_profile_rel' => array(
'label' => 'Content Profile',
'required' => 0,
'type' => 'crew_profile',
'id' => 'content_profile_rel',
'table' => 'users',
'field' => 'content_profile_rel',
'relationship' => 'none',
),
'rtid' => array(
'label' => 'rtid',
'required' => 0,
'id' => 'rtid',
'table' => 'user_relationships',
'field' => 'rtid',
'relationship' => 'content_profile_rel',
'override' => array(
'button' => 'Override',
),
),
'requestee_id' => array(
'id' => 'requestee_id',
'table' => 'user_relationships',
'field' => 'requestee_id',
'relationship' => 'content_profile_rel',
),
'requester_id' => array(
'label' => 'requester',
'required' => 1,
'id' => 'requester_id',
'table' => 'user_relationships',
'field' => 'requester_id',
'relationship' => 'content_profile_rel',
'override' => array(
'button' => 'Override',
),
),
));
$handler->override_option('fields', array(
'name' => array(
'label' => 'User:',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'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,
'link_to_user' => 1,
'overwrite_anonymous' => 0,
'anonymous_text' => '',
'exclude' => 1,
'id' => 'name',
'table' => 'users',
'field' => 'name',
'relationship' => 'none',
),
'created_time' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'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,
'date_format' => 'time ago',
'custom_date_format' => '',
'exclude' => 1,
'id' => 'created_time',
'table' => 'twitter',
'field' => 'created_time',
'relationship' => 'none',
),
'followers_count' => array(
'label' => 'Followers',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'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,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => ',',
'prefix' => '',
'suffix' => '',
'exclude' => 1,
'id' => 'followers_count',
'table' => 'twitter_account',
'field' => 'followers_count',
'relationship' => 'none',
),
'profile_image_url' => array(
'label' => '',
'exclude' => 0,
'id' => 'profile_image_url',
'table' => 'twitter_account',
'field' => 'profile_image_url',
'relationship' => 'none',
),
'nothing' => array(
'label' => '',
'alter' => array(
'text' => '
',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'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,
'exclude' => 0,
'id' => 'nothing',
'table' => 'views',
'field' => 'nothing',
'relationship' => 'none',
),
'nothing_1' => array(
'label' => '',
'alter' => array(
'text' => '[name] - [created_time]',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'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,
'exclude' => 0,
'id' => 'nothing_1',
'table' => 'views',
'field' => 'nothing',
'relationship' => 'none',
),
'text' => array(
'label' => '',
'exclude' => 0,
'id' => 'text',
'table' => 'twitter',
'field' => 'text',
'relationship' => 'none',
),
'nothing_2' => array(
'label' => '',
'alter' => array(
'text' => 'followers [followers_count]',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'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,
'exclude' => 0,
'id' => 'nothing_2',
'table' => 'views',
'field' => 'nothing',
'relationship' => 'none',
),
'approved' => array(
'label' => 'Relationship status',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'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,
'exclude' => 0,
'id' => 'approved',
'table' => 'user_relationships',
'field' => 'approved',
'relationship' => 'requestee_id',
'override' => array(
'button' => 'Override',
),
),
));
$handler->override_option('sorts', array(
'created_time' => array(
'order' => 'DESC',
'id' => 'created_time',
'table' => 'twitter',
'field' => 'created_time',
'relationship' => 'none',
),
));
$handler->override_option('filters', array(
'protected' => array(
'operator' => '=',
'value' => 0,
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'protected',
'table' => 'twitter_account',
'field' => 'protected',
'relationship' => 'none',
),
'uid_current' => array(
'operator' => '=',
'value' => '0',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'uid_current',
'table' => 'users',
'field' => 'uid_current',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'approved' => array(
'operator' => '=',
'value' => '1',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'approved',
'table' => 'user_relationships',
'field' => 'approved',
'relationship' => 'requester_id',
),
));
$handler->override_option('access', array(
'type' => 'none',
'role' => array(),
'perm' => '',
));
$handler->override_option('cache', array(
'type' => 'none',
));
$handler->override_option('header', '
');
$handler->override_option('header_format', '2');
$handler->override_option('header_empty', 0);
$handler->override_option('items_per_page', 6);
$handler->override_option('use_pager', '0');
$handler->override_option('distinct', 1);
$handler->override_option('style_plugin', 'table');
$handler->override_option('style_options', array(
'grouping' => '',
'override' => 0,
'sticky' => 0,
'order' => 'desc',
'columns' => array(
'name' => 'name',
'created_time' => 'created_time',
'profile_image_url' => 'profile_image_url',
'nothing' => 'nothing',
'nothing_1' => 'nothing_1',
'text' => 'nothing_1',
'followers_count' => 'nothing_1',
'nothing_2' => 'nothing_1',
),
'info' => array(
'name' => array(
'sortable' => 0,
'separator' => '',
),
'created_time' => array(
'sortable' => 0,
'separator' => '',
),
'profile_image_url' => array(
'sortable' => 0,
'separator' => '',
),
'nothing' => array(
'separator' => '',
),
'nothing_1' => array(
'separator' => '
',
),
'text' => array(
'sortable' => 0,
'separator' => ' — ',
),
'followers_count' => array(
'sortable' => 0,
'separator' => '',
),
'nothing_2' => array(
'separator' => '',
),
),
'default' => '-1',
));
$handler = $view->new_display('page', 'Page', 'page');
$handler->override_option('filters', array(
'protected' => array(
'operator' => '=',
'value' => 0,
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'protected',
'table' => 'twitter_account',
'field' => 'protected',
'relationship' => 'none',
),
'approved' => array(
'operator' => '=',
'value' => '1',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'approved',
'table' => 'user_relationships',
'field' => 'approved',
'relationship' => 'content_profile_rel',
'override' => array(
'button' => 'Override',
),
),
'uid_current' => array(
'operator' => '=',
'value' => '0',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'uid_current',
'table' => 'users',
'field' => 'uid_current',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'uid' => array(
'operator' => 'in',
'value' => '',
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'uid_op',
'identifier' => 'uid',
'label' => 'Filter by user name',
'optional' => 1,
'remember' => 0,
'reduce' => 0,
),
'id' => 'uid',
'table' => 'users',
'field' => 'uid',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
));
$handler->override_option('header', '![]()
');
$handler->override_option('items_per_page', 25);
$handler->override_option('use_pager', '1');
$handler->override_option('path', 'MovieBeans/tweets/friends');
$handler->override_option('menu', array(
'type' => 'none',
'title' => 'Twitter',
'description' => '',
'weight' => '1',
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
$handler = $view->new_display('block', 'Block', 'block');
$handler->override_option('empty', '![]()
![]()
![]()
No tweets availible');
$handler->override_option('empty_format', '2');
$handler->override_option('items_per_page', 5);
$handler->override_option('use_more', 1);
$handler->override_option('use_more_always', 0);
$handler->override_option('block_description', 'User Tweets');
$handler->override_option('block_caching', -1);
| Comment | File | Size | Author |
|---|---|---|---|
| tweetsupport.jpg | 377.94 KB | coolhandlukek2 |
Comments
Comment #1
koston commentedi like this tread..
so looks for this:
references for your home design
Comment #2
mrf commentedI don't think this would be possible with views alone, but you could use the user relationships api to provide the correct arguments to the twitter view.