Hi, I want to show a link to a users inbox in my theme. This is easy with a direct link to privatemsg, but I wanted to show whether the user has any messages next to the link, like this: Inbox (3)
How can I do this?
Thanks for any help.
Hi, I want to show a link to a users inbox in my theme. This is easy with a direct link to privatemsg, but I wanted to show whether the user has any messages next to the link, like this: Inbox (3)
How can I do this?
Thanks for any help.
Comments
Comment #1
yngens commentedsecond
Comment #2
litwol commentedlook in the private msg code to see how it implements such feature, then you can copy/paste that code into your theme.
Comment #3
yngens commentedline 182 says:
unfortunately, for non-coders it is difficult to figure out how and where to apply this to get number of new messages on a menu item. by the way, the module has a block, which display the requested feature. but i really want to have that link not in the block, but be able to move around menu system.
Comment #4
yngens commentedPlease move link showing number of new messages from the modules block to central menu system.
Comment #5
Jboo commentedI'm not sure of this is good coding as I'm rubbish with php but I have this working by adding this to my template.php:
Is there a better way to do this?
Comment #6
sdsheridanHow do you invoke this?
Comment #7
Jboo commentedCall it from somewhere in your template files, e.g page.tpl.php like this:
<?php print custom_privatemsg_inbox() ?>Comment #8
alex_shapka commentedOriginal request had already been realized in Drupal - there is a special block that shows Inbox link and No's of messages. So I hope maintainers will be able to move that link in a block to the central menu system, thus enabling Drupal site administrators move this link anywhere they want around the menu system. For instance, I would like to place a link to Inbox with number of new messages shown in primary links, but I don't know how.
Comment #9
raffi commentedAnyone has a solution to this?
Comment #10
berdirI'm closing old issues since this version isn't supported anymore.
Privatemsg 6.x both displays then number of new messages in a block and in the default menu system.
Comment #11
berdirComment #12
alexmoreno commentedprivatemsg_unread_count();
the function custom_privatemsg_inbox throws an error.