1

I try to make every users of my site can view their own and others' posted comments (like "profile:user comments history").

Although the Tracker module can do it, it is not the way I want: It doesn't display the comment but the title of the article to which the comment belongs to.

I am trying with the Views module 7.x-3. I created a comment type view to display comments and add a relationship "Comment: Author". I am stuck here: user1 can view user2's, user3's "profile:user comments history" so the value of "Comment: Author uid" (Filter criteria) should change with the profile pages.

The path of user profile page is /user/% and the arg(1) is the id of users. So I want to make "Filter critera" -> "Comment: Author uid (= < ? php echo arg(1) ; ?>)", but it does not work.

If the Views module can't do this, please tell me some other modules (small and simple is best) that could make it.

1

This is just a simple view: Set up a relationship with comment:node not author; then in your filter criteria add "User: Name exposed" and set your fields.

  • Thank for reply!By the way , how can I make this: "FILTER CRITERIA" => "Comment: Author uid (= arg(1))". The arg(1) is the path value which change with the URL: /arg(0)/arg(1)/... – vector Jun 17 '13 at 5:34
0

My solution was to configure the view as

  • "Advanced" =>
  • "CONTEXTUAL FILTERS" =>
  • Add "Comment: Author uid" =>
  • Chose "Skip default argument for view URL" =>
  • "WHEN THE FILTER VALUE IS IN THE URL OR A DEFAULT IS PROVIDED" =>
  • "Override title" =>
  • %1
  • No idea how to post photo on this site – vector Jun 28 '13 at 6:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.