+// Filter for changing URL status
+function FILTER_FORCED_CHANGE_CAMPAIGN_STATUS ($filterData) {
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+ /*
+ // Do some dirty fixing here:
+ if (($filterData['data']['forced_campaign_status'] == 'STOPPED') && ($filterData['new_status'] == 'pending')) {
+ // Fix for template change
+ $filterData['new_status'] = 'continued';
+ } // END - if
+ */
+
+ // Send admin notification
+ doForcedNotifyAdmin('campaign_' . strtolower($filterData['data']['forced_campaign_status']) . '_' . $filterData['new_status'], $filterData['data']);
+
+ // Send user notification
+ doForcedNotifyMember('campaign_' . strtolower($filterData['data']['forced_campaign_status']) . '_' . $filterData['new_status'], $filterData['data']);
+
+ // Return filter data
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ return $filterData;
+}
+
+// Filter for validating status
+function FILTER_FORCED_CHANGE_CAMPAIGN_VALIDATE_DATA ($filterData) {
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+ // Is the new status set?
+ if ((!is_string($filterData['new_status'])) || (empty($filterData['new_status']))) {
+ // Abort here, not fine
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'newStatus[' . gettype($filterData['new_status']) . ']=' . $filterData['new_status'] . ' - EXIT!');
+ interruptFilterChain();
+ } elseif ($filterData['data']['forced_campaign_status'] != $filterData['prev_status']) {
+ // Status is not like prevStatus
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, $filterData['data']['forced_campaign_status'] . '!=' . $filterData['prev_status'] . ' - EXIT!');
+ continueFilterChain();
+ } // END - if
+
+ // Return filter data
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ return $filterData;
+}
+
+// Filter for handling click on forced ad
+function FILTER_HANDLE_FORCED_AD_CLICK ($filterData) {
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+ // Are all required parameters set?
+ die(__FUNCTION__ . ': filterData=<pre>' . print_r($filterData, TRUE) . '</pre>');
+
+ // Return filter data
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ return $filterData;
+}
+
+// Filter for handling viewing forced banner
+function FILTER_HANDLE_FORCED_AD_VIEW ($filterData) {
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+ // Are all required parameters set?
+ die(__FUNCTION__ . ': filterData=<pre>' . print_r($filterData, TRUE) . '</pre>');
+
+ // Return filter data
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ return $filterData;
+}
+