I loved this extension, thank you so much!
My money is being counted, but not being properly displayed on my profile!

    2 months later

    Hi @Antoine

    Would it be possible to include permissions to define which tags are going to distribute money? For example, one permission for posts published in X tags or all, and another for new discussions.

    Edit: I'm also thinking that it would be great if there was a way to exclude a group of users who get money to prevent Staff from being the best users or with the most coins. I have noticed when installing the ranking extension, it can be demotivating for users to see the moderators above and decrease their chances if there are prizes for the top 3.

    Thank you.

      Hello jslirola ,

      The ability to choose only some tags that will give you money is something I thought about, it's on my TODO list but I can't give you a date when I will add it.

      For an option to exclude staffs from receiving money, I don't plan to add it. However that's an option that could be added to the Ranking extension so you can ask for this in the Ranking extension's discussion!

        Antoine For an option to exclude staffs from receiving money, I don't plan to add it. However that's an option that could be added to the Ranking extension so you can ask for this in the Ranking extension's discussion!

        Yeah, maybe the fof/gamification code could be reused somehow, from the dashboard, the "Ignored Users" section works just like that.

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