a month later

v1.3.0

Add settings to choose when money is removed.
Settings page

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
    11 days later

    Antoine Good extension, I want to calculate the data before installing the extension. Is there any way?

      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

        Antoine thanks, how can I use this formula? where can I run this formula? 😂

        report a bug:

        1. change the tag for one discussion
        2. delete the record
        3. 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?

            Antoine yes, there is an extension named "Moderator Warnings". I have tested, when I disabled Moderator Warnings, Flarum still report this error.

            how can I give you the error log? where can I find it?

              Antoine
              [2023-04-19 09:16:25] flarum.ERROR: TypeError: strlen(): Argument #1 ($string) must be of type string, array given in vendor/antoinefr/flarum-ext-money/src/Listeners/GiveMoney.php:97

                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
                3 months later

                @Antoine if you're available, I would like to sponsor a feature for this extension. You can contact me on Discord (Fenix_FFA.hr#9286)

                  4 days later

                  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.

                  4 months later

                  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.

                    feyv I imagine you will need to give us more context to help you. For example, a screenshot and your php flarum info output would be beneficial.

                    3 months later

                    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?