The privatemsg module puts a link on the navigation menu that includes the number of unread private messages for the current user. That has been working fine, but I have created a new menu for my site, disabling the default navigation menu. I now need a way to alert users when they have new private messages. I am not sure where to start on this one. Has anyone here created a menu/snippet/block, etc. to do such a thing?
I could not find a formal spot for such comments on drupal.org, so I'm putting the following bit of praise along with my question: I have been using Drupal for a few months now, and I love it. I am in the middle of migrating a few thousand Mambo/Simpleboard posts to my new site, and beyond the trials and tribulations of that project, this has been a lot of fun. I just want to publicly thank all of you, who work on this project.
Nathan
Comments
This is what I did...
I added this to my page.tpl.php:
It prints a line that says Welcome, Username and if they have any new messages it puts a little gif of a mailbox next to their name.
Michelle
Thanks. That works just fine.
Thanks for the help. I am currently working on a phptemplate based layout for my site. I will integrate that code into it once I'm finished. My site is now using the Friends Electric theme, which I didn't want to modify, so I created a block based on your code. The block will only appear when a user has new private messages. Here's the code I'm using:
to michelle
nice work :)
I realize this is old, but I
I realize this is old, but I am looking for a way to do just this.
Is this still possible? It gives me errors when I try.