Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Changing Default User Notification Settings

Hi,

Is there a way we can change the default user notification settings?

If anyone knows, please tell me.

Thanks so much!
Sheena

Comments

  • Yes, these are the defaults:

    $Configuration['Preferences']['Email']['ConversationMessage'] = '1';
    $Configuration['Preferences']['Email']['BookmarkComment'] = '1';
    $Configuration['Preferences']['Email']['ParticipateComment'] = '0';
    $Configuration['Preferences']['Email']['WallComment'] = '0';
    $Configuration['Preferences']['Email']['ActivityComment'] = '0';
    $Configuration['Preferences']['Email']['DiscussionComment'] = '0';
    $Configuration['Preferences']['Email']['Mention'] = '0';
    $Configuration['Preferences']['Popup']['ConversationMessage'] = '1';
    $Configuration['Preferences']['Popup']['BookmarkComment'] = '1';
    $Configuration['Preferences']['Popup']['ParticipateComment'] = '0';
    $Configuration['Preferences']['Popup']['WallComment'] = '1';
    $Configuration['Preferences']['Popup']['ActivityComment'] = '1';
    $Configuration['Preferences']['Popup']['DiscussionComment'] = '1';
    $Configuration['Preferences']['Popup']['Mention'] = '1';
    

    If you change a setting, just copy over that line to your config.php.

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    Be aware that these changes will only affect new users.

  • Thank you so much Bleistivt! And whu606 - thank you for that important additional information.

    -Sheena

  • Sorry, I just had to come back to this for a new install I was forced to do. And now I can't remember where this file is that you're saying I can edit. Thanks!

    -Sheena

  • Oh wait... do you mean to just add this to the config.php file? I don't see a section in there for this - so I'm assuming you meant to just add it to there. Please let me know if I'm wrong. Thank you!

    -Sheena

  • peregrineperegrine MVP
    edited December 2014

    Please let me know if I'm wrong

    you are correct,

    • Add a configuration line, it if you don't see it.
    • if you see the config statement meaning it exists in your config.php, you can edit the statement on the right hand side of the = sign to the value you want.

    • You can add lines configuration lines anywhere in the conf/config.php. they will get sorted and organized next time you save a setting from the dashboard.

    see the faq.

    http://vanillaforums.org/discussion/28420/faq

    http://vanillaforums.org/discussion/comment/222117/#Comment_222117

    or the documentation. it was written to help you with the very questions you ask.

    http://docs.vanillaforums.com/developers/configuration/

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • gohuntergohunter
    edited January 2015

    is it possible to update notification preferences for the existing users all at once?

  • R_JR_J Ex-Fanboy Munich Admin

    It would require coding a plugin just for that. But look at that comment: http://vanillaforums.org/discussion/comment/216231/#Comment_216231

    The crucial information is this:

    These are the config options that set the default email preferences if a user hasn't set them:

    So if your users already made a decision, do you really want to override that? If not, setting the config options will be enough.

  • hgtonighthgtonight ∞ · New Moderator

    @gohunter said:
    is it possible to update notification preferences for the existing users all at once?

    I wouldn't suggest doing it for reasons @R_J pointed out.

    To do it, you would have to loop through all the user records and add the preferences to the Attributes field by unserializing the field, adding your prefs as necessary, then reserializing the data and updating the field. I did something similar in the DiscussionExtender addon: https://github.com/hgtonight/Plugin-DiscussionExtender/blob/master/class.discussionextender.plugin.php#L411-L436

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • @R_J‌ and @hgtonight‌, thanks for the sources.

    Users' email preferences were not set by the users before and the problem is that the default settings were not set previously. And now, every user has blank unchecked preferences.

    That is why, I am concerning to set all of them to default settings and send mass email notifying about the instruction on how to change their email preferences and etc.

Sign In or Register to comment.