From 26d592c0c481fd8f1af053eccb439b5ebb2153dc Mon Sep 17 00:00:00 2001 From: quix0r Date: Sat, 20 Oct 2012 21:01:16 +0000 Subject: [PATCH] Added missing admin templates for ext-forced, some other things improved --- .gitattributes | 4 +++ inc/callback-functions.php | 2 +- inc/language/forced_de.php | 6 ++++ inc/libs/forced_functions.php | 6 ++-- inc/modules/admin/admin-inc.php | 6 ++++ inc/mysql-manager.php | 12 ++++---- .../de/emails/admin/admin_add_forced_ads.tpl | 29 +++++++++++++++++++ .../admin/admin_add_forced_campaigns.tpl | 25 ++++++++++++++++ .../emails/admin/admin_add_forced_costs.tpl | 19 ++++++++++++ .../select_forced_ads_id_textlink_box.tpl | 3 ++ 10 files changed, 101 insertions(+), 11 deletions(-) create mode 100644 templates/de/emails/admin/admin_add_forced_ads.tpl create mode 100644 templates/de/emails/admin/admin_add_forced_campaigns.tpl create mode 100644 templates/de/emails/admin/admin_add_forced_costs.tpl create mode 100644 templates/de/html/select/select_forced_ads_id_textlink_box.tpl diff --git a/.gitattributes b/.gitattributes index 02f544e0e1..ad4cc977ea 100644 --- a/.gitattributes +++ b/.gitattributes @@ -881,6 +881,9 @@ templates/de/emails/.htaccess svneol=native#text/plain templates/de/emails/add-points.tpl svneol=native#text/plain templates/de/emails/admin-del_links.tpl svneol=native#text/plain templates/de/emails/admin/.htaccess svneol=native#text/plain +templates/de/emails/admin/admin_add_forced_ads.tpl svneol=native#text/plain +templates/de/emails/admin/admin_add_forced_campaigns.tpl svneol=native#text/plain +templates/de/emails/admin/admin_add_forced_costs.tpl svneol=native#text/plain templates/de/emails/admin/admin_add_user_subids.tpl svneol=native#text/plain templates/de/emails/admin/admin_admin_add_all_direct.tpl svneol=native#text/plain templates/de/emails/admin/admin_admin_add_all_ref_referral.tpl svneol=native#text/plain @@ -2162,6 +2165,7 @@ templates/de/html/select/select_admins_box.tpl svneol=native#text/plain templates/de/html/select/select_admins_option.tpl svneol=native#text/plain templates/de/html/select/select_forced_ads_id_popup_box.tpl svneol=native#text/plain templates/de/html/select/select_forced_ads_id_popup_option.tpl svneol=native#text/plain +templates/de/html/select/select_forced_ads_id_textlink_box.tpl svneol=native#text/plain templates/de/html/select/select_forced_ads_id_textlink_option.tpl svneol=native#text/plain templates/de/html/select/select_forced_ads_type_box.tpl svneol=native#text/plain templates/de/html/select/select_forced_ads_type_option.tpl svneol=native#text/plain diff --git a/inc/callback-functions.php b/inc/callback-functions.php index 4b9c5c8b59..4e45cb03e1 100644 --- a/inc/callback-functions.php +++ b/inc/callback-functions.php @@ -1294,7 +1294,7 @@ function doXmlCallbackFunctionExecute ($callbackName, $args, $columnIndex) { } // END - if // Just call it - //* DEBUG: */ die('callbackFunction=' . $callbackName . ',columnIndex=' . $columnIndex . ',args=
'.print_r($args, TRUE).'
'); + //* DEBUG: */ die(__FUNCTION__.':callbackFunction=' . $callbackName . ',columnIndex=' . $columnIndex . ',args=
'.print_r($args, TRUE).'
'); call_user_func_array($callbackName, $args); } diff --git a/inc/language/forced_de.php b/inc/language/forced_de.php index 48d9f5e400..3200142cf7 100644 --- a/inc/language/forced_de.php +++ b/inc/language/forced_de.php @@ -83,6 +83,9 @@ addMessages(array( 'ADMIN_SELECT_FORCED_AD' => "Forced-Werbemittel auswählen:", 'ADMIN_SELECT_FORCED_CAMPAIGN_USERID' => "Mitgliedsaccount auswählen, dass dieser Kampagne zugewiesen werden soll:", 'ADMIN_SELECT_FORCED_COSTS' => "Forced-Preis auswählen:", + 'ADMIN_FORCED_CAMPAIGN_ADS_ID' => "Verknüpftes Forced-Werbemittel:", + 'ADMIN_FORCED_CAMPAIGN_USERID' => "Verknüpftes Mitgliedsaccount:", + 'ADMIN_FORCED_CAMPAIGN_COSTS_ID' => "Verknüpfte Forced-Kosten:", 'ADMIN_FORCED_CAMPAIGN_STATUS' => "Kampagnen-Status", 'ADMIN_FORCED_CAMPAIGN_ORDERED_CLICKS' => "Klicks übrig", 'ADMIN_FORCED_CAMPAIGN_PAYMENT_API' => "Vergütung von API", @@ -169,8 +172,11 @@ addMessages(array( 'ADMIN_FORCED_CAMPAIGNS_ACTIVATED_FAILED' => "Bei der Aktivierung von Forced-Kampagnen ist ein Fehler unterlaufen, haben Sie auch nur Kampagnen mit dem Status {--ADMIN_FORCED_CAMPAIGN_TYPE_PENDING--} ausgewählt?", // Admin - subject lines + 'ADMIN_ADD_FORCED_ADS_SUBJECT' => "Forced-Werbemittel hinzugefügt", 'ADMIN_EDIT_FORCED_ADS_SUBJECT' => "Änderungen an Forced-Werbemitteln", + 'ADMIN_ADD_FORCED_COSTS_SUBJECT' => "Forced-Preis hinzugefügt", 'ADMIN_EDIT_FORCED_COSTS_SUBJECT' => "Änderung an Forced-Preisen", + 'ADMIN_ADD_FORCED_CAMPAIGNS_SUBJECT' => "Forced-Kampagne erstellt", 'ADMIN_FORCED_NOTIFY_CAMPAIGN_PENDING_ACTIVE_SUBJECT' => "Eine Forced-Kampagne wurde freigeschaltet", // Member - subject lines diff --git a/inc/libs/forced_functions.php b/inc/libs/forced_functions.php index e596264e3c..21a7327a31 100644 --- a/inc/libs/forced_functions.php +++ b/inc/libs/forced_functions.php @@ -121,9 +121,9 @@ function translateForcedCostsVisibility ($visibility) { return $return; } -// "Getter" for an array of data from all Forced-PopUps except user's +// "Getter" for an array of data from all forced-popups except user's own function getForcedPopupDataByEarningArray ($content) { - die('content=
' . print_r($content, TRUE) . '
' . debug_get_printable_backtrace()); + die(__FUNCTION__.':content=
' . print_r($content, TRUE) . '
' . debug_get_printable_backtrace()); // Finally return the content return $content; @@ -537,7 +537,6 @@ function doTemplateForcedCampaignUseridSelectionBox ($templateName, $clear, $def function addXmlSpecialAdminAddDoForcedAds () { // So set it all here $GLOBALS['__COLUMN_INDEX']['doXmlCallbackFunction'] = 'column'; - $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_values'] = array(); $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_index'] = 'column'; } @@ -552,7 +551,6 @@ function addXmlSpecialAdminAddDoForcedCampaigns () { function addXmlSpecialAdminAddDoForcedCosts () { // So set it all here $GLOBALS['__COLUMN_INDEX']['doXmlCallbackFunction'] = 'column'; - $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_values'] = array(); $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_index'] = 'column'; } diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index 86c378e821..8e3bd823ad 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -1067,6 +1067,12 @@ function adminUndeleteEntriesConfirm ($tableName, $columns = array(), $filterFun // Adds a given entry to the database function adminAddEntries ($tableName, $columns = array(), $filterFunctions = array(), $extraValues = array(), $timeColumns = array(), $columnIndex = NULL) { + // Is the userid set? + if (!isPostRequestElementSet('userid')) { + // Then set NULL here + setPostRequestElement('userid', NULL); + } // END - if + // Call inner function doGenericAddEntries($tableName, $columns, $filterFunctions, $extraValues, $timeColumns, $columnIndex); diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index bcf674209b..d0ec3ca794 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -1982,7 +1982,7 @@ function doListEntries ($sql, $tableTemplate, $noEntryMessageId, $rowTemplate, $ // Adds a given entry to the database function doGenericAddEntries ($tableName, $columns = array(), $filterFunctions = array(), $extraValues = array(), $timeColumns = array(), $columnIndex = NULL) { - //* DEBUG: */ die('columns=
'.print_r($columns,TRUE).'
,filterFunctions=
'.print_r($filterFunctions,TRUE).'
,extraValues=
'.print_r($extraValues,TRUE).'
,POST=
'.print_r($_POST,TRUE).'
'); + //* DEBUG: */ die(__FUNCTION__.':columns=
'.print_r($columns,TRUE).'
,filterFunctions=
'.print_r($filterFunctions,TRUE).'
,extraValues=
'.print_r($extraValues,TRUE).'
,timeColumns=
'.print_r($timeColumns,TRUE).'
,columnIndex=
'.print_r($columnIndex,TRUE).'
,POST=
'.print_r($_POST,TRUE).'
'); // Verify that tableName and columns are not empty if ((!is_array($tableName)) || (count($tableName) != 1)) { // No tableName specified @@ -2031,14 +2031,14 @@ function doGenericAddEntries ($tableName, $columns = array(), $filterFunctions = // Send data through the filter function if found if ((isset($filterFunctions[$key])) && (isset($extraValues[$key . '_list']))) { // Filter function set! - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'sqlValues[' . $key . '][' . gettype($sqlValues[$key]) . ']=' . $sqlValues[$key] . ' - BEFORE!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'columnName=' . $columnName . ',sqlValues[' . $key . '][' . gettype($sqlValues[$key]) . ']=' . $sqlValues[$key] . ' - BEFORE!'); $sqlValues[$key] = call_user_func_array($filterFunctions[$key], merge_array(array($columnName), $extraValues[$key . '_list'])); - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'sqlValues[' . $key . '][' . gettype($sqlValues[$key]) . ']=' . $sqlValues[$key] . ' - AFTER!'); - } elseif ((isset($filterFunctions[$key])) && (!empty($filterFunctions[$key]))) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'columnName=' . $columnName . ',sqlValues[' . $key . '][' . gettype($sqlValues[$key]) . ']=' . $sqlValues[$key] . ' - AFTER!'); + } elseif ((isset($filterFunctions[$key])) && (!empty($filterFunctions[$key])) && (!empty($sqlValues[$key]))) { // Run through an extra filter - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'sqlValues[' . $key . '][' . gettype($sqlValues[$key]) . ']=' . $sqlValues[$key] . ' - BEFORE!'); + /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'columnName=' . $columnName . ',sqlValues[' . $key . '][' . gettype($sqlValues[$key]) . ']=' . $sqlValues[$key] . ' - BEFORE!'); $sqlValues[$key] = handleExtraValues($filterFunctions[$key], $sqlValues[$key], NULL); - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'sqlValues[' . $key . '][' . gettype($sqlValues[$key]) . ']=' . $sqlValues[$key] . ' - AFTER!'); + /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'columnName=' . $columnName . ',sqlValues[' . $key . '][' . gettype($sqlValues[$key]) . ']=' . $sqlValues[$key] . ' - AFTER!'); } // Is the value not a number? diff --git a/templates/de/emails/admin/admin_add_forced_ads.tpl b/templates/de/emails/admin/admin_add_forced_ads.tpl new file mode 100644 index 0000000000..78cbc4499a --- /dev/null +++ b/templates/de/emails/admin/admin_add_forced_ads.tpl @@ -0,0 +1,29 @@ +Hallo Administrator, + +Es wurde soeben Forced-Werbemittel hinzugefügt. + +Hier sind alle Daten dazu: +------------------------------------------ +Forced-Werbemittel-Id: $content[id] +------------------------------------------ +{--ADMIN_FORCED_ADS_AD_URL--}: $content[forced_ads_ad_url] +------------------------------------------ +{--ADMIN_FORCED_ADS_ALTERNATE_TEXT--}: $content[forced_ads_alt_text] +------------------------------------------ +{--ADMIN_FORCED_ADS_CLICK_URL--}: $content[forced_ads_click_url] +------------------------------------------ +{--ADMIN_FORCED_ADS_WIDTH--}: {%pipe,translateComma=$content[forced_ads_width]%} +------------------------------------------ +{--ADMIN_FORCED_ADS_HEIGHT--}: {%pipe,translateComma=$content[forced_ads_height]%} +------------------------------------------ +{--ADMIN_FORCED_ADS_USERID--}: {%pipe,fixEmptyContentToDashes=$content[userid]%} +------------------------------------------ +{--ADMIN_FORCED_ADS_TYPE--}: {%pipe,translateForcedAdsType=$content[forced_ads_type]%} +------------------------------------------ +{--ADMIN_FORCED_ADS_HAS_FRAMEBREAKER--}: {%pipe,translateYesNo=$content[forced_ads_framebreaker]%} +------------------------------------------ + +Mit freundlichen Grüßen, + Ihr {?MAIN_TITLE?} Script + +{?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_add_forced_campaigns.tpl b/templates/de/emails/admin/admin_add_forced_campaigns.tpl new file mode 100644 index 0000000000..283472540a --- /dev/null +++ b/templates/de/emails/admin/admin_add_forced_campaigns.tpl @@ -0,0 +1,25 @@ +Hallo Administrator, + +Es wurde soeben Forced-Kampagne hinzugefügt. + +Hier sind alle Daten dazu: +------------------------------------------ +Forced-Kampagnen-Id: $content[id] +------------------------------------------ +{--ADMIN_FORCED_CAMPAIGN_ORDERED_CLICKS--}: {%pipe,translateComma=$content[forced_campaign_ordered_clicks]%} +------------------------------------------ +{--ADMIN_FORCED_CAMPAIGN_MINIMUM_STAY--}: {%pipe,createFancyTime=$content[forced_campaign_minimum_stay]%} +------------------------------------------ +{--ADMIN_FORCED_CAMPAIGN_ADS_ID--} $content[forced_ads_id] +------------------------------------------ +{--ADMIN_FORCED_CAMPAIGN_USERID--} {%pipe,fixEmptyContentToDashes=$content[forced_campaign_userid]%} +------------------------------------------ +{--ADMIN_FORCED_CAMPAIGN_COSTS_ID--} $content[forced_costs_id] +------------------------------------------ +{--ADMIN_FORCED_CAMPAIGN_RELOAD_LOCK--}: {%pipe,createFancyTime=$content[forced_campaign_reload_lock]%} +------------------------------------------ + +Mit freundlichen Grüßen, + Ihr {?MAIN_TITLE?} Script + +{?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_add_forced_costs.tpl b/templates/de/emails/admin/admin_add_forced_costs.tpl new file mode 100644 index 0000000000..cf73fd9516 --- /dev/null +++ b/templates/de/emails/admin/admin_add_forced_costs.tpl @@ -0,0 +1,19 @@ +Hallo Administrator, + +Es wurde soeben Forced-Preise hinzugefügt. + +Hier sind alle Daten dazu: +------------------------------------------ +Forced-Preis-Id: $content[id] +------------------------------------------ +{--ADMIN_FORCED_COSTS_PRICE_CLICK--}: {%pipe,translateComma=$content[forced_costs_price_click]%} +------------------------------------------ +{--ADMIN_FORCED_COSTS_PAYMENT_CLICK--}: {%pipe,translateComma=$content[forced_costs_payment_click]%} +------------------------------------------ +{--ADMIN_FORCED_COSTS_VISIBILITY--}: {%pipe,translateForcedCostsVisibility=$content[forced_costs_visibility]%} +------------------------------------------ + +Mit freundlichen Grüßen, + Ihr {?MAIN_TITLE?} Script + +{?URL?}/admin.php diff --git a/templates/de/html/select/select_forced_ads_id_textlink_box.tpl b/templates/de/html/select/select_forced_ads_id_textlink_box.tpl new file mode 100644 index 0000000000..1abcfa7a14 --- /dev/null +++ b/templates/de/html/select/select_forced_ads_id_textlink_box.tpl @@ -0,0 +1,3 @@ +
+ $content[selection_box] +
-- 2.39.2