Back in the days of Drupal 4 and 5 there was a popular module called Contemplate. This module allowed the site designer to modify the default node.tpl by adding PHP code or re-arranging node fields as required. This tpl was then stored ion the db.
This module still exists but has no ability (short of writing PHP code) to modify node templates to include related content (i.e. content from other nodes which are related to the primary node via something like a nodereference or userreference field.