Hi, I am trying to set up a user flag view to display who a user is following and who is following said user. I am using the flag module to do this. I have set up the "following" view like this.
1. Created new user view (I called it follow).
2. Created new block display (following block) with row style fields.
3. Under relationships I added "Flags:User flag", labeled it "following" , chose my "follow" flag, checked "include only flagged content", and selected by current user.
4. Added another relationship "Flags:User", gave it the relationship to "following" (my first relationship) and checked require this relationship.
5.Added the field for "User:name" and for "Flags:link.
I think that this is working correctly to display all the people that the currently logged in user is "following".
I also need to make a display to show who is following the currently logged in user. This is where im getting stuck.
Here is what I have so far.
1. Created new block display (followers block) in my "follow" view, with row style fields and distinct checked.
2. Under relationships I added "Flags:User flag", labeled it "follower" , chose my "follow" flag, checked "include only flagged content", and selected by any user.
3. Added another relationship "Flags:User's flagged content", checked include only flagged content and chose my "follow" flag.
4. Added an argument for "User:Id", checked provide default argument and checked "User id from logged in user", lastly checked exclude from view ( I set up this argument because the logged in user's name was showing in the list.
5.Added the field for "User:name".
This view gives me a list of all the people that are following the logged in user, but it also shows certain (but not all) people that another user is following. Also, if the logged in user chooses to follow certain (not all) people it show them being followed by said people. This is no good. What am I missing here? Also, is there a better way for me to do my "following" view? Sorry if this is confusing. Thanks.
Comments
anyone?
anyone?
anyone?
anyone?
can no one help me?
can no one help me?
Im going to repost this in
Im going to repost this in the flag issues.
Found a solution here:Who
Found a solution here:
Who bookmarked this? Flag Handbook.
That works for me (just
That works for me (just changed current user to any user) and was the one that I needed. You can set up the followers view by
Relationship
Flags: User's flagged content follow
Arguments
(user flagged content) Flags: Content ID - provide default argument - User ID from URL
Fields
User: Name
User: Picture
How to display your followers
1. make a view (type user)
2. display name followers
3. fields 1. user picture, 2, user name
4. relationship = flag: user flagging
(a. type follow, b. check include only fagged content, c. by current user)
5. Filter = flag: user Uid
(a. check default value, b. user ID from URL)
and see the magic