Hi,
Thanks for the great module!
I need to create a list of content from users that have been flagged by a user.
Example - user 3 flags user 5, 7 and 12. I then go to mysite.com/user/3/followed_content and see a list of content created by users 5, 7, and 12.
(The actual content has not been flagged - just the author of that content.)
Is this possible with Flag?
Any way to get a recipe for how to set this up in Views??
thanks so much
-=b=-
Comments
Comment #1
mooffie commentedYou want to show all the content flagged by "friends" of user #3 (or whatever user is in the URL). It's possible.
But first, here's how to make a simpler view: one that shows all the content flagged by "friends" of the current user.
(1) Create a view that shows all the flagged nodes (by "Any user").
(2) Bring in the "Flags: User" relationship. This is the user(s) who flagged the node.
(3) Bring in the "Flags: User flag" relationship to restrict the above users to only those who we bookmarked by "Current user". In its Relationship:" drop down make sure to point to the above relationship (otherwise it will operate on the nodes' authors).
But that's not what you want. Step (3) limits the list to the current user's friends. You want instead of limit it to the friends of the user in the URL.
So replace step (3) above with the following:
(3) Bring in the "Flags: User flag" relationship, but choose "Any user" as the scope.
(4) Bring in the "Flag: User" relationship again. But in its "Relationship:" point to the relationship from step (3).
(5) Bring in the "User: Uid" argument. In its "Relationship:" point to the relationship from step (4).
That's all.
You'll also have to turn on the distinct setting for the view to get rid of duplicate records.
(BTW, the "Flag Vista" module provides more ways to create this view.)
Comment #2
iknowbryan commentedmoofie - did you ever know that you are my hero?!
That is exactly what I needed! Thanks
Want another challenge?!
Is there any way that view can ALSO display content that the flagger has created? So the view would show content from 5, 7, 13 AND 3 (where 3 is the user that flagged the rest)
This would basically be an activity feed of me and users that I follow
Would be amazing!
FYI - I'm creating a new charity site and am using this module to set up the relationships. So this has been a super big help
I'll be sure to share once the site is done
-=b=-
Comment #4
giacomino00 commentedhi, did you find a solution to #2?
Comment #5
andrenoronha commentedI created that view and now I wanna sent it through Simplenews using views field.
How could I send it using the subscriber id as the flagger user id?
Comment #6
andrenoronha commentedIn fact I can't follow this on Drupal 7 version.
Comment #7
andrenoronha commentedNevermind. I had problems with filters.