Discourse Private Replies

Very cool, I was wondering if there is a way to still access the contents of private replies:

  • by Group (Teachers)
  • Trust Level (all teachers are at least Trust Level 3).
5 Likes

Why do you think that’s better?

That’s a pretty good idea. It shouldn’t be too hard to add that to the plugin.
I’ll keep it in mind but right now I don’t have a use case for this myself. PR’s are welcome though!

4 Likes

Prevents random abuse from topic starters enabling the setting on non-intended categories. It’s a “why would you do that?” situation but still something that needs a flag to resolve.

3 Likes

Yeah, that’s useful indeed. So that could be solved by a category setting ‘allow private replies’.
I thought you wanted a ‘topics have private replies by default’ setting, which would be harder to build.

3 Likes

Hello, Richard! Your teacher should be happy because your plugin works great :grinning:

I think about 2 improvements:

  1. Is it possible to make this function active by default? This should be set in the category settings. No need to do it manually with every topic.
  2. Make replies visible to specific groups set in the settings?
4 Likes

Hi! I’d like to add translations to your plugin. Tried to add 2 extra files: client.en and server.en
Then I did ./launcher rebuild app, but the translation didn’t appear after I changed the locale in the user interface. What I missed?

1 Like

The files should be called client.XX.yml and server.XX.yml where XX is the language code.

However, there are already files for en (English): https://github.com/communiteq/discourse-private-replies/tree/master/config/locales so I am not sure what you have done or what you are trying to accomplish.

3 Likes

I’ve done this exact thing (added client.de.yml and server.de.yml for the German language) and nothing changed.

  • Probably, I found the mistake. I missed the language code in the file. I’ll check it later.
2 Likes

Can you please make a PR once you’ve got things working? That would be much appreciated!

1 Like

Everything is working, it was my mistake. I will add all languages to your fork when I finish it.

2 Likes

Hi! I got errors in /sidekiq from your plugin. Can you please check your installation? Do you have such errors?

Wrapped I18n::InvalidLocaleData: can not load translations from /var/www/discourse/plugins/discourse-private-replies/config/locales/server.ar.yml: #
<Psych::SyntaxError: (/var/www/discourse/plugins/discourse-private-replies/config/locales/server.ar.yml): did not find expected key while parsing a block mapping at line 3 column 5>

There is an extra " that should be removed.

private_replies_enabled: "قم بتمكين المكون الإضافي "الردود الخاصة."
2 Likes

Thank you for reporting this! I’ve pushed a fix.

3 Likes

Hey,
It won’t install from the admin interface. Is it hooks only?

The error is:

about.json does not exist. Are you sure this is a Discourse plugin?
1 Like

I am not familiar with that error message. It is not part of the Discourse source code. Are you sure this is the exact message?

Plugins are not installed from the admin interface either.
Please refer to Install Plugins in Discourse.

1 Like

@RGJ
My company, Haddee, is eager to develop some new features for the plugin.
I was wondering if you could put a license on it just to make contribution easier and smoother

Thanks :slight_smile:

4 Likes

Right, it worked installing from the hooks system indeed.
I guess it can’t be installed from the admin like themes and extensions as it has server features and that’s why it’s called a plug-in (so many specific terms and various ways to extend or customize Discourse that we can easily get lost as a dev)

This one seems clean and small enough to be easy to customize.

Thanks for the replies :wink:

2 Likes

I always forget that, sorry. I’ve put the MIT license on it.

Looking forward to the new features!

3 Likes

Do you think you could add a category setting to force this to be enabled on all posts in a category?

Edit: After using this, I’m thinking I’d want all replied to be hidden, including from staff and the OP. Do you think that this is something that could be added? I’m using this in conjunction with the Wizards plugin to make an application forum - I’m wanting the application itself to be visible for transparency but responses to it should be confidential.

1 Like

I’m accepting pull requests, or I can add extra functionality as a paid project.

I am not sure if I understand you correctly.
If no one can see the posts from staff or the OP, why would they bother posting?

2 Likes

I was thinking of using it to report bugs or exploits. Thinking about it more I might be able to just make replies moderated. I appreciate your time and thank you for replying and great work on the plug-in! :slight_smile:

3 Likes