0

I find the perfect module to do what i want to do in private messages (put a "Send author a message" to open a contact between a user and an author)

Unfortunately, i didn't find a way to put that "Send author a message" when i use views module. I display my article by fields and i don't find that field. I'm just begin to discover Drupal 7 so i don't know if i do the right thing.

I searched on the module section in drupal.org and i saw that the only module available for views with private messages was for Drupal 6.

Maybe someone know if there is a solution to integrate private messages with views (i'd love to have the same behavior that flags has with views: add the flag with add field) I looked at "advanced section" and "add relationship" to see if i can find something to add like flag but i didn't find anything.

ps: sorry if i made many mistake in english.

Thanks, Arno

1

That should be there. Make sure that you add a relationship to the user/author of the nodes that you are displaying, that might be the missing piece.

Note that this is the only available views integration as of now. Privatemsg and it's group of submodules rely heavily on dynamic queries and being able to alter them. That and the rather complex queries which can't be replaced by Views easily.

|improve this answer|||||
  • Thanks Berdir you're right that was the missing part => Content: Author. – Epok Jul 25 '12 at 23:18
  • @Berdid, notice there is a patch which adds preliminary views integration here: drupal.org/node/1573000. – Druvision Nov 5 '13 at 9:46
0

The URL for 'send author a message' is 'messages/new/[target-user:uid]'. Simply add it as a new custom views HTML field (replace [target-user:uid] with the UID of the target user, which you should fetch using a previous view field.

When you enter this URL in you browser, you get a nice screen which allows to send the user a private message:

URL to send a new message to a user

The URL can also be used in a custom pane if you set a "send a message" button on the user's profile page, or anywhere else.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.