Plugin request: Relay a post to see the post content
-
This is an interesting plugin idea which I've seen before on other software.
NodeBB/src/topics/create.js at master 路 NodeBB/NodeBB
Node.js based forum software built for the modern web - NodeBB/src/topics/create.js at master 路 NodeBB/NodeBB
GitHub (github.com)
On this hook you want to save into database list of users who have replied.
Likely this hook: https://github.com/NodeBB/NodeBB/blob/master/src/posts.js#L99
If user has not replied to this post (also check if this is the first post in the topic) then replace content with "Please reply to this post to view content"
Something like that. I spent all of 30 seconds thinking of this maybe it's not 100% right, but good luck and hope this helps
-
@psychobunny said:
If user has not replied to this post (also check if this is the first post in the topic) then replace content with "Please reply to this post to view content"
Thanks @psychobunny I will try
-
Oh, actually, I made this sort of plugin as part of a "support forum" plugin.
Only OP and administrators can see the topic. It may help guide you towards what you want to do:
GitHub - julianlam/nodebb-plugin-support-forum: Turns a single category into a "Support Forum", topic creators can only see their own topics
Turns a single category into a "Support Forum", topic creators can only see their own topics - julianlam/nodebb-plugin-support-forum
GitHub (github.com)
-
I finished part of this plugin and need help for :
- after replying the topic, I have to refresh the web page to see content, any hook can automatically refresh whole page and how to refresh?
- Need a "reply to see" selector to set the topic with this feature , is it possible to put this selector in " Discard and submit" button group? or somewhere?
-
Sounds like you're 80% there. I would release now and make a post for your plugin on our community. If you're lucky usually people who need the same thing will help out open source ftw
-
Also, #2, see my plugin https://github.com/psychobunny/nodebb-plugin-question-and-answer