Views integration
| Project: | Privatemsg |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Jump to:
as promised, here's my first pass at views integration for privatemsg. It is definitely a first pass, with a lot of functionality missing. What it does do:
- exposes privatemsg as a base table for views, allowing you to create views of messages.
- provides all of the fields from the pm_index and pm_message tables as fields for views
- provides a message field handler that will link a subject to the message view
- provides a handful of filters
- provides relationships to the user table, for both recipient and author
- provides a default view of an inbox. this is really just a proof of concept so that reviewers don't need to create a view to review the patch.
This patch works much better in conjunction with #502664: remove author uid from pm_index. Otherwise you will see messages that you have sent in your inbox.
Also check out #502666: devel_generate functionality to help create a bunch of messages for testing!
| Attachment | Size |
|---|---|
| privatemsg.views_.patch | 16.02 KB |

#1
Well, the problem is that this does display each message on it's own. While this might work, you cannot view that message then, because the links point to messages/view/{mid}. However, that needs to be messages/view/{thread_id}. But then, you view the thread, and not the message.
#2
There is another views integration patch at #502688: Views integration
#3
damn i reallllly hoped this module had a views integration... any idea how long it would take for a views integration?
#4
For messages? Long, because our queries to select them correctly ( with threads and everything) are really complex and cannot be converted to a view easily. However, there is a patch that adds a "send user a message" link integration for views, that can be used for node and user listing...
#5
would it be possible to get the query to select messages from the module source, and with a little bit of tweaking place that in a block. I don't necessarily need it to be in a view, but i would need it in a block.
// i would only need the title, participates and date to show, when they click a row they would be send to the messages page with the clicked message
#6
You don't even need the query, we have a API function for that, see #492822: to display latest 5 (more or less) messages
#7
awesome thanks!
#8
This is looking great. One minor issue:
I can't work out how to create a delete message link. (sorted)Also, it would be great if it integrated with flags.
#9
Hi - I would be happy having a views implementation.
subscribing...
#10
subscribing
#11
howdy- may I kindly ask if there is any update on this with release of privatemsg v1.0