global static variable to be accessed in comment.tpl.php, node.tpl.php and in page.tpl.php
You can use preprocess functions to add template variables in Drupal.

For example, you could use a generic preprocess function like

hook_preprocess

And add your variable there.

It will then be available in all the other template files.