MyBB-Plugins Forums

Full Version: New MyPlaza Module: Board Donations! ( =not donate module )
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Well.. I don't want to bother explaining, it's pretty difficult to explain.
There's a demo of it at: http://www.talkforstuff.com
WARNING: The demo is my LIVE site so don't mess it up please!
if you want to test you'll just have to register, it's that easy >.> it also took me time to make it so, i don't see why that should be a problem. ( item is in category: Special Items )
I'll explain it simply: it adds an item that "donates" and you can donate to the board, literally the money will just vanish and you'll see a counter of total donations, of course those donations are MyPlaza money.
If you want a cool module just download it and try it, it's easy to deactivate Wink.

Read the readme!!
Thank you,
- Shadows.

Download:
[attachment=72]
Where is the demo, can't see it... -.-
this module is cool Big Grin I tried it Tongue
@CO_ol: it's on the board's myplaza, under Special Items category
Thanks Combus.
CO_ol hope you found it Wink.
- Shadows.
Nice module. but insead of having the money just because of...nothing, you could make something like devide the money by everybody once it reaches a limit?
that's what i wanted to do but i was thinking of a way to do it xP
would it work if you do user_change_money($users, $divided) and that $users = "shadows, pirata nervo, CO_ol, combus";
with commas will it understand that?
Thanks..
- Shadows.
no, user_change_money does not split into tokents the string $users.
This is how I would do it:
Get all uid's from users table and save them into an array.

Devide money by all uids:
$money = $money/$total_uids;

Then use foreach(blablalba) and inside the { } update the money column of each uid by adding $money to their current money
i see, and how would you save it in the DB?
or you could add a row in the user table and add amount of donations ... ?
or like give them back 1.5 times what they just had? and that the admin pushes a button and puts 1.5 it pays down 1.5 times what they paid?
and sometimes it's lower, 0.7... and sometimes huge, 10 lol xD ^^.
A bit like commerce isn't it? i mean like yea.. "aandelen" emm.. stocks, that's it =D.
What do you think of that? No limit, just a button an admin pushes in the ACP when he wants to? =).
- Shadows.
I didn't understand anything lol.
You just need to calculate how much money a user will get by deviding the total donations amount by the total uid's and then just update the money of each user
well how would i stock this in the DB?
==>@you didn't understand? My idea were stocks.
You have an option in admin panel you enter a number and users get number * donation.
So once you put 0.7 they lose & etc..
But i think your idea is good too..
how would i be able to count the number of UID's? i could add a row to the users table that is yes/no and then count the ones that are yes?
Pages: 1 2