I am using the following code to display the logged in users unread message count in a template.
<?php if (messages_get_unread_count() != 0) { ?>
<div id="message_count">
<div class="countspan">
<?php echo messages_get_unread_count(); ?>
</div>
</div>
<?php } ?>
This works great however it requires a page refresh to update. Since I am making heavy use of ajax driven navigation throughout the site and the custom apps within it this is not a satisfactory solution.
How can make the counter update automatically?
I have played around with the 'lvive notifications' plugin which polls the srver every 10 seconds to provide live notifications but of course this does not interact with my custom unread message counter.
Any ideas guys? I could really use the help.