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.

How to set Default Notification Preferences?

I want to set my new users' default email notification settings.

I found this in applications/vanilla/settings/class.hooks.php, but this isn't where I can actually set the preferences; but I can't find where it is.

public function ProfileController_AfterPreferencesDefined_Handler($Sender) {
          $Sender->Preferences['Notifications']['Email.DiscussionComment'] = T('Notify me when people comment on my discussions.');
          $Sender->Preferences['Notifications']['Email.DiscussionMention'] = T('Notify me when people mention me in discussion titles.');
          $Sender->Preferences['Notifications']['Email.CommentMention'] = T('Notify me when people mention me in comments.');
          $Sender->Preferences['Notifications']['Email.BookmarkComment'] = T('Notify me when people comment on my bookmarked discussions.');


          $Sender->Preferences['Notifications']['Popup.DiscussionComment'] = T('Notify me when people comment on my discussions.');
          $Sender->Preferences['Notifications']['Popup.DiscussionMention'] = T('Notify me when people mention me in discussion titles.');
          $Sender->Preferences['Notifications']['Popup.CommentMention'] = T('Notify me when people mention me in comments.');
          $Sender->Preferences['Notifications']['Popup.BookmarkComment'] = T('Notify me when people comment on my bookmarked discussions.');

          if (Gdn::Session()->CheckPermission('Garden.AdvancedNotifications.Allow')) {
             $Sender->Preferences['Notifications']['Email.NewDiscussion'] = array(T('Notify me when people start new discussions.'), 'Meta');
             $Sender->Preferences['Notifications']['Email.NewComment'] = array(T('Notify me when people comment on a discussion.'), 'Meta');
    //      $Sender->Preferences['Notifications']['Popup.NewDiscussion'] = T('Notify me when people start new discussions.');

Best Answer

  • peregrineperegrine MVP
    edited May 2012 Answer ✓

    You must mean the advanced configuration setting in the documentation.

    just select the one you want to change and add a line in config.php

    or if you really wanted to you could look at this posted yesterday.

    http://vanillaforums.org/discussion/comment/160113/#Comment_160113

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

Answers

Sign In or Register to comment.