Money extension
v1.3.0
Add settings to choose when money is removed.
Administrators can now choose 3 settings to decide when money should be automatically removed:
- Never
- When a post is hidden
- When a post is deleted
This fixes a potential way to generate a lot of money (reported by @clarkwinkelmann) when the following settings were activated : post minimum length, users are able to edit and hide their posts.
If you are a forum administrator in this case, you should select the option "Automatically update money When a discussion/post is deleted" instead of the default option "When a discussion/post is hidden or restored"
Feel free to report any bug you find with this new release in this thread or open a GitHub issue !
Updating
composer update antoinefr/flarum-ext-money
php flarum cache:clear
meihuak Hello, if you want to calculate the money before installing the extension, you can use mathematics for it, but it may not be accurate if you plan to enable some special settings in the extension (for example a post minimum length).
Else you can simply use a formula like this one for each user :
Number of discussions * Money given for a new discussion
+ (Number of posts - Number of discussions) * Money given for a new post
- Edited
report a bug:
- change the tag for one discussion
- delete the record
- Flarum report an error, but the record was deleted. just refresh the browser.
after I disable money extension, it disappeared
meihuak Hello, thank you for your bug report. I tried to reproduce it on my local forum but I couldn't.
I also see another button in your screenshot that I don't have on mine (with an exclamation mark in a circle), it may be related to your bug and involving another extension.
Can you provide me error logs to help understand this error please?
meihuak You can follow these steps from the Flarum documentation: https://docs.flarum.org/troubleshoot/#step-3-collect-information
I think your error log will be in the folder storage/logs
in Flarum's root directory.
meihuak Hi, I just tagged a new release 1.3.1 to fix the issue you reported. Thank you!
v1.3.1
Fix error when the tags changed message is deleted.
When you change the tags in a discussion, a new post is published.
If you try to delete it and you chose to remove money when a post is deleted, an error occurred.
It is now fixed.
Feel free to report any bug you find with this new release in this thread or open a GitHub issue !
Updating
composer update antoinefr/flarum-ext-money
php flarum cache:clear
How do I move it before other extension ?
hrvoje_hr Hello, I'm currently not available for a sponsorship. However I have already seen some companion extensions created by @clarkwinkelmann with a sponsorship so he may be interested (sorry for the ping if not) !
OfficialAudite Can you please tell me what is the other extension so I can try to reproduce the issue ?
I don't set any priority in my extension so it may be ordered by the order you enabled the extensions. You can try to disable both extensions, then the money extension to display it first, and then re-enable the other extension.
Great extension!! Love it so much. It works pretty perfect without the extension 'font awesome 6', i was trying to use 'Font Awesome 6', I find the icon (added by '::before') turn into a square, other icons are good, only the one for 'money' extension, what may be the issue? And how to git it fixed? Thank you so much.
Mikenthuzi Hello, based on your message in another topic (https://discuss.flarum.org/d/31219-blomstra-font-awesome-6/42) I guess you fixed your problem ! Sorry for the delay in answering here
Antoine No worries, I should've updated it here, too.
- Edited
I found one problem.
A user publish a discussion, B send a post in it. Both A and B get 1 point (money).
when admin delete A's discussion, B still have 1 point. I think the extension should delete 1 point form A and B.
Another advice:
can you set permission which tag can get money in the future?