Author Topic: Give certain amount of money to usergroups  (Read 3971 times)

Offline Existenz

Give certain amount of money to usergroups
« on: September 17, 2006, 12:10:40 am »
I have different user groups, and I would like to know how I can pay everyone in the usergroup in question a certain amount of credits. Is that possible? if it is not, can you implement it?

Offline Daniel15

Re: Give certain amount of money to usergroups
« Reply #1 on: September 17, 2006, 10:03:12 am »
Well, it's not possible at the moment, but may be in the future.

Offline Existenz

Re: Give certain amount of money to usergroups
« Reply #2 on: September 19, 2006, 03:05:33 am »
Thanks a lot! That would be really appreciated. I am dying without that feature. I am even willing to pay if you could implement it a little faster. in the next release, perhaps. How much would I have to pay?

Offline Daniel15

Re: Give certain amount of money to usergroups
« Reply #3 on: September 19, 2006, 04:44:24 pm »
Quote
I am dying without that feature
Well, you could do it like this for the moment:
First, find the ID number of the usergroup. To do this, log in to your SMF admin panel, and click on the 'Edit Membergroups' link. Then, next to the group in question, click the 'Modify' link. The URL in your browser's address bar will look like:
http: //www.daniel15.com/forum/index.php?action=membergroups;sa=edit;id=1
The last bit is the membergroup ID (in this case, 1. The 'Administrators' group is #1). Once you find that, you can run a SQL query in phpMyAdmin that will add the money. Something like:
Code: [Select]
UPDATE smf_members SET money = money + 100 WHERE ID_GROUP = 1This SQL query will give 100 credits to all members in group 1. Just edit it to suit your needs.

Hope this helps you :)

Quote
How much would I have to pay?
Well, if you ever want to donate anything, there's a PayPal 'Make a Donation' button on http://www.dansoftaustralia.net/ . Note that you don't have to pay me anything, it's only if you'd like to :)
« Last Edit: September 19, 2006, 04:46:06 pm by daniel15 »

Offline Existenz

Re: Give certain amount of money to usergroups
« Reply #4 on: September 20, 2006, 01:32:33 am »
Must 'money' be replaced with the name of your currency?

Just asking, before I try it.

Thanks a lot for your help, though.

Offline TechnoDragon

Re: Give certain amount of money to usergroups
« Reply #5 on: September 20, 2006, 02:07:43 pm »
Must 'money' be replaced with the name of your currency?

Just asking, before I try it.

Thanks a lot for your help, though.

No, generally that is the default field name in the database for the currency...unless you changed it somehow during install.  The name of your currency does not change it in the database
Don't tell me to get into shape...I have a shape...It is round!


Offline Daniel15

Re: Give certain amount of money to usergroups
« Reply #6 on: September 22, 2006, 01:55:46 pm »
Quote
Must 'money' be replaced with the name of your currency?

Just asking, before I try it.
No, you don't need to change it. The money value is known as 'money' in the database (and internally), whether you change the name from 'credits', or not ;)

By the way, I'm working on a similar feature for the next release of SMFShop. I'll upload the latest testing version later, so you can try it out :)
« Last Edit: September 22, 2006, 01:57:53 pm by daniel15 »

Offline Existenz

Re: Give certain amount of money to usergroups
« Reply #7 on: October 03, 2006, 03:56:07 am »
Thank heavens you are! That is what i call implementing frequently asked features. Not like those SMF people. I am sorry, but they put off adding a feature for years, if they ever add it. Nothing against them. i am sure they do a lot already, but they need to listen to their users a bit more.

Offline Daniel15

Re: Give certain amount of money to usergroups
« Reply #8 on: October 06, 2006, 06:39:33 pm »
Quote
Not like those SMF people. I am sorry, but they put off adding a feature for years, if they ever add it
The developers focus mainly on fixing bugs... It's usually up to the MOD programmers to implement new features ;)
Anyways, this feature is in the testing version at the moment. Download the latest ShopAdmin.php, ShopAdmin.template.php and Shop.english.php files from http://server.daniel15.com/cgi-bin/viewvc.cgi/smfshop/trunk/. Then, follow the instructions at http://server.daniel15.com/cgi-bin/viewvc.cgi/smfshop/trunk/svn_changelog.txt (under '22nd September 2006', the 'SMF Files edited' section).