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

moshe weitzman’s picture

a patch for this is in my sandbox and awaits review. does not implement forum.module piece.

moshe weitzman’s picture

kjartan proposed a better one, though that has notm hit core yet.

alexandreracine’s picture

Version: x.y.z » 5.x-dev

I think this still stand. Follow up?

Wesley Tanaka’s picture

catch’s picture

Version: 5.x-dev » 6.x-dev

don't see this getting into 5.x so changing to 6.x

see also:

http://drupal.org/node/63416

moshe weitzman’s picture

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

bradlis7’s picture

Version: 6.x-dev » 7.x-dev
bjaspan’s picture

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).

jody lynn’s picture

Version: 7.x-dev » 8.x-dev

This is still a valid feature request for tracker.

marvil07’s picture

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).

/**
 * @file
 *   Initial code from http://drupal.org/node/515418
 */

/**
 * 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.

kattekrab’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

11 years later, doesn't look like this is going to happen.