It looks like privatemsg http://drupal.org/project/privatemsg is getting close to beta.
Once they release a beta, we can test the integration of user relationships with privatemsg.

Rick Nashleanas
www.monarchdigital.com

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

SeanBannister’s picture

Title: privagemsg » Privagemsg for 6.x
Version: 6.x-1.0-beta9 » 6.x-1.x-dev

I'd really like to see Privatemsg for 6.x

Michelle’s picture

It's getting close to RC3 now... :)

Michelle

jaydub’s picture

Title: Privagemsg for 6.x » Privatemsg for 6.x
4drian’s picture

subscribing

design.er’s picture

oh yeah, since i know (for about 6 hours :) that i need both modules (UR and privatemsg) for my current project, it would be really great to have the implementation.
of course i'll helping out with testing and reporting.

regards and thanks a lot for your great work! :)

gunzip’s picture

subscribe

robertdjung’s picture

subscribe

bgnm2000’s picture

subscribe

mansspams’s picture

Hell, yeah, I subscribe!

mansspams’s picture

Any news of progress? privatemsg is rc2 already, guess thats pretty close to release. Any social site built with User Relationships could benefit from integration.

alex.k’s picture

Sorry but realistically I won't be able to work on it in the near future, unless something changes. Perhaps someone with an itch to scratch can take it on and port the 5.x version. Thanks.

Michelle’s picture

Since I don't use UR on a D5 site, could someone explain what the integration does? Is it some sort of security where only your friends can PM you? I might be able to take a look at it if I knew what you were going for. No promises, though.

Michelle

alex.k’s picture

Michelle, UR-Privatemsg integration allows sending request/accept/reject notifications to the privatemsg inbox, instead of by email. IIRC it's not for privacy i.e. restricting who can contact a user based on their relationships. Although, thanks for this cool use case.

Michelle’s picture

Ah... Hmm... I wonder, in that case, if it might not be better to integrate with the notifications module? That module has a framework that allows you to choose where you want your notifications to go and I'm fairly sure PM is an option.

Michelle

alex.k’s picture

That would also allow us to scrap user_relationships_mailer module, too, as well as allow XMPP and SMS alerts.

Reading http://drupal.org/project/messaging however,

Privatemsg, integrating with Privatemsg module (Drupal 5 only)

I'd rather go the notifications/messaging framework route, as I use it and not Privatemsg. But it doesn't solve the problem of this issue.

Michelle’s picture

Ah, darn. My site is still on D5 so I didn't realize that. Well, my feeling is integrating UR with notifications and then notifications with PM would be the way to go since it provides the most flexibility. But given that I'm all talk at this point, it is, of course, up to whoever ends up doing the coding. :)

Michelle

alex.k’s picture

We can rephrase today's exchanges thusly then: If someone implements Privatemsg 6.x for the Messaging framework, then I'll pitch in and help move UR to it, too. :)

Michelle’s picture

Ok, I went looking for an existing issue on noti/pm for D6 to link this to and found http://drupal.org/node/340676 which implies it's done but untested. If some of the people subscribed here could go test that out, that would be a good first step. :)

Michelle

mansspams’s picture

Tested. Privatemesg works with Notifications/Messaging. I can subscribe and receive information to PM on node changes/comments etc. Fresh install of D6.10 and -dev versions of Notifications, Messaging, Privatemsg, Token and admin_menu.

But... isn't what original poster was asking by integration meant that User Relations module would feed Privatemsg information on who is friends with whom and would allow private messages ONLY BETWEEN users related? I think they (and I) want this module to be ported to D6...

User Relationship Privatemsg (5.x only) integration with the privatemsg module showing your relationships in the quick select list.

(except drop the select list, autocomplete is the way to go imho)

gerardos’s picture

subscribe

asak’s picture

subscribing.

PlayfulWolf’s picture

subscribe.

simonmd’s picture

suscribing

gregstout’s picture

subscribing

mansspams’s picture

Im sorry, ported (a little, so i can see UI) this module and it turns out that it is what alex.k told it is. And its not what I have imagined it is.

This is actually what I imagined it is http://drupal.org/node/458046.

alex.k’s picture

@mannsspams could you post your port so that it can be integrated into UR? I think most other people in this issue were looking just for a straight port. So it would help a lot.

Thanks.

mansspams’s picture

@alex.k Im sorry, port is just Deadwood+some manual edit to see UI, nothing more is ported since I am beginner. You need that here?

mansspams’s picture

