I don't know how Infolinks calls its module a stable one when it started giving problems in my taxonomy breadcrumbs in my site.
Here are the easy steps to add Javascript Ad code in your site.
<?php print $closure ?> </body> </html>
Now just go to admin/build/themes and click configure on the default theme and Save it once so that your site's theme cache is recreated.
If you don't want the infolink code to be displayed for admin then wrap the code as in below. If you don't want to display only for anonymous users then simply check $user->uid>0 instead of :
global $user;
if( $user->uid != 1)
{
//Your javascript code
}
Do you have same files sharing multiple drupal sites? Then integrate the Javascript code in the same page.tpl.php using the following technique:
<?php
{
global $base_root;
global $user;
if( $user->uid != 1 && strstr($base_root,"site1.com") )
{
print<<<EOT
<script type="text/javascript">
var infolink_pid = 325111;
var infolink_wsid = 4;
</script>
<script type="text/javascript" src="http://resources.infolinks.com/js/infolinks_main.js"></script>
EOT;}
else if( $user->uid != 1 && strstr($base_root,"site2.com") )
{
print<<<EOT
<script type="text/javascript">
var infolink_pid = 325111;
var infolink_wsid = 5;
</script>
<script type="text/javascript" src="http://resources.infolinks.com/js/infolinks_main.js"></script>
EOT;}
else if( $user->uid != 1 && strstr($base_root,"site3.com") )
{
print<<<EOT
<script type="text/javascript">
var infolink_pid = 325111;var infolink_wsid = 3;
</script>
<script type="text/javascript" src="http://resources.infolinks.com/js/infolinks_main.js"></script>
EOT;}
}?>