Trading buttons: Buy, Sell, Exchange

the buttons are visible for topic author when he/she opens the topic… not in the topic list. Or what listing are you talikng about?

Never mind! After I unmuted the Category, the buttons are now showing. Or maybe it was the restart that cleared it. Either way, things are working again now. Sorry to have bothered you with this, thanks for your help!


1 Like

I’m going to give that a try as soon as I get a chance. Thanks!

It’s @simon you should thank. He did the heavy lifting :wink:

1 Like


=> 43653

Oops. :wink:

I have to admit, that .destroy_all part of the above command looks scary. What does it do, just remove the mute flag?

Thanks again!

Any destructive actions run on the console are a little scary. Make sure you take a backup before running them.

A CategoryUser record describes a user’s notification level for a category. A notification_level of 0 means that the category is muted for the user. You can find more information here: How do I set category tracking level defaults historically.

Deleting all CategoryUser records for a given category_id with a notification_level of 0, will remove that category from the muted list for all users on your site.

When I run a command like this, I usually add an extra step that I didn’t post above. Instead of running

CategoryUser.where(category_id:, notification_level: 0).destroy_all

in a single step, I’ll assign the records to a variable so that I can double check that I’m dealing with the correct data. Something like this:

# Get the category and assign it to a variable
c = Category.find_by(name: "<your category name>")

# Assign the category_users to a variable and examine the data. Make sure the records have the
# correct category_id etc.
muted_category_users = CategoryUser.where(category_id:, notification_level: 0)

# When you are certain that the data is correct run

Hi @Janno_Liivak , thank you so much for plugin!

Please add Russain translation. I put in plain text below.

    topic_trade_buttons_enabled: "Включить кнопки управления продажей?"
    sold: Продано
    purchased: Куплено
    exchanged: Обменено
    cancelled: Снято с продажи

      enable_sold_button: Включить кнопку 'Продано' 
      enable_purchased_button: Включить кнопку 'Куплено'
      enable_exchanged_button: Включить кнопку 'Обменено'
      enable_cancelled_button: Включить кнопку 'Снято с продажи'
      sold: Продано
      purchased: Куплено
      exchanged: Обменено
      cancelled: Снято с продажи
      error_while_marked_as_sold: Возникла ошибка при пометке 'Продано'
      error_while_marked_as_purchased: Возникла ошибка при пометке  'Куплено'
      error_while_marked_as_exchanged: Возникла ошибка при пометке  'Обменено'
      error_while_marked_as_cancelled: Возникла ошибка при пометке  'Снято с продажи'
      mark_as_sold_confirm: Вы хотите пометить  объявление как 'Продано'?
      mark_as_purchased_confirm: Вы хотите пометить объявление как 'Куплено'?
      mark_as_exchanged_confirm: Вы хотите пометить объявление как  'Обменено'?
      mark_as_cancelled_confirm: Вы хотите пометить объявление как 'Снято с продажи'?

Hi, and thank you @Dmitry_Krasnoperov ! I added the Russian translation.

For other plugin users… no need to update plugin if you don’t have Russian as a part of your allowed languages… as nothin’ else changed.


THAT WAS SUPERFAST!!! Put in production now.


Hi Janno

I’ve made a German Translation for your Plugin. Would it be possible for you to add them to your Plugin?

You just need to rename it to .yml, because Discourse doesn’t allow to upload it. (1.1 KB) (218 Bytes)


Hello, @Lagger_Gandalf! Thank you very much. I added German translations you provided :slight_smile:


Not working on my forum ( sad

Try restarting Discourse after enabling the plugin. If it still doesn’t work try to provide more information about your problem. You can write me a message in Russian …I understand it more or less :slight_smile:

1 Like

Greetings )) I enable all) and restarting discourse =/ nothing change!

1 Like

Did you test your plugin in 2.5 beta? Thanks

Hi! Unfortunately no.

Hi Dmitry,

I’m using it on v2.5.0.beta2, no troubles so far, working as expected.



How do I restart Discourse? Is it a command that I put in my PuTTy command window? What is the command?

Trying to get this plugin working and I cant see the buttons after installing and setting it up in plugin settings and category settings.

Does this help? (look at laucher commands)

1 Like

Thanks! I figured it out after a little more research. Posting it here to help others. If you used the DigitalOcean Discourse One Click Installer, follow these steps:

Open putty cmd window and type these commands in this order:

cd /var/discourse
./launcher stop app
./launcher start app

1 Like