daniely
09-04-2004, 10:00 PM
Yay my first real hack! Er.... addon. Basicly this lets you give points to users via admincp. Okay, installation is simple.
File Edits: 3
First open admincp/user.php
Find:
// PROFILE FIELDS SECTION
print_table_header($vbphrase['user_profile_fields']);
$profilefields = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "profilefield ORDER by displayorder");
while ($profilefield = $DB_site->fetch_array($profilefields))
{
print_profilefield_row($profilefield, $userfield);
}
And add under:
//Give users points
print_table_break('', $INNERTABLEWIDTH);
print_table_header("Petz");
print_input_row("Points", "money", $user['money']);
//Give users points
Now Find:
'options',
And add under:
'money' => INT,
Finally, find:
if ($modifyavatar)
{
define('CP_REDIRECT', "usertools.php?do=avatar&userid=$userid");
}
And add above:
if ( $money ) {
$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET money = '".$money."' WHERE userid = '".$userid."'");
}
And your done. Now enjoy the ability to give out points on will.
File Edits: 3
First open admincp/user.php
Find:
// PROFILE FIELDS SECTION
print_table_header($vbphrase['user_profile_fields']);
$profilefields = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "profilefield ORDER by displayorder");
while ($profilefield = $DB_site->fetch_array($profilefields))
{
print_profilefield_row($profilefield, $userfield);
}
And add under:
//Give users points
print_table_break('', $INNERTABLEWIDTH);
print_table_header("Petz");
print_input_row("Points", "money", $user['money']);
//Give users points
Now Find:
'options',
And add under:
'money' => INT,
Finally, find:
if ($modifyavatar)
{
define('CP_REDIRECT', "usertools.php?do=avatar&userid=$userid");
}
And add above:
if ( $money ) {
$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET money = '".$money."' WHERE userid = '".$userid."'");
}
And your done. Now enjoy the ability to give out points on will.