Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This project is not covered by Drupal’s security advisory policy.
*Currently functioning, but contains known issues. Not all functionality exists.
Description
This module creates a database table which stores the last access timestamp per node per user.
The goal is to bypass Drupal's cache so we always have the latest timetsamp.
This module provides:
- Custom database table
- Custom Views group "Node Access Timestamp by User"
What this module does:
- Creates a database table on install
- During hook_preprocess_node(), gets current uid, nid, and timestamp
- Checks if a table row for uid and nid exists
- If a row contains current uid and nid, overwrites associated timestamp
- If nothing exists, creates a new row entry of uid, nid, and timestamp
Configuration
- Create a view to show "Node Access Timestamp by User" under "view settings"
- Set view settings to not cache under "advanced column"
- Configure as needed
Custom Database Table
This table is updated via HOOK_proprocess_node() and builds the data in the following structure:
uid | nid | timestamp | bundle | langcode |
---|---|---|---|---|
current user id | current node id | current timestamp | bundle name | langcode |
Database table name:
node_access_timestamp_by_user
Now our timestamp is stored in a database table with associated uid and nid.
Available relationships:
- uid
- nid
Attached is an example view you can import.
Attachment | Size |
---|---|
NATU Example View Import.txt | 13.88 KB |
Project information
- Unsupported
Not supported (i.e. abandoned), and no longer being developed. Learn more about dealing with unsupported (abandoned) projects - No further development
No longer developed by its maintainers. - Module categories: Content Editing Experience, Integrations, Developer Tools
- Created by prestosaurus on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.