function node_mark

cis7 node.module node_mark($nid, $timestamp)
cle7 node.module node_mark($nid, $timestamp)
elmsmedia7 node.module node_mark($nid, $timestamp)
icor7 node.module node_mark($nid, $timestamp)
meedjum_blog7 node.module node_mark($nid, $timestamp)
mooc7 node.module node_mark($nid, $timestamp)

Determines the type of marker to be displayed for a given node.


$nid: Node ID whose history supplies the "last viewed" timestamp.

$timestamp: Time which is compared against node's "last viewed" timestamp.

Return value

One of the MARK constants.

5 calls to node_mark()
CommentController::attachLoad in modules/comment/comment.module
Attaches data to entities upon loading.
entitycache_entitycache_comment_load in sites/all/modules/ulmus/entitycache/entitycache.module
Implements hook_entitycache_ENTITY_TYPE_load().
node_admin_nodes in modules/node/
Form builder: Builds the node administration overview.
theme_node_recent_content in modules/node/node.module
Returns HTML for a recent node to be displayed in the recent content block.
tracker_page in modules/tracker/
Page callback: prints a listing of active nodes on the site.


modules/node/node.module, line 350
The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.


function node_mark($nid, $timestamp) {
  global $user;
  $cache = &drupal_static(__FUNCTION__, array());

  if (!$user->uid) {
    return MARK_READ;
  if (!isset($cache[$nid])) {
    $cache[$nid] = node_last_viewed($nid);
  if ($cache[$nid] == 0 && $timestamp > NODE_NEW_LIMIT) {
    return MARK_NEW;
  elseif ($timestamp > $cache[$nid] && $timestamp > NODE_NEW_LIMIT) {
    return MARK_UPDATED;
  return MARK_READ;