Closed (works as designed)
Project:
User Relationships
Version:
6.x-1.0-rc1
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
17 Jul 2009 at 22:09 UTC
Updated:
11 Jan 2012 at 10:14 UTC
Comments
Comment #1
kvvnn commentedEDIT :
This actually lists a view of all users that have no relationships at all.
Comment #2
kvvnn commentedEDIT : I think the above Views config was kind of stupid. Heres what I think should work :
Comment #3
kvvnn commentedI believe what the above is doing is simply not listing friends of the current user.
However, it will not filter out friends of some other user who also happen to be friends with the current user.
Comment #4
kvvnn commentedI have resorted to this solution instead : http://drupal.org/node/409432#comment-1826252
Where I have a Users page with every user on the site, but differentiate between friends and non-friends of the user.
I do believe that UR should include a view for "Friends" and for "Non Friends".
Cheers!
Comment #5
alex.k commentedTo help me understand, are you trying to list users who are not friends of you, or are you trying to list users who don't have any friends at all on the site?
Comment #6
kvvnn commentedSorry for the confusion.
I am trying to list users who are not friends of the currently logged in user.
Comment #7
kvvnn commentedUpdate on the above:
Issue : There is no way (that I have found) to have a view with both Friends and Non-Friends listed, and then filter out Non-Friends through an exposed filter.
Comment #8
kvvnn commentedComment #9
alex.k commentedYup, the only way would be to use two different views, or two displays within the same view.
Comment #10
kvvnn commentedThe issue with having two displays within the same view is that we can't have combined sorting.
Are you planning on implementing this feature?
Comment #11
YK85 commentedAny further development in User Relationships & Views integration?
If anyone has figured out a method can it please be shared with the community.
Thanks!
Comment #12
kvvnn commentedThe only thing you can do is manipulate the fields once they come out. There is currently no way, using Views, to only list people who are not friends.
My suggestion is to use the Views_Customfield module (www.drupal.org/project/views_customfield) in a way that manipulates the user field based on whether the logged in user is friends with them.
Here is my example.
FiltersNode: Type = Profile
FieldsUser: Current No
Content: First Name exposed
Content: Last Name exposed
User: Uid Uid
Fields explainedContent: Profile Image
Content: First Name Default
Content: Last Name Default
User: Name Name
Customfield: PHP code Data
Customfield: PHP code
Everything is excluded except Content: Profile Image and Customfield: PHP Code
Customfield: PHP code Data: This is Excluded in production. It is to see the field names according to Views Customfield. In order to do that you use
Customfield: PHP code: This contains code that determines what to print depending on whether the user is a friend or not.
Comment #13
YK85 commentedwould this be helpful? http://drupal.org/project/viewsphpfilter
or could someone look into expanding UR-Views integration to allow for all the essential views?
many thanks!
Comment #14
aliyayasir commentedPlease take a look at Suggest a Friend module
http://drupal.org/project/suggest-a-friend