Is there a function that counts new comments since the subscribed user last checked the thread?
I'm trying to make the CSS for a views field change when a new comment is posted using CSSinjector and a PHP rule.
The PHP rule would look something like this I imagine:

 <?php
$new = node_num_newentries();
if ($new >= 1) {
	return TRUE;
	}
  return FALSE;
?>

So if the new comment count is one or more the CSS changes. Is there something in watcher PHP code that I could use for this?

Comments

Melot’s picture

I'm trying this now:

<?php
$numnew = comment_num_new($node->nid);
if ($numnew < 1) {
    return TRUE;
  }
  return FALSE;
?> 

How can I set it so that it's only watched nodes? Not just one node but all watched nodes new comments together.