Mys 1.3.4 Easy Change User Cash

Forum
Last Post
Threads / Messages

Abronsyth

A Headache Embodied
Member
Joined
Aug 25, 2011
Messages
1,012
Points
36
Location
NY
Mysidian Dollar
73,285
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:
$mysidia->db->update("users", array("email" => $mysidia->input->post("email")), "uid='{$mysidia->input->get("uid")}'");
Right below that, just add this in:
PHP:
$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:
->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:
->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!
 
Oh, wow, this is incredibly useful o_O Thanks! I shall totally use this when I get around to adding in features XD
 

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,119
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Top