I've made a mod! it's a mod that allows your users to get paid weekly and when they collect their money it gets deposited into their bank account. This is an extension of the bank mod made by Dinocanid HERE
So first step would be to install the Bank Mod.
_____
There are a few ways you could do this, you could have all the code be on the bank page, but I went about it a different way. Let me explain in depth so people can understand how I have my system setup.
When members go to my Bank page, there is a If/Else statement that looks to see if the member has collected their pay yet or not, if they haven't, a green link pops up stating: "You have a paycheck available!" so then the user can go to that link that links them to the payment collecting page. After they hit the Cash Check button, it deposits the set amount of money into their bank account. This paycheck becomes available every week using Cron jobs.
_________
Okay, so, to go ahead and get started let's make the files we need. I'll just do a step-by-step tutorial on my exact setup. I made a pay.php file in the root folder, and a payview.php file in the view folder within the root.
Inside the pay.php is this:
pay.php
Then this is inside of the payview.php:
payview.php
Next you need to make(if you don't already have it) a cron.php file in your root folder. You want to add this to it:
cron.php
I have also added in there what my Cron file looks like.
That finishes the files. Next you need the database, so go to PHPMyAdmin and go to your users table and add 2 columns. Set it up like this:
pay | varchar | 3 | Default: None | No NULL
(just hit enter and it'll auto fill the rest)
you also want to add level_pay, set up like so:
level_pay | varchar | 11 | Default: None | No NULL
and hit enter.
Remember you'll need to manually go into a user's database and change their level_pay to something like Entry or Experienced.
Database is now done. Now you need to add the Cron job to allow that paycheck link to pop up every week. Go to your Cron jobs.
Click the drop-down box that says "Common Settings" and click the Once Per Week option, then in the Command box at the bottom paste this:
curl http://dinotracks.mysidiahost.com/cron/pay
except, change the dinotracks to your web address.
That should be it! I don't think I forgot anything. Besides to mention, the level_pay database is what I was using to check and see what the member's experience level was. It checks their level of pay they should get and gives them the correct amount of money. For example, if I have the user as an entry level worker, they get X amount, verses the experienced user getting Y amount, etc.
Let me know if y'all have any questions!
So first step would be to install the Bank Mod.
_____
There are a few ways you could do this, you could have all the code be on the bank page, but I went about it a different way. Let me explain in depth so people can understand how I have my system setup.
When members go to my Bank page, there is a If/Else statement that looks to see if the member has collected their pay yet or not, if they haven't, a green link pops up stating: "You have a paycheck available!" so then the user can go to that link that links them to the payment collecting page. After they hit the Cash Check button, it deposits the set amount of money into their bank account. This paycheck becomes available every week using Cron jobs.
_________
Okay, so, to go ahead and get started let's make the files we need. I'll just do a step-by-step tutorial on my exact setup. I made a pay.php file in the root folder, and a payview.php file in the view folder within the root.
Inside the pay.php is this:
pay.php
Then this is inside of the payview.php:
payview.php
Next you need to make(if you don't already have it) a cron.php file in your root folder. You want to add this to it:
cron.php
I have also added in there what my Cron file looks like.
That finishes the files. Next you need the database, so go to PHPMyAdmin and go to your users table and add 2 columns. Set it up like this:
pay | varchar | 3 | Default: None | No NULL
(just hit enter and it'll auto fill the rest)
you also want to add level_pay, set up like so:
level_pay | varchar | 11 | Default: None | No NULL
and hit enter.
Remember you'll need to manually go into a user's database and change their level_pay to something like Entry or Experienced.
Database is now done. Now you need to add the Cron job to allow that paycheck link to pop up every week. Go to your Cron jobs.
Click the drop-down box that says "Common Settings" and click the Once Per Week option, then in the Command box at the bottom paste this:
curl http://dinotracks.mysidiahost.com/cron/pay
except, change the dinotracks to your web address.
That should be it! I don't think I forgot anything. Besides to mention, the level_pay database is what I was using to check and see what the member's experience level was. It checks their level of pay they should get and gives them the correct amount of money. For example, if I have the user as an entry level worker, they get X amount, verses the experienced user getting Y amount, etc.
Let me know if y'all have any questions!
Attachments
Last edited: