<div id="node-<?php print $node->nid; ?> " class="row <?php print print $classes; ?> "<?php print $attributes; ?> > <div class="title col-xs-12 col-sm-6 col-md-6"> <div class="icon col-xs-1"> <?php $flag = '<i class="fa fa-envelope-o"></i>'; $history = _forum_user_last_visit($node->nid); if ($node->last_comment_timestamp > $history) { $flag = '<i class="fa fa-envelope"></i>'; } if ($sticky) { $flag = '<i class="fa fa-flag"></i>'; } if ($promote) { $flag = '<i class="fa fa-star"></i>'; } print $flag . ' '; ?> </div> <div class="col-xs-10 title"> <a href="<?php print $node_url; ?>
/** * Number of new topic replies for user or topic is unread * @see forum.module */ function _authcache_forum_topic_info($vars) { global $user; $info = array(); drupal_bootstrap(DRUPAL_BOOTSTRAP_PATH); include_once './modules/node/node.module'; // Need NODE_NEW_LIMIT definition include_once './modules/forum/forum.module'; include_once './modules/comment/comment.module'; foreach($vars as $nid => $timestamp) { $history = _forum_user_last_visit($nid); $new_topics = (int)comment_num_new($nid, $history); if($new_topics) { $info[$nid] = format_plural($new_topics, '1 new', '@count new'); } else if ($timestamp > $history) { // unread $info[$nid] = 1; } } return $info; }