+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ return $filterData;
+}
+
+// Filter for adding bonus columns with a plus (+) sign
+function FILTER_ADD_BONUS_POINTS_USER_COLUMNS ($add = '') {
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+
+ // Skip out-dated extension, because this causes an error
+ if (isExtensionInstalledAndOlder('bonus', '0.9.7')) {
+ // Skip this silently
+ return $add;
+ } // END - if
+
+ // Add more columns only when the corresponding configuration is enabled, too
+ if (isIncludeBonusClickEnabled()) $add .= ' + `turbo_bonus`';
+ if (isIncludeBonusLoginEnabled()) $add .= ' + `login_bonus`';
+ if (isIncludeBonusOrderEnabled()) $add .= ' + `bonus_order`';
+ if (isIncludeBonusRefEnabled() ) $add .= ' + `bonus_ref`';
+ if (isIncludeBonusStatsEnabled()) $add .= ' + `bonus_stats`';
+
+ // Return $add
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ return $add;
+}
+
+// Filter for adding SQL columns on user registration for bonus/"active" rallye notification
+function FILTER_BONUS_USER_REGISTRATION_ADD_SQL_COLUMNS ($filterData) {
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+
+ // Next: active rallye
+ if (!isBonusNewMemberNotifyEnabled()) {
+ addExtraRegistrationColumns(', `bonus_rallye_enable_notify`, `bonus_rallye_disable_notify`');
+ $GLOBALS['register_sql_data'] .= ', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()';
+ } // END - if
+
+ // Return filter data
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=<pre>'.print_r($filterData,TRUE).'</pre>';
+ return $filterData;
+}
+
+// Filter for sending out bonus rallye notifications
+function FILTER_SEND_BONUS_NOTIFICATIONS ($filterData) {
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+ // Check for bonus rallye is active and send mails out
+ if ((isBonusRallyeActive()) && (isBonusNewMemberNotifyEnabled())) {
+ // Include file for sending out mails
+ addIncludeToPool('notify', 'inc/mails/bonus_mails.php');
+ } // END - if
+
+ // Return filter data
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=<pre>'.print_r($filterData,TRUE).'</pre>';
+ return $filterData;
+}
+
+// Filter to add exclusion SQL for configured userid
+function FILTER_EXLCUDE_BONUS_USERID ($filterData = array()) {
+ // Is it valid?
+ if (isValidId(getBonusUserid())) {
+ // Exclude it
+ array_push($filterData, '{?bonus_userid?}');
+ } // END - if
+
+ // Return it
+ return $filterData;