Assigned: Unassigned » mansspams
Status: Active » Needs review
FileSize
5.47 KB

// offtopic on

Yes! I did it! My first contribution! Damn, that was not easy, lets just hope next ones comes with less pain :) I had to look up most simple php syntax and commands like print_r to see whats inside arrays, do copy paste over 200 times, stare at code for 50 hours, read tutorials, watch videos and yesterday I even shaved my head first time in my life (not because of this module, but because of heat). But i managed to find those 3 lines of code that do the magic! :)

// offtopic off

I attached module that lets UR integrate with Messaging module that in turn integrates with Privatemsg, Mail, SMS, Twitter etc. It is basically Mailer module with send method changed. Also I adjusted UI text so it reflects not only emails, but other kind of possible channels.

Known issues:

1) line brakes in emails are gone, message are delivered properly but in one block of text

2) Somebody has to test if in user_relationship_messages.module on line 95 $target and $message arrays has enough data for different send methods provided by Messaging. For reference see this page http://drupal.org/node/252684 and modules http://drupal.org/project/notifications and http://drupal.org/project/messaging_sendto

3) i could not test privatemsg, because latest versions of privatemsg and messaging does not play together again, they did in the beginning of April, but now somebody changed something i guess. Mail worked thou.

4) I am beginner, so doublecheck. Suggestion on "proper way to do stuff" welcome. Later ill learn to make patches and do fancy stuff like that, for now please accept .zip

alex.k’s picture

@mansspams thank you! The code looks pretty good at a first glance. Anyone who is watching the issue, please test.

mansspams’s picture

