I actually just got this working on my site. I was seeing similar errors that have been reported in other threads, so I decided to try to do things a little differently and I was able to get it to work.
Now, I don’t use the full features of this plugin, I just wanted the “X new posts and X new comments” banner, not any of the images or text next to posts or comments, etc.
Also, I’m using the default Kubrick theme (though heavily modified).
In my header.php, I have this:
<code><?php wp_head(); ?>
<?php if (function_exists('ak_last_visit')) : ?>
<?php echo '<script type="text/javascript" src="'; ?><?php bloginfo('siteurl'); ?><?php echo '/wp-content/plugins/wp-last-visit.php?type=js"></script>'; ?>
<?php endif; ?>
</head>
The first and last lines of code above are simply to show the placement of my plugin code.
In my sidebar.php where I want the information to show up, I have this:
<code><?php if (function_exists('ak_last_visit')) : ?>
<li><h2>Welcome Back</h2>
<ul>
<script type="text/javascript">slvBanner();</script>
</ul>
</li>
<?php endif; ?>
The “if (function_exists())” removes the extraneous code (h2, ul, li) from showing on my site if I deactivate the plugin.
I hope this helps!