Something went wrong while trying to load the full version of this site. Try hard-refreshing this page to fix the error.

Money extension

Luongmyno

Antoine So, Can Administrator see user who have top money, like a rank of member?

Antoine

Luongmyno For now, the extension only gives money when the user posts a message and shows the current amount of money in it's profile.
In the future, I'll add an option for admins to give or remove money for an user, and why not adding a page which shows a leaderboard for money 🙂
I need to find which components I should use to display such a list, that's my principal problem 😃

Demon

luceos

Antoine I need to find which components I should use to display such a list, that's my principal problem

You'll have to start with a page. Much like the tags extension creates. Within that page you will need to generate an ItemList(.js) based on the results of an api call. I'm working on a PM extension and will have to implement both as well. Feel free to ask questions on Gitter/chat or under the dev tag if you need more assistance.

Demon

duman

Antoine I have an idea. Back in the day there was an extension for vBulletin called as "market". Combined with money extension. Market had items such as "create your own tag", "kick a moderator", "ban a user", "colored username", "username change right" etc. wouldn't it be cool if users could spend their money? 🙂

Edit: Just realised many other people suggested it. wow haha.

Antoine

v0.2.0

You can now give money to your users in their profile page.
You can customize permissions for this feature.

Updating

composer update antoinefr/flarum-ext-money

Screenshots

Controls in profile

Modal to edit money

Permissions

Veriael

jordanjay29

Veriael Always be sure to disable and enable the extensions after upgrading. You can also run php flarum cache:clear after your composer command, and hard refresh your browser. Also, if you're using Cloudflare or another external caching, make sure you refresh its cache.

ssBird786

Antoine

ssBird786
N°1 : This dropdown is related to a post, not to an user, so I think it may be strange to put it here.
N°2 : What would these buttons do ? You can edit the money by changing the field just above the ones you added.
N°3 : It is a good idea, but I will focus on Leaderboards before

0E800

Antoine
Any chance future releases can include option to give money based on 'Best Answer' selection?
Example:
.20 {money} for each Reply
.50 {money} for each New Post
1 {money} for each 'Best Answer' selected.

Granted I guess it somehow has to tie in with the Best Answer extension. Not sure how it would subtract money whenever another best answer has been selected.

This was just one of those late night drinking ideas.

Also, is there anyway to use decimals for money but only show whole numbers in profile?
IE: User has 2.5 {money} but profile shows only 2, until the user makes it to 3.

Thanks again for your excellent extension.

ssBird786

Antoine Thank you for answering. My English is poor, so I can't explain detailedly 🙁
However, I could give some examples to show the reason.

e.g. for NO.1:
Administrators or other user with permission can give money to the poster when his reply or discussion is good enough.

So this button in dropdown will be more convenient to operate.

e.g. for NO.2:
Let’s suppose here is a user named David, he had 38 Money already.

Now I want give he 235 Money more, I just input 235 in the Text Field which marked + , then click the Save Changes Button, David gets 273 Money.

For another, I want cut he 12 Money down, I just input 12 in the Text Field which marked - , then click the Save Changes Button, David’s Money changes to 26.

That’s more easier to change user’s Money.

NO.3:
It is also make the base for Money Store (User can use Money to exchange for some gifts).

I will make the language file of Simplified Chinese later, and upload here🙂

And Thanks again.

ssBird786

Antoine

0E800
For the "Best answer", I think I could use the existing extension, but it needs to send an event which I can listen to.
I have also planned to add support for the Likes extension to give money when your post is liked.

For the whole number, it is possible but I won't implement this, because it enters in conflict with the way people can use the extension (some people would like to have decimal values shown, other would like to have it rounded).
You can edit the extension if you really need it ; the code is on this line https://github.com/AntoineFr/flarum-ext-money/blob/v0.3.0/js/forum/src/main.js#L14
You should add a Math.floor() around the money amount.

ssBird786
N°1 : When you hover the user on the left of the post, it shown a summary card about the user. I think I can add the button to open the modal into this card, for example next to the money amount ? Like this it would be easy to add money to an user within a post.
N°2 : I could change the text field, with a label like "Money to give" and users with rights can enter the amount they want to add (like +4, 4) or remove (like -2).

Thanks for the Simplified Chinese locale. But in order to add it, I need to know if the correct language code used by the main language extension is zh-rCN like your file name or if it's another one.

PS : I also started the ranking page 😃

ssBird786

Antoine That's so fantastic! I'll just wait for your next version. Thanks.