Posted by royerd on March 16, 2011 at 12:32pm
So I feel i should know how to do this, but I've either forgot how or I'm missing something obvious.
I want to create a view that filters recent Forum posts to the current, active user. In other words, each user is able to see just his or her recent Forum posts or Forum comments.
I realize there is a User filter for Currently logged in user. I also realize this may involve an "argument." But i can't seem to limit the list of recent Forum activity just to one's own.
Any thoughts?

Comments
Could have sworn...
I could have sworn you just have to set up the filter that says "User: Current - Yes"... That should limit it.
Adam J Campbell
Cpl, USMC 2000-2004
Semper Fidelis Web Design
That's sort of what I
That's sort of what I remember as well, but it's not working for me.
My fields are: forum topic, comment time, comment by
My filter is: Node type: forum topic
If I further restrict the filter to user: current (yes) I get no results even though I, as author, have comments posted in the forum.
If you have any thoughts, let me know. I suspect somehow I'll stumble on an answer.
Dan
Comments vs. Nodes
What you're running into is that the filter is testing the authorship of the node, not the comment. You could build a view of all the comments that you are the author of, but that wouldn't include initial posts you own. Hmm...
Here ya go
Add an argument "User: UID is Author" and in the argument handling code box enter the following
Taken from: http://drupal.org/node/192041
Adam J Campbell
Cpl, USMC 2000-2004
Semper Fidelis Web Design
If you want a view of
If you want a view of comments only and not the original node, there is a view type of comment instead of node. Then filter by author of the comment.
Ross-Hunter.com
Creating a view of comments
Creating a view of comments only will not display threads that were started by the user, because the first post in a thread is a node and the rest are comments. Good luck my friend. Forums are not fun.
Ross-Hunter.com
Ross: Not sure I'm seeing
Ross: Not sure I'm seeing that. How would you create a view comments only? The comment filter types don't have "type is comment" or something like that. The filter only presents features or aspects of a comment such as the comment's id= or comment body= I suppose one could say comment id>0 or something but I don't think that's quite right either. I think the solution is in Adam's suggestion, but I couldn't quite find the field to put the code in. It seems I did this is D5 once.
When you first create a view
When you first create a view it asks what kind of view such as node, comment, user, etc. You would have to create a new view to see the option.
Ross-Hunter.com
View type
The view type can only be set when creating a view; you can't change it afterward. The default is "nodes," but you can instead make a view of "comments" or "users," for example.
OK, I give up for now. I
OK, I give up for now.
I don't think the problem is unique to Forums actually. I think the same problem would exist with any node type. For "comments" do have a kind of author to them, but not one that can be filtered per se I guess--only as associated with the parent node. Anyway . . . deal with it later I guess.
Oh, right. I forgot about
Oh, right. I forgot about that. Yes, that fact. I have found myself in a view before realize I was in the wrong type of view. This is another instance. OK, that makes more sense now.
So at least I'll be able to create a view of recent comments by "current or logged in author. But a view that mixes both parent node and comment may be more difficult.
OK. thanks much.
Somebody tell me to get back
Somebody tell me to get back to my real job.
This new view by comment as view type is no help either. For once there, I still don't see how to restrict the view to the user who is actually viewing the page. So each user sees just his/her own comments. Perhaps it's a USER view.
Oh, I think I see now. It
Oh, I think I see now. It uses "relationship" somehow.
I did finally figure this
I did finally figure this out.
I created a "relationship" as both user and node--that is, two relationships.
Then, in Filter User Current and Node Type: Forum topic (in relation to the two relationships).
This got me a view of the current user's comments and a link to those nodes with node title displayed as well.
Dan