Antoine Ahh, it's ok now, thank you very munch ?
Money extension
- Edited
Hello, for the first activation, can you automatically update money line for all user ?
Example for id "1" :
select count() FROM posts WHERE user_id = 1 AND type='comment';
select count() FROM discussions WHERE start_user_id = 1;
( ( $result_posts - $result_discussions ) * 5 ) + ( $result_discussions * 10 ) = money
I started the layout of the Ranking page, I have to make the api endpoints to get the user list now !
LuffyyffuL It is a good idea, I can also add a button to synchronize the money with the posts count because not every forum owner wants to have 5 money for a post and 10 for a discussion when they enable this extension.
If you need it right now, you can update the column money in the users table with your queries.
Antoine Do you also plan to include a season thing too?
So, I'd love to have a season leaderboard too. Say last 30 days who is topping the charts and that can be used to award those new members for their wonderful contribution. So we'll have both charts - Top earners (all time) and Top earners (this season). Season can be of n number of days/weeks as decided by the admin.
Otherwise, usually the top money earners will always stay at the top because they started off first.
singhnsk With the current code it will be difficult to have both rankings because for now there's no history of earned points, so you can't know when the user got the points. But if I add an history, I'll be able to propose such rankings.
I am currently integrating the "Likes" extension to give money when a post is liked.
I will also add some code to remove points if a post/topic/like is deleted.
[deleted]
- Edited
Love this!
But doesn't it encourage spam by having it give money for every single discussion or post someone posts? ?
@Antoine Hi bud,
While testing the plugin, I had an issue with Akismet key, so every submitted post got an error and it was not accepted. However the plugin still gave money to this user for the 13 posts he actually wasn't able to post. He just kept pressing the 'Post' button again and again.
It seems that the plugin is recording the money for the post even before the post is actually accepted into the forum. It's okay for now, but someday, somebody will input a spam comment into the form and keep pressing the submit button. Akismet will continue to stop it, but the user will earn his money ?
- Edited
[deleted] doesn't it encourage spam
Probably not for small forums where you want to encourage engagement by offering some rewards. Larger communities might not need it, but it can be useful to create leaderboards. Some members do seek recognition and this can be a good way to encourage their contribution ?
Spam can be controlled by mods. @Antoine I hope the plugin does revoke points for the posts which are deleted or something...
- Edited
singhnsk The problem is if the admin doesn't have the Approval extension, it will never give money to users if I use the events related to this extension.
singhnsk For now, it doesn't remove the points if the post/discussion is deleted but I will fix it today.
Edit : I pushed some modifications to GitHub
Antoine you can check if an extension is enabled by loading ExtensionManager in your code via IoC, an example of such an implementation:
https://github.com/flagrow/byobu/blob/7c2677b158d58bab75bacbb1b37cfb4f02b8deee/src/Traits/ProvidesAccess.php#L39
https://github.com/flagrow/byobu/blob/7c2677b158d58bab75bacbb1b37cfb4f02b8deee/src/Access/DiscussionPolicy.php#L27
Or you can ioc bind the Flarum Settings Repository and read the right field related to the extensions installed.
v0.4.0
When a discussion or a post is deleted, it removes the points to the user.
Now it removes the points to the right user ?
Updating
composer update antoinefr/flarum-ext-money
php flarum cache:clear
If it doesn't work, try to disable and enable the extension.
Hello, I have a question, or maybe a suggestion?
I installed the money extension on my forum and I also plan having members open their own "custom graphics/themes" shop and use the in-forum currency for it. The only way I could think of to withdraw money from users is to create a separate group for the shop owners and they take the amount of money from the customer member's profile.
Would there be a way that members themselves can transfer money to another user? Maybe something like this?
hello,
is there anyway to reset money extention plugin..
I need Start competition .... Daily basis winner
so i need reset it daily ?
can i do it ? so how to reset money data ?
Thnk you
I have a idea for your extension. You can add a Button with text like "Rate" and can add money (1,5,10,15) to specific post
I would like to collaborate with an idea for the extension.
It would be nice to see a "Tip Post" button next to the "Like" button of each forum member post, and if the information or content of your thread or post is of quality, then those members who find it useful, Important, or the like. They will give you "Tip Post". Tip posts should be specific amounts determined by the community administrator from the admin panel. It may be that in a community giving a "Tip Post" is worth 200 coins, in other communities is 10,000 coins, it is a matter of community.
One question: How many different currencies can your extension hold? I consider that they should put the capacity to support 3 different currencies at the same time, that is to say, if I have its extension installed and in my community there are 3 different currencies:
Copper: Ordinary currency
Silver: Ordinary currency of higher level (1 silver = 10,000 copper)
Gold: Special currency (1 gold = 10,000 silver)
In my case I would do it in my community, but there must be the tools and options for everyone to configure their community as they want, be it 3 different currencies, 2 different currencies or just one. In my case, in my community I would put this configuration:
Open Thread: 100 Copper - 3 Silver
Post a message: 75 coppers - 1 silver
Its thread became popular (+30 messages): 250 copper - 5 silver
Complete your profile (all information required): 1000 Copper - 25 Silver - 5 Gold
etc...
But in my community gold would be a special currency, there would be very few ways to get gold like events, missions, special tasks, or buy gold packages with real money (dollars, euro, pounds) etc ...
But I think the point is understood, the idea is that its extension can support at most 3 different currencies. And that the configurations and options necessary for the customization of the community exist to the taste of the administrator. There will be communities with only one coin, others with 2 different currencies and others with 3 different currencies.
My english is bad, i use a translator. I'm sorry