Vault Mod + Transactions Point System + Cash Mod

Allgemeiner Support zum phpBB 2 Board und phpBB 2 Modifikationen
Forumsregeln
Auch wenn hier der Support für phpBB 2 weiterhin aufrecht erhalten bleibt, weisen wir darauf hin, dass das phpBB 2 nicht mehr offiziell unterstützt und weiterentwickelt wird!
Antworten
Indextrader
Beiträge: 372
Registriert: Sa 17.Sep, 2005 11:50

Vault Mod + Transactions Point System + Cash Mod

Beitrag von Indextrader »

Hi ihr Lieben.
Ich habe den Cash Mod und den Vault Mod installiert, klappt beides hervorragend.
Nun möchte ich gern die von den Usern durchgeführten Transaktionen speichern.
Dazu sollte der Transactions Point System korrekt sein.
Leider will er in der Installation die pointscp.php ich habe allerdings die cash.php.
Hat zufällig jemand die Konstellation am laufen und kann mir sagen, wie ich die Änderungen in der cash.php vornehmen muss?

Ich habe das hier gefunden:

what an awesome awesome mod. i love it. Heres my contribution to it. A small modification to make the vault work with the transaction mod. I hope nobody minds me posting this

Code:

#
#-----[ OPEN ]------------------------------------------
#
vault.php

#
#-----[ FIND ]------------------------------------------
#

$sql = "UPDATE " . USERS_TABLE ."
SET user_points = user_points - $deposit_sum
WHERE user_id = $user_id";
if( !$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not obtain accounts information', "", __LINE__, __FILE__, $sql);
}

#
#--------------[AFTER, ADD ]-------------
#

$sql = "INSERT INTO " . TRANSACTION_TABLE . " (trans_date, trans_from, trans_to, trans_amount)
VALUES ( " . time() . ", '" . $userdata['username'] . "', 'Deposit in Bank', '$deposit_sum')";
if( !$db->sql_query($sql) ) { message_die(GENERAL_MESSAGE, 'Could not insert data into transaction table<br>'.mysql_error()); }

#
#-----[ FIND ]------------------------------------------
#

$sql = "UPDATE " . USERS_TABLE ."
SET user_points = user_points + $withdraw_sum
WHERE user_id = $user_id";
if( !$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not obtain accounts information', "", __LINE__, __FILE__, $sql);
}

#
#--------------[AFTER, ADD ]-------------
#

$sql = "INSERT INTO " . TRANSACTION_TABLE . " (trans_date, trans_from, trans_to, trans_amount)
VALUES ( " . time() . ", '" . $userdata['username'] . "', 'Bank Withdrawal', '$withdraw_sum')";
if( !$db->sql_query($sql) ) { message_die(GENERAL_MESSAGE, 'Could not insert data into transaction table<br>'.mysql_error()); }


Allerdings werde ich wohl erst den Transactions Point System Mod mit dem Cash verbinden müssen oder?

Vielleicht kennt ja jemand von euch diese Konstellation

LG Uwe
Antworten