How to filter views in Drupal on current user (not author) - drupal

I am a relatively noobe on Drupal and I have hit a problem with Views that I've not been able to resolve by Googling and reading similar questions here.
I have ten pages in a content type "Book". I want to encourage users to read all of ten pages. My intention was to create a View that listed specifically for each user which pages they had opened.
I can create a View and produce a list of the pages.
I can filter the list on Content statistics: Total views (>= 1) to produce a list of pages that have been opened.
--- So far this works predictably and produces the same correct list for three roles: admin, anonymous and logged in user.
My difficulty is setting up the filter for current user. I am aware that the filter for current user does not come up until a relationship is set up. I have not been able to figure out the correct relationship to make a simple logged in user appear in the filter without being attached to author.
For further clarification, if it is relevant, the content type is the default book content type.
I would be grateful if anyone could steer me in the right direction

I don't think the content statistics (Total views) keeps a count PER user.
Is there a statistic for instance "visited pages" for users. Because you could match that url with the current url.

Related

How can I create a multi-step questionnaire with/without registration to display content accordingly (with saving the answers option)?

I will be creating many custom posts using ToolSet, and I will have memberships using Ultimate Membership Pro.
I want the users to go through 4 or 5 pages of a questionnaire, then get 2 options for displaying the results (an advanced search / filter kind of mechanism):
1- Just display results based on the answers given (with a sidebar to adjust the answers)
2- Register (username, email, etc), and save the answers in a user’s dashboard (which can be edited anytime), in addition to loading the content results each time the user request a specific page (basically it’s an advanced search request based on the answers given)
(please check the image I am sharing)
I have seen this plugin which is not bad to be honest, but it doesn’t fulfill the need
https://codecanyon.net/item/reactive-pro-advanced-wordpress-search-filtering-grid/17425763
Can you advise something more efficient? Or share some thoughts or hints!

Multiple distinct YAFNET forums (via different pages) on same site

I have an existing YAFNET forum at http://www.paydirt.co.nz/forums/ concerned with Gold Fossicking and Metal Detecting. At present these two "Categories" are all grouped together on a single page.
Unfortunately from time to time I get a bit of bickering between the gold fanciers and the swingers so I'd like to separate these out across two distinct pages:
http://www.paydirt.co.nz/forums/gold (could end in .aspx if required)
http://www.paydirt.co.nz/forums/metal-detecting (could end in .aspx if required)
I'd like the users to be shared across both pages without users re-registering (as some users contribute to both areas), but the pages themselves I'd like to be be filtered by category. Each page would only show "Active Discussions" for the category used.
Is it possible to setup 2 distinct pages each with a YAFNET user control on, but using parameters on the user controls which will filter the categories shown on each?
I do see that it's possible to setup multiple "boards", and I could move some categories manually via an update to the database. However, I also notice that the yaf_User table has a BoardID so this would suggest users are tied to a single board.
As a bonus nice-to-have, I'd ideally like the "Discussion" category (which is a general discussions area for anything) to be shared between these two pages. Though I suspect this might be asking a little too much.
Thanks in advance for any ideas or solutions!
YAF.NET always pulls users from the current Membership Provider. The yaf_User table is a sync from the Membership Provider. For example, when an existing membership user visits a new board, YAF.NET will automatically create an new entry in yaf_User for that user and keep them synced.
Multiple controls with different board setting should do what you need. They do require unique "Pages", though.

How do I select nodes in a Drupal View that share a field value with the current logged in user?

It seems to me that I am missing something obvious.
I have a set of profiles authored by two separate groups of people with almost identical fields.
I want the current user to be able to run a view to find all the nodes of type Profile that have the same value of the field Primary Area of Interest as the logged in user. The logged in user and authors of the other nodes will have different roles.
I have tried contextual filters and also using the views field views module to little effect. Any help appreciated.
Thank You

Filtering Repeater items based on user status/role

I have a tricky requirement where I need to categorise documents attached to a product, available for download, based on the status of the user viewing the product. I.e. my site displays a list of products, clicking on one displays a product details page, and this page includes a list a documents related to the product, such as data sheets, user manuals, etc.
I have been asked to group documents into three classes of availability, v.i.z. those available freely to all users, including anonymous; those available to logged on users; and those available to anonymous users that provide contact information before downloading the document, presumably to boost sales leads.
The anonymous and logged on availabilities are quite easy, but the third seems a bit tricky to me. My first question is, is there a way I can filter documents for only logged on users without hooking into ItemDataBound or something, and my second question is, what is recommended for the case where a user must supply contact information to download a document?
In the second question, it has crossed my mind to actually register the user, but without them having to visit the new user registration page, and then I have role based filtering of documents. Currently the new user registration process automatically adds the Member role to all new users. Users I register 'quietly', just so they can download a document, wont be assigned the Member role, distinguishing them from normally logged on members. What other approaches could I take?
A lot of this implementation will depend on exactly what you want to accomplish and how you go about doing it.
For example, if I don't have access to the document, should I see the link?
If your implementation is that all users should be able to see it, but that the actual act of 'getting it' is dependent upon the individual role or membership, you could solve it fairly easy by implementing a "handler" to download the secured documents, that way you are not presenting a direct file link. That handler could then validate security, if they were not allowed, it could then take them to the login or register page as needed.
If the users don't see the documents until they meet the requirement, I would then filter BEFORE you bind to your repeater.

drupal user interested terms

hi i'm using drupal 6. In my user page i want to show latest activities related to user interest. interest means terms that user participated (forum topics, articles, polls..). Can any one know the best way to do it.
For ex : stackoverflow shows questions related user participated tags.
This sounds like something you might be able to do using the Flag terms module (http://drupal.org/project/flag_terms). This is a module that complements the much acclaimed Flag module (http://drupal.org/project/flag_terms), by allowing you to flag certain taxonomy terms. You can use views (http://drupal.org/project/views) to display lists of user flagged content.

Resources