How do I free the useful "Inbox (x)" menu item from its not-so-useful parent "Inbox" item?

bflora - September 1, 2008 - 19:55
Project:Privatemsg
Version:5.x-3.0
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I'm a big fan of the private message module....but its got a usability problem that really makes it problematic.

So the module creates an "Inbox" menu item that indicates how many new messages you have. Great. But it "hides" that menu item inside another menu item...that does NOT indicate how many messages you've received.

How do I get it out of there and make the child menu item (the useful one) a root menu item instead of having it tucked away where my users have to click to see it?

#1

litwol - September 1, 2008 - 20:34

have you tried re-arranging the menu items in admin/build/menu?

#2

bflora - September 1, 2008 - 21:00

Certainly. And that's the weird part. The useful menu link that shows how many messages you've received, doesn't show up in the menu admin. All I see is the parent item. If I could see the child item, and it if was unlocked, that'd be the ideal setup. I'd just move it to the root of the menu.

#3

Steel Rat - September 19, 2008 - 18:30

I had a similar issue with the Inbox, so I created a contextual block that will only appear if the user has new messages.

The block is a PHP input format with the following code:

<?php
 
global $user;
  if (
$user->uid) {
   
$numnew = _privatemsg_get_new_messages($user->uid);
    if (
$numnew > 0) {
      print
' <a href="/privatemsg"><font color=red>' . $numnew . ' new message(s)
      </font></a>'
;
    }
  }
?>

And the visibility settings are using the PHP Return True option with the following code:

$numnew = _privatemsg_get_new_messages($user->uid);

I've been running this on a couple different Drupal sites for a couple years, and it works great. I just set the block weight to -10 or whatever so it shows up prominently when it's active.

#4

frankcarey - May 21, 2009 - 16:13

this is probably because it is a tab, and tabs are not configurable in admin/build/menu.

#5

xqbzzr - November 5, 2009 - 02:42
 
 

Drupal is a registered trademark of Dries Buytaert.