Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: beebauman on November 29, 2011, 03:17:26 PM

Title: Mod to set user defaults for advanced email notification options
Post by: beebauman on November 29, 2011, 03:17:26 PM
Hi, I am running SMF 2.0.1. I want to be able to configure the defaults for the following 3 settings for all current and future new users:

1. "When sending notification of a reply to a topic, send the post in the email"
2. "For topics and boards I've requested notification on, notify me:..."
3. "For topics and boards I've requested notification on, notify me of:"

Right now I am able to set these manually on a per-user basis in the Modify Profile - Notifications area of an individual user's profile.

There is another related setting "Turn notification on when you post or reply to a topic" which I *am* able to control the default for with existing and future new users in: Admin - Themes and Layout Settings - Member Options - Configure guest and new user options for this theme/Change current options for all members using this theme".

However I want to control the other 3 options in this way as well. How can I create a mod that will enable me to do so? Thank you very much in advance!
Title: Re: Mod to set user defaults for advanced email notification options
Post by: beebauman on December 05, 2011, 05:35:04 PM
Anybody?
Title: Re: Mod to set user defaults for advanced email notification options
Post by: davegior on December 11, 2011, 09:04:22 PM
I'm looking for the same mod. Be nice if it was added in the next version update.
Title: Re: Mod to set user defaults for advanced email notification options
Post by: gho on January 28, 2012, 04:55:35 PM
This is what I need too
Title: Re: Mod to set user defaults for advanced email notification options
Post by: Wilo on February 21, 2012, 08:17:24 AM
Me too, I'm also looking for a mod which turns on notifications for member groups.
Title: Re: Mod to set user defaults for advanced email notification options
Post by: emanuele on February 21, 2012, 11:14:41 AM
Code not tested!!

Open Subs-Members.php (in Sources):
Code (find) Select
'pm_email_notify' => 1,
Code (add after) Select
'notify_send_body' => 1,
'notify_regularity' => {regularity_you_want},
'notify_types' => {type_you_want},


Then replace {regularity_you_want} with the number of the one you want from:
* 0 => Instantly
* 1 => Instantly - but only for the first unread reply
* 2 => Daily
* 3 => Weekly

and {type_you_want} with the number of the type you want from:
* 1 => Replies and moderation
* 2 => Moderation only if I started the topic
* 3 => Only replies
* 4 => Nothing at all

That will apply for all new members.
Title: Re: Mod to set user defaults for advanced email notification options
Post by: davegior on February 22, 2012, 03:31:35 PM
Quote from: emanuele on February 21, 2012, 11:14:41 AM
Code not tested!!

Open Subs-Members.php (in Sources):
Code (find) Select
'pm_email_notify' => 1,
Code (add after) Select
'notify_send_body' => 1,
'notify_regularity' => {regularity_you_want},
'notify_types' => {type_you_want},


Then replace {regularity_you_want} with the number of the one you want from:
* 0 => Instantly
* 1 => Instantly - but only for the first unread reply
* 2 => Daily
* 3 => Weekly

and {type_you_want} with the number of the type you want from:
* 1 => Replies and moderation
* 2 => Moderation only if I started the topic
* 3 => Only replies
* 4 => Nothing at all

That will apply for all new members.

Thanks emanuele, works great
Title: Re: Mod to set user defaults for advanced email notification options
Post by: emmjaibi on August 10, 2012, 03:49:58 PM
Just so I understand - this only works for new users and not existing, right?

I would love to be able to modify notification settings for ALL users as I find some users have notification set for 'first reply only' and then they never seem to get notifications later for new topics on monitored boards because they hadn't logged in since that first notification.

If there was some way to ensure users got notified of new TOPICS all the time even if they've not been online since other topics or replies were added, that would be ideal.

But the way it seems to work now is like so:
1) Topic A is posted and User X reads it then logs out.
2) Later User Y posts a reply to Topic A and User X gets a notification email.
3) Some time later (hours/days) Topic B is posted by some user (other than User X) but because User X hasn't logged in since that reply to Topic A was posted (item 2 above), they never get a notification for Topic B.

This is how it works, right?