Posted by moshe weitzman on May 25, 2003 at 6:16pm
Jump to:
| Project: | Drupal core |
| Version: | 8.x-dev |
| Component: | tracker.module |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I'd like to be able to 'catch up' all nodes in the tracker without having to actually visit all of them ... separately, this would be useful for forum.module as well.
Comments
#1
a patch for this is in my sandbox and awaits review. does not implement forum.module piece.
#2
kjartan proposed a better one, though that has notm hit core yet.
#3
I think this still stand. Follow up?
#4
see also http://drupal.org/node/24883
#5
don't see this getting into 5.x so changing to 6.x
see also:
http://drupal.org/node/63416
#6
Kjartan's tiny old patch is still a good way to do this. Needs refreshing. See http://lists.drupal.org/archives/drupal-user/2003-11/msg00008.html
#7
#8
I don't like this patch for two reasons.
1. It provides the ability to mark all nodes on the entire site as read. There are few sites for which that is what people really want to do. Separate groups, separate forums, separate node types, etc., are often viewed in different containers and people typically want to mark only those posts in a specific container as read. So, functionally, this patch is not a complete solution.
2. The implementation of adding a node 0 entry to the history table to represent "all nodes" is a hack. If we ever want to support referential integrity (which, granted, I do not think is possible anyway), this hack would be incompatible with it. The right way to mark a set of nodes as read, including all of them, is to add an entry to history for each node saying it is read; this, after all, is what would happen if all the nodes actually were read.
We should implement a function that takes an array of nids and marks them all as read.
Oh, and could someone explain to me why node_tag_new() is the name of the function that marks a node as no longer being "new" for a user? Why not node_tag_read($nid, $time = NULL) (defaults to now).
#9
This is still a valid feature request for tracker.
#10
Link mentioned on comment 6 is now broken.
I would like to say that to get kind of the same functionality on a D7 site I ended up creating a module(I started at http://drupal.org/node/515418) that adds a new action for marking as read one node(as mentioned on comment 8, it uses
node_tag_new()). Then I used views bulk operations to actually perform the multiple operation.In the other side, as mentioned on point 1 at comment 8, this would only part of the solution, so I would say to just only provide an action that calls
node_tag_new()in core, and leave the rest to contrib.Here a quick paste of the code required to implement such an action. Please let me now if it's a good idea and I can convert it into a patch against current mainline(fixing strings and moving to the right place).
<?php
/**
* @file
* Initial code from <a href="http://drupal.org/node/515418
" title="http://drupal.org/node/515418
" rel="nofollow">http://drupal.org/node/515418
</a> */
/**
* Implementation of hook_action_info().
*/
function lector_mark_as_read_action_info() {
return array(
'lector_mark_as_read_node_action' => array(
'label' => t('Lector mark as read'),
'type' => 'node',
'configurable' => FALSE,
'triggers' => array('any' => TRUE),
),
);
}
/**
* Callback for lector_mark_as_read_node_action
*/
function lector_mark_as_read_node_action($node, $context = array()) {
if (isset($node->nid)) {
node_tag_new($node);
}
}
?>
Maybe change this issue title to "Add an action to mark as read" if the idea sounds good.