Closed (fixed)
Project:
Privatemsg
Version:
5.x-1.6
Component:
User interface
Priority:
Minor
Category:
Feature request
Assigned:
Reporter:
Created:
31 May 2004 at 19:25 UTC
Updated:
23 Jun 2010 at 07:25 UTC
Jump to comment: Most recent file
Comments
Comment #1
TDobes commentedComment #2
brihogan commentedI made a block that shows:
Inbox (x)
Compose Message
Open "privatemsg.module" and copy the code below to the end of the file (but before the "?>" ).
Hope this helps people. Be sure to keep a backup copy of the original .module since this "hack" may not be perfect. I've only tested it under my circumstances and not under all possibilities. Use at your own risk.
----------------------------- COPY BELOW THIS LINE ----------------------
/**
* Implementation of hook_block().
*/
function privatemsg_block($op = 'list', $delta = 0, $edit = array()) {
if ($op == 'list') {
$blocks[0]['info'] = t('Inbox');
return $blocks;
}
elseif ($op == 'view') {
switch ($delta) {
case 0:
return privatemsg_block_inbox();
}
}
}
function privatemsg_block_inbox() {
global $user;
if (user_access('access private messages') && (isset($user->privatemsg_allow) ? $user->privatemsg_allow : 1)) {
$items = array(l(t('Inbox ('. (int)_privatemsg_get_new_messages() .')'), 'privatemsg'), l(t('Compose Message'), 'privatemsg/msgto'));
$block['subject'] = t('Inbox');
$block['content'] = theme('item_list', $items);
return $block;
}
}
Comment #3
Christefano-oldaccount commentedTurned into a patch. I'd really like to see this feature added to privatemsg.
Applied against privatemsg.module,v 1.70.2.19.
Comment #4
Christefano-oldaccount commentedComment #5
mindless commentedadded code based on this to DRUPAL-5 branch.
Comment #6
Christefano-oldaccount commentedIt looks like the path to the Privatemsg inbox has changed.
Comment #7
mindless commentedDo you have a preference for that url vs just "privatemsg"? privatemsg/inbox is added just so you can move the menu link around using drupal's menu system, but "privatemsg" is still the inbox too, just as it was before. Unless you prefer to have this patch applied, I'll just leave the block as it is now.
Comment #8
mindless commentedComment #9
(not verified) commentedComment #10
gilcpd commentedshould I apply both patches? the first one and the other that fixes the private message path?
Comment #11
berdirYou should not add anything, this is an old issue and doesn't apply to D6.
Check out http://drupal.org/node/624528