Posted by nitram079 on November 3, 2009 at 6:45pm
Jump to:
| Project: | Flag |
| Version: | 6.x-2.0-beta2 |
| Component: | Views integration |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I would really love to display such a block on my page for nodes with the flag like, i.e. users that liked this node also liked...
Ideally, I would like to use views to do so, since I would have all options available to sort, limit, etc. the output. I have plazyed around with views for quite some time now but could not find a solution for this...
Any hints, tips? This would be a killer feature!
Comments
#1
This is *almost* possible but immensely complex and doesn't quite work. Basically what you're saying is start with the current piece of content, look at users that have flagged that content, then look at other content those users have flagged and show a list of those items. That's 3-relationship (or JOIN) process.
- Make a "node" based view
- Make a relationship for the 'Flags: User's flagged content'
- Make an argument for 'Flags: Content ID' and have it supply a default value of "Node ID from URL".
- Make a second relationship for 'Flags: User', select the 'Flags: User's flagged content' relationship as the base for the join.
- Make a third relationship for 'Flags: User's flagged content' (yes the same option as the first relationship) and select the 'Flags: User' relationship as the base for the join.
So this gets you to all the right tables, but unfortunately you can't actually show the node title of other things that have been flagged. However if you add the "Flag: Flagged time" field, you can actually theme the view to show node-titles instead since you will have the NIDs available.
#2
should work, many thanks!!!!
Will give it a try and post when the results are in.
#3
Hi,
This seems to work for me however i am getting a lot of duplicates in my view. I haven't tried to theme it yet but when I enable this my list is showing:
Flagged time: 2010-01-11 11:06
Flagged time: 2010-01-11 11:06
Flagged time: 2010-01-11 11:06
Flagged time: 2010-01-11 11:06
Flagged time: 2010-01-11 11:06
Flagged time: 2010-01-11 11:06
Flagged time: 2010-01-11 11:06
Flagged time: 2010-01-11 11:06
Flagged time: 2010-01-11 11:06
Flagged time: 2010-01-11 11:06
(this goes on for a lot longer)
I have set the view Distinct: Yes but am still getting loads of duplicates in my view.
Thanks,
Gary
#4
This actually wasn't working for me at all. I have tried using the steps outlined by quicksketch but I am getting all sorts of nodes in my output regardless of whether it has been flagged or not. I am even getting results for nodes that are not flag enabled.
#5
#6
Moving to a feature request.
#7
Thank you to quicksketch!! This has gotten me closer than I ever would have gotten on my own. I am trying to make a view that shows "Users who bookmarked this user, they also bookmarked these users". Which, in theory, should be the same relationship/argument setup, just with different fields displayed (user picture, instead of that user's content), right?
However, after following quicksketch's directions "to the T", I am just getting a view of "users who bookmarked this user".
This is my set-up:
-Relationships:
--Flags: User's flagged content
--(flagged content) Flags: User
--(Flag user) Flags: User's flagged content
-Arguments:
--(flagged content) Flags: Content ID
-Fields
--I've tried every which combination
Does anyone have any ideas?
#8
Comment #1 says:
This is solved in Flag Vista: you can pull in a node relationship once you have a flagging.
So I'm marking this fixed.
Comment #3 says:
The rule for "distinct" is this: the fields after the "SELECT" must all have the same values. Perhaps you've inadvertently added something that breaks this (such as "Flagged time").
#9
Automatically closed -- issue fixed for 2 weeks with no activity.