Hi,
I was wondering if anyone had gotten private message subscriptions 5.x-2.x-dev successfully working. I have Privatemsg 5.x-2.x-dev and Subscriptions 5.x-2.0-beta4 installed and I just can not seem to find a button which would allow users to receive notification by e-mail when they have a new private message. There is no "settings" page for "Privatemsg subscriptions" module shipped with the 5.x-2.x-dev version of Privatemsg. There is no option to subscribe for mail from "subscriptions" module control interface. Has anyone seen it work? Am I missing something obvious?
Thanks a lot

Comments

doublejosh’s picture

You have to go digging in the private message module file.

The default settings are set in there.
Then once a user joins they can edit their own notification settings in their Account information section.

Message me if you need more info about where those default code lines are.

-josh

doublejosh’s picture

You'll notice that at the top of the privatemsg.module file there are three constants defined...

define('PRIVATEMSG_MAIL_NONE', 0);
define('PRIVATEMSG_MAIL_DIGEST', 1);
define('PRIVATEMSG_MAIL_INDIVIDUAL', 2);

If you do a FIND for the string "PRIVATEMSG_MAIL" you'll see an entry on line 186 that looks like this...

'#default_value' => isset($edit['privatemsg_mailalert']) ? $edit['privatemsg_mailalert'] : PRIVATEMSG_MAIL_NONE,

I changed mine to...

'#default_value' => isset($edit['privatemsg_mailalert']) ? $edit['privatemsg_mailalert'] : PRIVATEMSG_MAIL_INDIVIDUAL,

From what I understand this is the place to set the default for a user. Other places where the constants are used determine whether to send the notifications or not, so don't edit those.

I'm 95% sure this will do what you want. I did the did the edit a while ago, so I'm not 100%

sterwa’s picture

Josh,

the lines you are talking about are in the 5.x-1.8 version of the module, while my question was about 5x-2.x-dev one. The new version has an entirely different organization, including the fat that notification functionality is now realized using a dependency with Subscriptions module.

Are you sure you did not get confused about the versions? Because I searched across all the filed from the dev version, and did not find the lines you refer to. I did find them in the 5.x-1.8 one.

Thanks

doublejosh’s picture

Sorry. This must be the new direction. It's a good thing, and I image allows this type of use setting to be set in one place and have multiple modules utilize it. My solution was for privatemsg 1.8 only.

seth97’s picture

Sorry, not on this topic....
doublejosh - does your solution work fine for existing users? I saw an other solution to this (http://drupal.org/node/200417) where there were some strange things going on.
Have you tried your solution extensively?
Thanks!

Zorga Lina’s picture

sterwa - Now Aug. 2008 - I have 5x-2.x Privatemsg installed, and would like to know if you found a solution to configuring/subscribing to email notification for new private msgs using Subscriptions module, subscriptions_mail, mail_edit etc. As you said, in Subscriptions it seems one can subscribe to content type or node updates. How do you set up subscription for notification on new Privatemsg messages? Do you have to define it as a new content type?

Thanks for any hints.

berdir’s picture

Status: Active » Closed (won't fix)

Sorry for pinging the participants, I am closing old issues.

This version of Privatemsg is not supported anymore, maybe it is already implemented in Privatemsg for Drupal 6 and if not, you are welcome to open a new issue for it.