So I'm trying to modify the node teaser output of the Similar Terms module via its similarterms.tpl.php file. I've managed to pull most of what I need from nodes (images, video thumbnails, titles and submitted). The problem begins when I try to wrap the teaser image ($field_thumbnail or $field_image) with the url to the node using something such as:

<a href="<?php print $node_url; ?>"></a>

For example, I've tried:

 print '<a href="print $node_url;">'. theme('imagecache', 'image_thumbnail', $node->field_thumbnail[0]['filepath']); 
	  print "</a>\n";

Within the context of:

 if ($display_options == 'teaser') {
     foreach ($items as $node) {
	
	   if ($node->field_thumbnail[0]['fid'] && !strstr($node->field_thumbnail[0]['filepath'], 'imagefield_default_images')) {
	
      print '<a href="print $node_url;">'. theme('imagecache', 'image_thumbnail', $node->field_thumbnail[0]['filepath']); 
	  print "</a>\n";
} 
	else {
		if ($node->field_video[0]['embed']) {
            $field_type = 'field_video';
            $system_types = _content_type_info();
            $field = $system_types['fields'][$field_type];           
            print theme('emvideo_video_thumbnail', $field, $node->field_video[0], 'emvideo_thumbnails', $node);          
        }	
		}
		if ($node->field_image[0]['fid'] && !strstr($node->field_image[0]['filepath'], 'imagefield_default_images')) {
	  print theme('imagecache', 'image_thumbnail_small', $node->field_image[0][filepath]); 
	       //replace teaser with field_thumbnail
	  }

      print '<li>'. l($node->title, 'node/'. $node->nid);
	  print format_date($node->created, 'short') . ' by ' . theme('username', $node);
      print "</li>\n";
	  print '<div class="clear"></div>';
    }
  }

Anybody better at PHP willing to lend a hand?

Thanks,