By dougvann on
The goal:
To create a tab on a user's /user page which contains a view of node titles where the logged in user has commented on that node.
What I have so far.
A view of "nodes"
Filter on "published nodes"
Argument of "comment author"
I think the challenge for me here is to get the argument validation correct.
I have tried:
Basic Validation, PHP with "return arg(1)", USER validation with various combinations under that.
I'm stumped.
- Doug Vann
- http://dougvann.com
Comments
=
Here is a view that will show a tab on the "my account" page of all of a user's content. Perhaps you could import it and tweak it to show just the nodes you are looking for.
http://drupal.org/node/351342
Hey Doug, I was able to
Hey Doug,
I was able to successfully create the view tab showing node titles where the user had commented. The part I'm betting you needed to include was a relationship. You have to first add a relationship of "Comment: User". Then you can add the argument for "User: Uid" and require the relationship. Then for Validator options all you need is User.
I'm gonna post my export below. Note that I included 3 fields; node title, comment title and comment body so you can see what they are.
That'll put a tab on the user page called 'My Comments'
Hope it helps!
Tim
This was useful.
This was useful. Thanks.
However, is there a way to display nodes that the user has created and/or commented on? Everything I try seems to limit it to just nodes the user has created AND commented.