Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Mys v1.3.x Mods (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=42)
-   -   Mys v1.3.4 Easy Change User Cash (http://www.mysidiaadoptables.com/forum/showthread.php?t=5142)

Abronsyth 07-01-2016 08:33 AM

Easy Change User Cash
 
This is an extremely simple mod that will enable you to change a user's cash amount in the Admin Control Panel. There are just two pieces of code that will need to be implemented.

admincp/user.php
In this file you'll want to go down to around line 52 or so, where you'll see this;
PHP Code:

$mysidia->db->update("users", array("email" => $mysidia->input->post("email")), "uid='{$mysidia->input->get("uid")}'"); 

Right below that, just add this in:
PHP Code:

$mysidia->db->update("users", array("money" => $mysidia->input->post("money")), "uid='{$mysidia->input->get("uid")}'"); 

admincp/view/userview.php
In this file you'll want to go down to find public function edit, and then find where this chunk of code is (lines 53-54 for me):
PHP Code:

->buildCheckBox(" Email the user the new password (Only takes effect if setting a new password) ""emailpwchange""yes")
                     ->
buildComment("Change Email Address: "FALSE)->buildTextField("email"$user->getemail()) 

Right below that add in this;
PHP Code:

->buildComment("Currency: "FALSE)->buildTextField("money"$user->money

So now when you go into your ACP to edit a user you can now edit their cash amount, and it will show you how much they currently have!

parayna 09-02-2016 08:03 AM

Oh, wow, this is incredibly useful o.O Thanks! I shall totally use this when I get around to adding in features XD

Micolai 07-16-2020 01:01 AM

Thanks so much!


All times are GMT -5. The time now is 10:51 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.