#1
|
||||
|
||||
Bank Mod
-Before we start--
If you have a fresh install of the mysidia script or you have unmodified files, you may download the attachments at the bottom. (You still must follow step 0) If you would rather install it manually, follow the instructions below. -Step 0- Go to phpMyAdmin, adopts_users, and create a new column with this info: Code:
Name: bank Type: int Length/Values: 11 Default: As defined 0 check the null box Create a new page for your bank from scratch. If you don't know how to make pages from scratch go here. Do not create a new page from the admincp. Create a file named bank.php in your root folder and add the following contents: PHP Code:
PHP Code:
Now go to class_member.php and add this with the other public items: PHP Code:
PHP Code:
Next, go to class_user.php and add this with the other public things: PHP Code:
PHP Code:
That should be it. Now users are able to add and withdraw from a bank account that holds their currency. -Attachment- The bank.php file goes in your root/public_html folder while bankview.php goes in your view folder. Please do not use the attachments if you have heavily modified files as it can cause errors! Follow the manual tutorial instead.
__________________
Last edited by Dinocanid; 12-10-2016 at 10:53 PM. |
#2
|
||||
|
||||
OK, I tinkered with it a bit and made it so that the deposit and withdraw are two separate things for my site... that way the deposit and withdraw parts are hidden when doing one or the other! I basically did it by creating bank_deposit and bank_withdraw.php files as well as their view files. And they work, woo! XD This also let me use the Admin CP to create my bank page as I could just link to those pages from a custom page but I am going to create a PHP one so that it is linked under {url}bank instead of {url}pages/view/bank XD
There was probably an easier way of hiding them so I didn't have to create these files but I'm happy with doing this as then I can add images to each available page and not worry about them showing up wrong. If the text and code isn't in one file, there is no chance of it showing the wrong text/code unless I mess up! XD Thanks for the code ^_^ |
#3
|
||||
|
||||
Added a pretty important update so users can no longer withdraw more money than they have in the bank and deposit money they don't have.
__________________
|
#4
|
|||
|
|||
I can't find where to add a new column?
Name: bank Type: int Length/Values: 11 Default: As defined 0 check the null box I have no where to add this. Could you provide a screen shot to where I can find it please? |
#5
|
||||
|
||||
You go to phpMyAdmin, find and select adopts_users, and then add a new column under the structure tab with the given information:
__________________
|
|
|
What's New? |
What's Hot? |
What's Popular? |