AntoineFr / flarum-ext-money

Give money to your users for different actions.
MIT License
22 stars 11 forks source link

Private discussions and Private tags grant money #32

Open katosdev opened 1 year ago

katosdev commented 1 year ago

There should be a tag picker to allow administrators to select which tags count towards money earned for discussions. Private discussions also shouldn't count towards earned money.

katosdev commented 1 year ago

Proposed solution

  1. In https://github.com/AntoineFr/flarum-ext-money/blob/master/src/Listeners/GiveMoney.php add a -$money for if a discussion is marked as private.
  2. In https://github.com/AntoineFr/flarum-ext-money/blob/master/src/Listeners/GiveMoney.php add a check for if is_private = 1 then don't grant money on a new discussion / post.

Further, in the admin settings there should be a tag picker to allow an admin to select which tags count towards gained money. In https://github.com/AntoineFr/flarum-ext-money/blob/master/js/src/admin/index.js

You could theoretically add a setting to https://github.com/AntoineFr/flarum-ext-money/blob/master/js/src/admin/index.js to allow an admin to choose whether private discussions should count towards the gained money.

AntoineFr commented 1 year ago

Hello @katosdev , thank you for your suggestions!

I will look at the the private discussion setting in the next weeks as it looks quite simple. For the tag picker I'll add that to my todo list but I can't promise I will add it soon.

AntoineFr commented 1 month ago

Hello, I started a Pull request to add an option to disable giving money if a discussion or a post is private: https://github.com/AntoineFr/flarum-ext-money/pull/44 🚀