there is patch for messaging module (http://drupal.org/node/458366), so once again it plays nice with privatemsg and UR messages are sent successfully via messaging to privatemsg account, with no line brakes thou :) will test some more.

cglusky’s picture

@mansspams nice start. However, if I understand correctly you are trying to expose UR to Notifications and Messaging in order to gain PM capability (among the other channels that are supported by Messaging). So you really need to look at Notifications integration. Best place to look that I can think of is in the Organic Groups module. There is a sub-module that integrates OG with Notifications and thus Messaging. I think you have a good start but I do not think you want to focus on Messaging because what you are really trying to do is allow for user subscriptions to trigger notifications based on some event occurring with UR. There are some parameters that need to be set for Messaging, which it looks like you have in your code, but you really need to define the hooks for how you want the Notifications to work.

I think when you are done: When a user goes to their account settings there should be a new secondary tab under the Notifications tab that allows the user to choose what UR events they want to subscribe to and what sending method they prefer for each event - if Private Messaging with Notifications and Messaging is installed then that will be one of the options.

In short, I think you are missing a couple hooks for notifications and subscriptions. This would not be a patch but a sub module to UR in my opinion.

Hope that makes sense. And please do not get discouraged because I think you have a fantastic start for a first contribution. And I am still not sure after reading this thread several times if you really want Notifications and Messaging integrations. I think it would be cool and would give you Private Messaging but also adds a dependency to a couple other modules. I think the title of this issue should be changed if you really want Notifications and Messaging integration because it has bigger implications for UR than just PM.

R,
Coby

cglusky’s picture

and after all that i forgot to mention that integration with Notifications and Messaging does not (yet) give you the ability for two-way PM's between say users with some relationship. if that is what you are after it seems that it would make more sense to hook directly to the PM module???

and perhaps another place to look for examples would be the XMPP module - http://drupal.org/project/xmppframework since it has UR/Messaging/Notifications support.

r,
c

mansspams’s picture

ill see how far ill get and will post questions/code on the way. Thanks.

foodbo’s picture

subscribing

askibinski’s picture

Integration with notifications as described in #31 sounds like the way to go, resulting in a submodule for UR which you could enable if you need notification/messaging integration.

I think this could be fairly quickly integrated using the notification lite API. This is a submodule in the notifications module.

mErilainen’s picture

Why has the functionality changed suddenly to only allowing private messages between friends? In my opinion it should be a sub-module or a setting so that it can be possible between all/friends/relationship types. I think private messages are the best way to contact strangers, asking if they know each other etc.

Currently this is possible when I look at someones profile, there is a "send pm" link, although it shouldn't be visible. At least that's how I read somewhere. If I try to write a message using the form and adding with auto-complete, I can only see my friends, but I can type a strangers name and the message will be sent.

Bilmar’s picture

Yes, I am also encountering the problem of non-friends being able to manually type another user's name and successfully sending a pm. Is it possible to restrict private messages to only between friends?

Thank you.

alex.k’s picture

FileSize
13.37 KB

Autocomplete issue is captured in #522078: privatemsg autocomplete works only for relationships.

Why has the functionality changed suddenly to only allowing private messages between friends? In my opinion it should be a sub-module or a setting so that it can be possible between all/friends/relationship types. I think private messages are the best way to contact strangers, asking if they know each other etc.

Not sure what you mean. There is a new feature that makes this a setting in the user profile. So individual users can decide if they want to limit PM only to their relationships. I'm not aware of other restrictions besides the autocomplete issue.

Bilmar’s picture

Thanks for the link to "#522078: privatemsg autocomplete works only for relationships".
Like you said, no problems now with restricting PMs only to their relationships now.

R.Hendel’s picture

Hi,
what is the actual state concerning sending methods for UR-requests?
I would like to send / receive those notifications as private messages.

Thanks in advance for that lot of work!
Best regards,
Ralf

Subscribing...

alex.k’s picture

Ralf,

No one has implemented delivery via PM yet. As discussed above one way would be to add hooks for Notifications module to UR. Then it would send PMs via Messaging module.

The other way would be to clean up Rules integration module posted in #468764: Rules integration and send PMs from a rule (probably quite a bit less work to go this route).

robby.smith’s picture

Hello,
I have opened #678806: Admin exception for 'Restrict Private Messaging to only related users' requesting expansion of the UR-Privatemsg integration to give admin a level of privilege to still be able to send messages to any user. This is refering to the setting at www.example.com/admin/user/relationships/settings for "Allow sending messages only to confirmed relationships". I believe this will be needed if we want a system message sent to the user notifying them of notifications using Rules, but only wanting users to be able to message each other if they have a relationship. I am currently trying to set this up and hit this roadblock. I have no programming skills and would appreciate the help of the community =) Thanks!

robby.smith’s picture

There is now a workaround available at #678806: Admin exception for 'Restrict Private Messaging to only related users' for allowing admin to send privatemsgs to users even with the setting to restrict privatemsg-ing only between users with relationships set to ON. It works great but it requires manually inputting a line into a file. Can someone look into if that approach is the best? And somehow make this feature into a optional checkbox in the settings? Many thanks!

YK85’s picture

subscribing .. I was wondering if there has been any further development and if I can help with testing?

robby.smith’s picture

kindly bumping

Would anyone have time to look into adding any more integration with UR and Privatemsg?
It would be awesome if someone could please implement a checkbox option for #678806: Admin exception for 'Restrict Private Messaging to only related users' or be able to add other UIDs to the exception list. This would be great small new feature to add to this integration.

thanks!

Berdir’s picture

What exactly is the state of this issue (Don't have to the time to read it).

What about marking this one as fixed and open new issues for bugs/additional features? (Like it was already done for #678806: Admin exception for 'Restrict Private Messaging to only related users').

Bilmar’s picture

Hello,

I ran through the issue and here is the summary of what was trying to be achieved:

1. Allows sending request/accept/reject etc notifications to the Privatemsg Inbox
UR #468764: Rules integration needs to be cleaned up but it already allows this functionality (as Privatemsg-Rules is well integrated). The most recent version is at http://drupal.org/node/468764#comment-2486950 It would be much appreciated if someone could clean it up and finalize it.

2. Allow private messaging only between users with relationship
Settings to allow this at www.example.com/admin/user/relationships/settings

3. Admin/role exclusion for 'Restrict Private Messaging to only related users'
Patch tested and works #678806: Admin exception for 'Restrict Private Messaging to only related users'. Thanks Berdir!

4. I'm not sure if #28 adds any additional functionality (http://drupal.org/node/344366#comment-1576710). If I missed anything else that was trying to be achieved please add.

I believe the next step to take would be to fix up/finalize the UR-Rules integration module and better yet if someone could maintain it as a separate contrib module (as the maintainer of UR does not want to add to the UR module) it would assure further development and better integration between UR and Privatemsg and other modules.

+1 for marking this post as fixed and opening new posts as needed.

Regards

robby.smith’s picture

alex.k’s picture

Status: Needs review » Closed (won't fix)

Let's close this issue as delivery to Privatemgs neither via Messaging nor via Rules didn't happen.

Bilmar’s picture

Hi alex.k,

Delivery to Privatemsg via Rules did happen #468764: Rules integration =)
Some things need to be cleaned up but I use it on my site

Regards