Turn:
Http://www.mutoulee.cn/113.html
http://www.xuephp.com/main/detail.php?cid=23045
discuz! Custom Integration Log
In some of the projects may encounter points related operations, but also need to add their own points to the integration log, organized a bit.
Core functions:
PHP
1 |
Updatemembercount($_g[' UID '], array ( $credit Span class= "Crayon-o" >=> - dintval ($_get[< Span class= "crayon-s" > ' num ' ]) ) , true ' WDA ' , 1, ' integral withdrawal ' |
true: whether to check user group changes after the change of points;
WDA: operation event Key;
1: whether the correlation ID;
points Withdrawal: the text in the JS floating hint message of the integral change;
where WDA (operation) and 1 (relatedid) are present when the log is deposited, otherwise the integration log is not generated;
Corresponding changes:
source\include\spacecp\spacecp_credit.php
The identity (KEY) of the branch in which it is added, for example:
PHP
123456 |
case ' WDA ': $log[' Opinfo '] = ' Gold withdrawal, minus the corresponding amount '; break; case ' WDF ': $log[' Opinfo '] = ' Gold withdrawal failure, return the corresponding amount '; break; |
source\include\spacecp\spacecp_credit_log.php
Add your own key to the array of manipulation events, for example (the last two):
PHP
1 |
$optypes = Array(' TRC ',' RTC ',' RAC ',' MRC ',' BGC ',' RGC ',' AGC ',' TFR ',' RCV ',' CEC ',' ECU ',' SAC ',' BAC ',' PRC ',' RSC ',' STC ',' BTC ', ' AFD ' , ' UGP ' Span class= "Crayon-sy" >, ' RPC ' , ' ACC ' , ' RCT ' , ' RCA ' , ' RCB ' , ' BMC ' , ' BME ' , ' CDC ' Span class= "Crayon-sy" >, ' RKC ' , ' WDA ' , ' WDF ' |
source\language\lang_spacecp.php
Add the name of the action event to the language pack, for example:
PHP
12 |
' Logs_credit_update_wda ' => ' Gold cash withdrawal ', ' LOGS_CREDIT_UPDATE_WDF ' => ' failed to withdraw ', |
discuz! Custom Integration Log