Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.2
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 Feb 2009 at 23:01 UTC
Updated:
20 Jun 2011 at 17:09 UTC
How would I list all the users who have viewed a node? What I need is sort of a backwards way to lookup "Node->Has new content" for each user if that is possible. I have a 'memo' content type and I want to confirm staff have read certain memos.
I have gone through documentation and spent a good deal of time trying to figure it out myself, and am posting because I do not know where to go next.
Thanks,
Corey
Comments
Comment #1
deshilachado commentedYou'll have to use the relationship:
- create a new view
- choose "user" type
- as fields choose user name and timestamp
- as design choose table
- items per page: 0 (=all)
- click on relationship: there is only one relationship to activate (access log:user)
- relationship is 'required'
- as argument you can choose between title or path; i chose title
now when you enter a title the preview should show a table listing all users (×tamp) who have accessed the node with that title
the table being used is the accesslog table and if you look at that table using phpmyadmin you see, why you can't choose nid as argument
probably there are more ways to achieve the same and maybe some are more elgant;
maybe you can add a user reference field to your content type 'memo' but i haven't done that
to learn more about relationship, see here:
http://drupal.org/node/289738
http://drewish.com/node/127
Comment #2
cflemm commentedThanks for the reply! I will try this out and see what happens. That sounds like it should work.
Thanks again,
Corey
Comment #3
dawehneri think this can be closed
Comment #4
johnhesston commentedWhere is "timestamp" I can't find it anywhere? please help!
Comment #5
Seighaus commentedI have the same Problem as #4, there is no field "timestamp". Also there is no "access log:user" relationship.
I'm using Views 6.x-2.11.
All the other steps I have followed. Maybe this feature was removed or has to be accessed in a different way as views was further developed...? do you have any knowledge about this?
Thanks
Comment #6
deshilachado commentedI'm using Views 6.x-2.12 and the description still works for me. I can choose from about 50 fields and on of them is contains the time of the last access. In what language are you using Drupal? And did you choose "user" as the views type?
If you get it to work, please post it here.
Comment #7
Mr.vantri commentedinsert this views into node what Community argument? please!
Comment #8
hellomobe commentedDoes the "User" view-type have the "accesslog: path" argument filter? I see it under an "Access Log" view-type, but not under user. I'm using Drupal 7. My goal is to have a "who's viewed my profile" on the user's dashboard page. I can't use Access: Page Title" because the page title pattern changes based on user options.