Make members of a group watch a category by default

Hi Christoph. Sorry for not answering earlier. Good to know you figured it out. Admittedly, it’s not a very intuitive plugin. An admin UI would go along way towards making it more usable.

إعجابَين (2)

This can probably be closed now, although…

One feature I’m missing is the ability to change these settings via a category’s own settings. I went looking for this setting when a customer requested it, and the first place I looked was the settings screen of a specific category.

pr-welcome?

5 إعجابات

Has this been added as core functionality?

إعجاب واحد (1)

If you’re referring to the ‘default categories watching’ setting and it’s cousins, then yes, it’s in core.

إعجاب واحد (1)

I’m not sure what the cousins you’re referring to are, but the default categories watching setting doesn’t accomplish the OP’s goal:

I don’t just mean there’s no UI like that. AFAIK, the only way to get a specific group (not all users) to “watch” (or “watch first post” or whatever) a specific category – and to have that happen after the user has been created – is by using a plugin, such as the one I use.

I’d be happy to ditch this workaround, but I don’t see this functionality in core. Or have I missed something in a recent update?

5 إعجابات

I don’t see in this thread whether staff have answered the question if they agree this feature should be in core. Knowing if it’s in the pipeline or not would help.

إعجاب واحد (1)

I created an RFC for the implementation side of this a while back (I’m sure I linked to it somewhere in this thread):

But it looks like the consensus is for implementing this as a plugin. That’s something I plan to do at some point, but I can’t say when.

13 إعجابًا

But it looks like the consensus is for implementing this as a plugin. That’s something I plan to do at some point, but I can’t say when.

@LeoMcA is this something you got around to doing in the end?

Not yet, I’ll post in that other thread when I do :slight_smile:

There are a couple plugins that do this that require a bit of customization to work. One is linked above. If it won’t work for you and you have a budget, feel free to contact me.

@pfaffman, interested in what plugin you might recommend. Are you referring to this one?

إعجاب واحد (1)

Yes. That’s one that I’ve modified. I modified it find all groups matching a pattern, and then find categories with similar names and force watching for those.

Very cool. If all we want to do is force watch 2-3 Categories for 2-3 Groups, the plug in will work out of the box?

Is there any documentation on it, or is it self-explanatory once installed?

No, it won’t work out of the box. You need to fork it on Github and modify the plugin.rb file so that it matches your groups and categories. Then you install your modified version.

3 إعجابات

Nope. If you know any programming, you might be able to make sense of the code. If not, and you have a budget, you can post in marketplace, or contact me directly. My contact info is in my profile.

إعجابَين (2)

Ok, Jay. We’ve certainly valued your work in the past, so will ping you if we need further assist!

Thanks, Christoph. We’ll have a look!

إعجابَين (2)

@kimardenmiller I use this plugin, which I developed from the ones mentioned here:
https://github.com/amical/discourse-watch-category

If you can fork that plugin on GitHub, I can help you customize it. :ok_hand:

إعجابَين (2)

Nice Alex. Looks as if you have nicely parameterized it with the groups_cats dictionary.

Just edit those for Watching vs. Watching First Post, then just edit the frequency at the end?

Anything else to know?

إعجابَين (2)

Nope, you got it! :+1:

Holler if you run into trouble.

إعجاب واحد (1)

I needed that, but as a one shot feature. What I did is (based on the code of this plugin) to run a few lines of code from the rails console:
from your discourse folder

./launcher enter app
root@application-app:/var/www/discourse# rails c
[1] pry(main)>

Once you are on the rail console:

## customise to what you want
g = Group.find_by_name('your_group')
c_id = Category.find_by_slug('you_category_slug').id
pref=:watching_first_post

g.users.each do | user |
   existing = CategoryUser.lookup(user, pref).pluck(:category_id)
   CategoryUser.set_notification_level_for_category (user, CategoryUser.notification_levels[pref], c_id)   unless existing.include?(c_id)
end

Hope it helps someone

5 إعجابات