Closed ivan006 closed 1 year ago
yes but i want to debit users for asking question but not allow them to exceed the balance (go below 0)
I could add an option to prevent the balance from going below 0 but the money is given / withdrawn after a post has been published, so in your use-case, your users would still be able to post and it just wouldn't affect their money.
Well cant you block questions if they are in debt may i ask?
I try to keep this extension simple, and your use case is very specific. You could write an extension that blocks new posts if the money is <= 0, but it would have to be checked before the post is saved. My extension works after the post is saved so it's too late, the post is already here.
Ok well then maybe in that case u can just disable their account if they are overdrawn which u can do before OR after a post is made.
It's a very specific feature and I don't think everyone wants the same thing as you when someone has a negative balance.
I am currently working on an integration with another extension, AutoModerator (https://discuss.flarum.org/d/27306-flarum-automoderator) which can add a lot of flexibility to this extension and where you could do something like what you want.
cool will this release do what i want? https://github.com/askvortsov1/flarum-auto-moderator ?
bump
I have to add some code to my extension to make it work with flarum-auto-moderator and I don't have any ETA for now. The code is almost ready, I have to test it to make sure it works correctly.
Hello @ivan006 , I just tagged a new release which adds the integration with flarum-auto-moderator : https://discuss.flarum.org/d/4699-money-extension/217
This should resolve your issue !
Hello @ivan006 , if you set the different "Money given" settings to positive numbers, the money won't go to negative in normal circumstances. Only an admin can manually edit the money and set it to a negative number. Do you see a particular use case for your request?