this is what I got so far…
<a href="<?php echo get_option('home') ?>/members/<?php $user_info = get_userdata($user_ID);echo $user_info->user_login; ?>/messages"><?php if ( bp_message_thread_has_unread() ) : ?>You Have New Messages<?php else: ?>Mailbox<?php endif; ?></a>
It keeps coming out as “Mailbox” when I know I have a new message. Am I doing it right? What am I missing?
Took me forever to figure this one out, yet its so simple. Here’s how I’ve set mine up:
<?php
global $bp;
$inbox_count = messages_get_unread_count();
if ($inbox_count > ‘9’) {
$inbox_count = ‘9+’;
}
echo ‘<span>’.$inbox_count.'</span>’;
?>
Each member gets a new message count and because I’ve prettied up the actual notification css I didn’t want to show a value above ‘9’.