Views integration

Roger López - June 26, 2009 - 05:15
Project:Privatemsg
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Description

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!

AttachmentSize
privatemsg.views_.patch16.02 KB

#1

Berdir - June 26, 2009 - 11:39

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

RoboPhred - September 1, 2009 - 02:20

There is another views integration patch at #502688: Views integration

#3

lasac - September 1, 2009 - 19:46

damn i reallllly hoped this module had a views integration... any idea how long it would take for a views integration?

#4

Berdir - September 1, 2009 - 21:31

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

lasac - September 2, 2009 - 07:56

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

Berdir - September 2, 2009 - 13:54

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

lasac - September 2, 2009 - 14:41

awesome thanks!

#8

SystemicPlural - September 10, 2009 - 19:02

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

R.Hendel - October 29, 2009 - 14:06

Hi - I would be happy having a views implementation.
subscribing...

#10

trupal218 - November 8, 2009 - 08:10

subscribing

#11

rburgundy - December 4, 2009 - 13:49

howdy- may I kindly ask if there is any update on this with release of privatemsg v1.0

 
 

Drupal is a registered trademark of Dries Buytaert.