I wanted to introduce you to my very first and humble extension: Achievements
This extension adds rewards in the form of achievements when users perform certain actions. Give them points and a little badge every time the reach certain amount of posts, likes or when they use a secret word a specific number of times.
These are the current categories for the different rewards:
Achievements will be calculated when user performs those actions: liking, posting, starting a new discussion, changing the avatar... And they will popup in a modal so it is flashy!
They can also be rewarded manually or if you want to do more complicated things you can try to add the achievements to the database directly.
Achievements should have an image and a number of points, although it will work without them. Since achievements will have a lot of images, it is possible to use one big image as a "grid" (like this) with several images inside and use the row and column of each achievement. This reduces the load of each webpage. You can always use one different image per achievement if you want to.
Install manually with composer:
composer require malago/flarum-achievements
composer update malago/flarum-achievements
php flarum cache:clear
Since this is my first extension, it is very possible that there are some bugs I did not catch and many ways to optimize it. I want to thank @askvortsov for his help and the people on the Discord channel.
I hope you like it!