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.

Auto subscribe all who comment?

Is there a way to auto subscribe all participants in a thread?

Right now, many visitors see replies only when they revisit thread where they posted a comment.

Tagged:

Comments

  • peregrineperegrine MVP
    edited April 2013

    Is there a way to auto subscribe all participants in a thread?

    not really. but each user can customize their settings.

    Anybody who wants to receive notification can just bookmark a thread and set up their notifications if they want a mail message.

    There are quite a few setting each user can set. And you can change the default settings that will apply to all new users through the config.php.

    And there must be a hundred discussion threads dealing with the other particulars.

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

  • Problem is that the way it works in Vanilla is not usual for other forum engines. So users don't understand or see that as an option.

    Why would not that be automatically applied for every user and for every topic they replay to?

    Or when they send post, they could see an option for subscription? Why not?

    Receiving emails is something else. It's ok that they can turn it of always.

  • ShadowdareShadowdare r_j MVP
    edited April 2013

    This is possible. In your ./conf/config.php, you can find this under the "Preferences" section if it already exists, else paste it in. This only applies for new users. "1" turns the setting on and "0" turns it off. You can find other preference settings in config-defaults.php if you need them. Your users can also go to the "Notification Preferences" page in their profile settings to enable this themselves, and this is the preferred way.

    $Configuration['Preferences']['Email']['DiscussionComment'] = '1';
    

    Add Pages to Vanilla with the Basic Pages app

    vrijvlinder
  • I already have that set to 1.

    But it doesn't work the way i want. :(

  • peregrineperegrine MVP
    edited April 2013

    Read my message and shadowdare's message more closely. It is a bit confusing.

    1. The changes for the email settings in the config.php - ONLY affect new users who become part of your forum.

    2. Existing users have MUST go into their notification settings or an admin has to go into their notification settings to make changes other than the ones that were default in the config when they joined the forum.

    read the docs here

    http://vanillaforums.org/docs/advancedconfig

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

  • Man :) I updated directly settings for all users in database. All users have every option turned on. But non of them is automatically subscribed to the topic they reply to!

    That is what i want!!!

  • peregrineperegrine MVP
    edited April 2013

    Man :) I updated directly settings for all users in database.

    can;t tell if that is a question or a solution.

    how? did you change the attributes flag.

    Provide what you did, and the settings referring to email notifications in your config.php.

    You should not change config-defaults.php.

    you should Just add new statements or modify statements in config.php.

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

  • Man, i did that, and i even updated it directly in database for every user, but that doesn't work :( still every user, new or old one needs to subscribe on each thread in order to get an email.

  • peregrineperegrine MVP
    edited April 2013

    @valajbeg said:
    Man, i did that, and i even updated it directly in database for every user, but that doesn't work :( still every user, new or old one needs to subscribe on each thread in order to get an email.

    I think we are at a point where no one can help you. Unless you post the changes you made to config.php as well as the database change you made. Saying you did something without specifying exactly what you did with examples is going nowhere.....fast. And you need to post your vanilla version. I will give up trying to help if all the info requested is not provided.

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

    UnderDog
  • hgtonighthgtonight ∞ · New Moderator
    edited April 2013

    @valajbeg Do you want all new discussions or discussions users have commented on to be bookmarked, for that user, automatically?

    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.

  • valajbegvalajbeg New
    edited April 2013

    This is conf file:

    // Default Preferences
    $Configuration['Preferences']['Email']['ConversationMessage'] = '1';
    $Configuration['Preferences']['Email']['AddedToConversation'] = '1';
    $Configuration['Preferences']['Email']['BookmarkComment'] = '1';
    $Configuration['Preferences']['Email']['WallComment'] = '1';
    $Configuration['Preferences']['Email']['ActivityComment'] = '1';
    $Configuration['Preferences']['Email']['DiscussionComment'] = '1';
    $Configuration['Preferences']['Email']['DiscussionMention'] = '1';
    $Configuration['Preferences']['Email']['CommentMention'] = '1';
    $Configuration['Preferences']['Popup']['ConversationMessage'] = '1';
    $Configuration['Preferences']['Popup']['AddedToConversation'] = '1';
    $Configuration['Preferences']['Popup']['BookmarkComment'] = '1';
    $Configuration['Preferences']['Popup']['WallComment'] = '1';
    $Configuration['Preferences']['Popup']['ActivityComment'] = '1';
    $Configuration['Preferences']['Popup']['DiscussionComment'] = '1';
    $Configuration['Preferences']['Popup']['DiscussionMention'] = '1';
    $Configuration['Preferences']['Popup']['CommentMention'] = '1';

    And this is what i have done in DB

    update GDN_User set Preferences = 'a:24:{i:0;s:19:"Garden.SignIn.Allow";i:1;s:20:"Garden.Activity.View";i:2;s:20:"Garden.Profiles.View";i:3;s:24:"Vanilla.Discussions.View";i:4;s:23:"Vanilla.Discussions.Add";i:5;s:20:"Vanilla.Comments.Add";s:24:"Vanilla.Discussions.View";a:1:{i:0;s:2:"-1";}s:23:"Vanilla.Discussions.Add";a:1:{i:0;s:2:"-1";}s:20:"Vanilla.Comments.Add";a:1:{i:0;s:2:"-1";}s:17:"DismissedMessages";a:1:{i:0;s:1:"2";}i:6;s:19:"Garden.SignIn.Allow";i:7;s:20:"Garden.Activity.View";i:8;s:20:"Garden.Profiles.View";i:9;s:24:"Vanilla.Discussions.View";i:10;s:23:"Vanilla.Discussions.Add";i:11;s:20:"Vanilla.Comments.Add";s:17:"Email.WallComment";s:1:"1";s:21:"Email.ActivityComment";s:1:"1";s:25:"Email.ConversationMessage";s:1:"1";s:25:"Email.AddedToConversation";s:1:"1";s:23:"Email.DiscussionComment";s:1:"1";s:23:"Email.DiscussionMention";s:1:"1";s:20:"Email.CommentMention";s:1:"1";s:21:"Email.BookmarkComment";s:1:"1";}';

  • hgtonighthgtonight ∞ · New Moderator

    @valajbeg, if you indent your code listing with 2 spaces, it will be more readable. Like this:

    $Configuration['Preferences']['Email']['ConversationMessage']   = '1';
    $Configuration['Preferences']['Email']['AddedToConversation']   = '1';
    $Configuration['Preferences']['Email']['BookmarkComment']       = '1';
    $Configuration['Preferences']['Email']['WallComment']           = '1';
    $Configuration['Preferences']['Email']['ActivityComment']       = '1';
    $Configuration['Preferences']['Email']['DiscussionComment']     = '1';
    $Configuration['Preferences']['Email']['DiscussionMention']     = '1';
    $Configuration['Preferences']['Email']['CommentMention']        = '1';
    $Configuration['Preferences']['Popup']['ConversationMessage']   = '1';
    $Configuration['Preferences']['Popup']['AddedToConversation']   = '1';
    $Configuration['Preferences']['Popup']['BookmarkComment']       = '1';
    $Configuration['Preferences']['Popup']['WallComment']           = '1';
    $Configuration['Preferences']['Popup']['ActivityComment']       = '1';
    $Configuration['Preferences']['Popup']['DiscussionComment']     = '1';
    $Configuration['Preferences']['Popup']['DiscussionMention']     = '1';
    $Configuration['Preferences']['Popup']['CommentMention']        = '1';
    

    and

    update GDN_User set Preferences = 'a:24:{i:0;s:19:"Garden.SignIn.Allow";i:1;s:20:"Garden.Activity.View";i:2;s:20:"Garden.Profiles.View";i:3;s:24:"Vanilla.Discussions.View";i:4;s:23:"Vanilla.Discussions.Add";i:5;s:20:"Vanilla.Comments.Add";s:24:"Vanilla.Discussions.View";a:1:{i:0;s:2:"-1";}s:23:"Vanilla.Discussions.Add";a:1:{i:0;s:2:"-1";}s:20:"Vanilla.Comments.Add";a:1:{i:0;s:2:"-1";}s:17:"DismissedMessages";a:1:{i:0;s:1:"2";}i:6;s:19:"Garden.SignIn.Allow";i:7;s:20:"Garden.Activity.View";i:8;s:20:"Garden.Profiles.View";i:9;s:24:"Vanilla.Discussions.View";i:10;s:23:"Vanilla.Discussions.Add";i:11;s:20:"Vanilla.Comments.Add";s:17:"Email.WallComment";s:1:"1";s:21:"Email.ActivityComment";s:1:"1";s:25:"Email.ConversationMessage";s:1:"1";s:25:"Email.AddedToConversation";s:1:"1";s:23:"Email.DiscussionComment";s:1:"1";s:23:"Email.DiscussionMention";s:1:"1";s:20:"Email.CommentMention";s:1:"1";s:21:"Email.BookmarkComment";s:1:"1";}';

    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.

  • I'm not expert in editing, thank you :)

  • hgtonighthgtonight ∞ · New Moderator

    @hgtonight said:
    valajbeg Do you want all new discussions or discussions users have commented on to be bookmarked, for that user, automatically?

    Is this right @valajbeg?

    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.

  • Yes i want that, but unfortunately, it seems that auto bookmark is not possible AFAIS

  • hgtonighthgtonight ∞ · New Moderator

    @valajbeg, not possible out of box. Still possible with some coding. :D

    The function you want to call is BookmarkDiscussion on the discussion model. And you want this to happen every time the user comments or creates a discussion. Discussion creation is done on the PostController and has an event AfterDiscussionSave.

    So you would have something like this:

    PostController_AfterDiscussionSave_Handler($Sender) {
      $Sender->DiscussionModel->BookmarkDiscussion($DiscussionID, $TransientKey)
    }
    

    Then you would have to also handle the AfterCommentSave event (also on the post controller).

    For a full list of events in the 2.0.18.x branch, check out the wiki.

    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.

    peregrinevalajbegShadowdare
  • mmmm I like it. Thank you.

    Vanilla code is such a mess, i didn't even try to figure it out that deep.

    I'll try that. Thank you!

  • @valajbeg said:

    Yes i want that, but unfortunately, it seems that auto bookmark is not possible AFAIS

    @hgtonight said:

    @valajbeg, not possible out of box. Still possible with some coding. :D

    Can you not just use the auto bookmark plugin? From what I've read, this is what you are looking for.

    http://vanillaforums.org/addon/autobookmark-plugin

    hgtonight
  • hgtonighthgtonight ∞ · New Moderator

    @kirkpa31 Thanks for bringing that addon up!

    That plugin is an excellent example of how simple a plugin for Vanilla can be. It contains a single event handler:

    public function PostController_AfterCommentSave_Handler($Sender) {

    Which lines up with how I was thinking. :D

    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.

    kirkpa31
Sign In or Register to comment.