I have created a simple plugin that allows the category to show trading buttons above the topic title. It still needs unit tests, but it’s usable as a simple solution for sell/purchase/exchange type categories.
You enable the plugin. Allow appropriate buttons in category settings:
And every topic gets those buttons above the title (of course, you have to be the owner of a topic):
After you press the button, you get confirmation whether you would like to continue, and if you do continue, the topic will be archived, and it will get a prefix according to the button you pressed:
Feel free to use it or fork it. Or if you are a dev and see something that’s not entirely correct, I’m all ears.
Supported languages now include:
Danish
German
English
Spanish
Finnish
French
Italian
Polish
Russian
If you would like to add translations, please create a pull request or contact me directly if you want to provide translations but don’t know how to code.
Right now it’s only archiving topics. Why would you need closing instead of archiving? Archiving freezes a topic and topic is removed from top lists and digest emails etc. but closing doesn’t.
In our community, closing instead of archiving makes sense:
People see how active the category is and how much sales are going on. This encourages people to us our market rather than / in addition to other markets.
People see examples of what was sold quickly and what was not.
People can quickly skim topics and find examples of how other people describe their animals (in our case it’s a goat market, so there is only one kind of things people are selling in ot, and examples are a good thing in this case).
But how do you keep the trading category current when you have closed and active topics mixed? Why do you think people coming to your site will want to look at the closed topics and not what are current offers/requests? In my case moderators bulk-move sold/purchased topics under the archive category so that items will not show up for non-moderators but topics will be available unaltered for future reference (in case somebody does something illegal).
Anyway… if there are enough people with need for closing instead of archiving, I will add this feature.
Well, we don’t need this feature, but thanks for proposing. What we do is we set topic timers automatically for all ads in the category, so that they auto-close 1 month after the last reply. We also encourage people to write in their topics piblicly when an item gets sold, or they decide not to sell it anymore. This way buyers can comment before a topic gets closed, which is also good for content, and for other potential advertisers to watch the dynamics of the market.
Why I was asking is I wanted to find out whether there are any other features than that.
Many thanks for giving us the opportunity to use this plugin, for us it’s really useful. Just let me ask you out of curiosity, I don’t understand why restart the application is needed, that’s because of the loading of some components after enabling it?
By the way, not sure if it’s me, but the Cancelled button does not disappear when unchecking from Category settings, it is supposed to be always there? I think this is related to, once you enable a button, if then is disabled, the button still appears, there is no way to remove it, doesn’t it?
I guess that it’s how Discourse plugins are “plugged” into the standard functionality. Also there may be that some category stuff get’s cached etc … so I would suggest restarting the app after making changes to category settings also … it may also wery well be that plugged functionality doesn’t get applied the same way as default functionality does.
It may also be that I just don’t know how to do it any differently I haven’t dug deeper than I had to… didn’t have time.
Right now I have no further plans for this plugin. For anything more (regarding trading functionality) I would consider implementing some sort of interface with existing online trading environment (or ERP) but as I don’t need anything more it’s going to be “as is” for Trading Buttons plugin.
After some investigation, I think I solved the issue about buttons that still appear even after unchecking from category settings. I’ve opened a PR on your project.
Yes, totally agree, I did not try it out from a clean environment, so maybe that affected the value of some variables after trying and error. I will try it again then.