How to add "new" icon on node view page for predefined time frame I would like to add "new" icon on node view page of some content type for a predefined time frame after the node content is created or updated. For example, I would like to display "new" icon on the top of node view page for 2 weeks after the node content was saved. I found this for Views but need it for node page. Is there anyway to achieve this?
You can do this at least two ways:

1)  Edit your theme's node.tpl.php to include some PHP code that compares the current date and the node creation or modification date, and, if it's within the predefined timeframe, prints that "new" icon wherever you want it, or,

2)  Create a preprocess_node() hook in either a custom module or in your theme that sets a variable that can be used in your node.tpl.php file for the same purpose.

SNIPPET ADDITION:

A quick (but verbose for self-commenting purposes) preprocess() hook in your template.php file could look something like this:

function phptemplate_preprocess_node(&amp;$vars) {

  $node=$vars['node'];

  $two_weeks_ago = time() - (14 * 24 * 60 * 60);

  $node_creation_time=$node-&gt;created;
  $node_changed_time=$node-&gt;changed;

  if ($node_creation_time &gt;= $two_weeks_ago || $node_changed_time &gt;= $two_weeks_ago) {
    $this_node_is_new="THIS NODE IS NEW!";
  }

  $vars['this_node_is_new']=$this_node_is_new;

}


This would provide a $this_node_is_new variable in your node.tpl.php template file(s) when the node was created or modified within the last two weeks.