Why not simply add ~~TALKPAGE~~ to the bottom of a default template?
e.g.
__template.txt
--------------------------
======@!!PAGE@======
<wrap hide>
Write stuff here
</wrap>
----
~~TALKPAGE~~
[/color]
--------------------------
Otherwise, if you really do want to hack
tpl_header_.php, you'd need to generate a link to
yourwiki/doku.php?id=talk:$CurrentPage (somehow).