From: Roland Häder Date: Thu, 5 Aug 2010 23:35:39 +0000 (+0000) Subject: A3H added, handling fixed: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1cf53b85ecf223f806bcf2cf0c3d696be180c254;p=mailer.git A3H added, handling fixed: - API array elements added for A3H - A lot Array index translations added - Disabling of already added elements fixed - Current selected handle will now be pre-selected again - TODOs.txt updated --- diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index a150c0e612..96028c04fb 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -192,9 +192,9 @@ ./inc/template-functions.php:264: // @TODO Remove this sanity-check if all is fine ./inc/template-functions.php:575:// @TODO $simple/$constants are deprecated ./inc/template-functions.php:602: // @TODO Do only use $content and deprecate $GLOBALS and $DATA in templates -./inc/wrapper-functions.php:127:// @TODO Implement $compress -./inc/wrapper-functions.php:134:// @TODO Implement $decompress -./inc/wrapper-functions.php:455:// @TODO Do some more sanity check here +./inc/wrapper-functions.php:132:// @TODO Implement $compress +./inc/wrapper-functions.php:139:// @TODO Implement $decompress +./inc/wrapper-functions.php:454:// @TODO Do some more sanity check here ./mailid.php:140: // @TODO Rewrite this to a filter ./mailid.php:97: // @TODO Rewrite this to a filter ./mailid_top.php:101: // @TODO Rewrite this to a filter @@ -277,6 +277,7 @@ Warning: Not parsing JavaScript templates/de/html/js/js_order_send.tpl. Warning: Not parsing JavaScript templates/de/html/js/js_cookies_disabled.tpl. Warning: Not parsing JavaScript templates/de/html/js/js_uberwach.tpl. +Warning: Not parsing JavaScript templates/de/html/js/js_surfbar_frame_top.tpl. Warning: Not parsing JavaScript templates/de/html/js/js_jquery.tpl. Warning: Not parsing JavaScript templates/de/html/js/js_surfbar_member_book.tpl. Warning: Not parsing JavaScript templates/de/html/js/js_surfbar_stopped.tpl. diff --git a/inc/extensions/ext-network.php b/inc/extensions/ext-network.php index 13411f758e..12888f8544 100644 --- a/inc/extensions/ext-network.php +++ b/inc/extensions/ext-network.php @@ -215,16 +215,32 @@ PRIMARY KEY (`network_reload_id`) ) TYPE={?_TABLE_TYPE?} COMMENT='Reload locks'"); // Insert API response array translations, these will be used for calling the right filter function - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_translations` (`network_translation_name`) VALUES ('id')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_translations` (`network_translation_name`) VALUES ('name')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_translations` (`network_translation_name`) VALUES ('alternate_text')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_translations` (`network_translation_name`) VALUES ('reload')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_translations` (`network_translation_name`) VALUES ('remain')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_translations` (`network_translation_name`) VALUES ('reward')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_translations` (`network_translation_name`) VALUES ('banner_id')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_translations` (`network_translation_name`) VALUES ('size')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_translations` (`network_translation_name`) VALUES ('text')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_translations` (`network_translation_name`) VALUES ('minimum_stay')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_translations` (`network_translation_id`, `network_translation_name`) VALUES +(1, 'id'), +(2, 'name'), +(3, 'alternate_text'), +(4, 'reload'), +(5, 'remain'), +(6, 'reward'), +(7, 'banner_id'), +(8, 'size'), +(9, 'text'), +(10, 'minimum_stay'), +(11, 'textlink_id'), +(12, 'surfbar_id'), +(13, 'mail_id'), +(14, 'layer_id'), +(15, 'popup_id'), +(16, 'popdown_id'), +(17, 'lead_id'), +(18, 'sale_id'), +(19, 'banner_url1'), +(20, 'banner_url2'), +(21, 'banner_url3'), +(22, 'textlink1'), +(23, 'textlink2'), +(24, 'textlink3'), +(25, 'description')"); // Insert error code types // - Affiliate id or interface password wrong @@ -2036,6 +2052,127 @@ PRIMARY KEY (`network_reload_id`) (1110, 23, 166, 'reward', 'verguetung', NULL), (1111, 23, 166, 'erotic', 'erotik', NULL)"); + // API array elements - A3H + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_api_id`, `network_id`, `network_type_id`, `network_api_index`, `sort`) VALUES +(1, 1, 1, 7, 1), +(2, 1, 1, 2, 2), +(3, 1, 1, 3, 3), +(4, 1, 1, 4, 4), +(5, 1, 1, 5, 5), +(6, 1, 1, 6, 6), +(7, 1, 1, 8, 7), +(8, 1, 1, 10, 8), +(9, 1, 2, 11, 1), +(10, 1, 2, 2, 2), +(11, 1, 2, 9, 3), +(12, 1, 2, 4, 4), +(13, 1, 2, 5, 5), +(14, 1, 2, 6, 6), +(15, 1, 3, 12, 1), +(16, 1, 3, 2, 2), +(17, 1, 3, 3, 3), +(18, 1, 3, 4, 4), +(19, 1, 3, 5, 5), +(20, 1, 3, 6, 6), +(21, 1, 3, 8, 7), +(22, 1, 4, 7, 1), +(23, 1, 4, 2, 2), +(24, 1, 4, 3, 3), +(25, 1, 4, 4, 4), +(26, 1, 4, 5, 5), +(27, 1, 4, 6, 6), +(28, 1, 4, 10, 7), +(29, 1, 4, 8, 8), +(30, 1, 5, 13, 1), +(31, 1, 5, 2, 2), +(32, 1, 5, 4, 3), +(33, 1, 5, 5, 4), +(34, 1, 5, 6, 5), +(35, 1, 5, 10, 6), +(36, 1, 5, 9, 7), +(37, 1, 6, 14, 1), +(38, 1, 6, 2, 2), +(39, 1, 6, 4, 3), +(40, 1, 6, 5, 4), +(41, 1, 6, 6, 5), +(42, 1, 7, 15, 1), +(43, 1, 7, 2, 2), +(44, 1, 7, 4, 3), +(45, 1, 7, 5, 4), +(46, 1, 7, 6, 5), +(47, 1, 7, 10, 6), +(48, 1, 8, 16, 1), +(49, 1, 8, 2, 2), +(50, 1, 8, 4, 3), +(51, 1, 8, 5, 4), +(52, 1, 8, 6, 5), +(53, 1, 8, 10, 6), +(54, 1, 9, 17, 1), +(55, 1, 9, 2, 2), +(56, 1, 9, 6, 3), +(57, 1, 9, 19, 4), +(58, 1, 9, 20, 5), +(59, 1, 9, 21, 6), +(60, 1, 9, 22, 7), +(61, 1, 9, 23, 8), +(62, 1, 9, 9, 9), +(63, 1, 9, 25, 10), +(64, 1, 9, 5, 11), +(65, 1, 10, 18, 1), +(66, 1, 10, 2, 2), +(67, 1, 10, 6, 3), +(68, 1, 10, 19, 4), +(69, 1, 10, 20, 5), +(70, 1, 10, 21, 6), +(71, 1, 10, 22, 7), +(72, 1, 10, 23, 8), +(73, 1, 10, 9, 9), +(74, 1, 10, 25, 10)"); + + // API array elements - AbisZED-Netz + + // API array elements - AD-Magnet + + // API array elements - ADCocktail + + // API array elements - AdPaid + + // API array elements - Ads4.de + + // API array elements - Ads4Webbis + + // API array elements - Ads4World + + // API array elements - Affiliblatt + + // API array elements - AllAds4You + + // API array elements - Alster-Marketing + + // API array elements - BonusSponsor + + // API array elements - Fusion-Ads + + // API array elements - GigaPromo + + // API array elements - HPSponsor + + // API array elements - Make-Euros.de + + // API array elements - Mega-Ad + + // API array elements - Power-Promo + + // API array elements - SeCash + + // API array elements - The Swizerland Ad Network + + // API array elements - UltraPOMO + + // API array elements - Der Werbepartner.cc + + // API array elements - Yoo!Media + // Fix empty defaults to NULL addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_network_types` SET `network_type_banner_url`=NULL WHERE `network_type_banner_url`=''"); addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_network_request_params` SET `request_param_default`=NULL WHERE `request_param_default`=''"); diff --git a/inc/language/network_de.php b/inc/language/network_de.php index 756b45c65e..ce3345cd27 100644 --- a/inc/language/network_de.php +++ b/inc/language/network_de.php @@ -66,6 +66,7 @@ addMessages(array( 'ADMIN_NETWORK_REQUEST_PARAMETER_NOTHING_REMOVED' => "Es wurden keine API-Parameter gelöscht.", 'ADMIN_NETWORK_API_TRANSLATION_404' => "Es wurden keine Übersetzungen zum Antwort-Array zum Werbenetzwerk %s gefunden.", 'ADMIN_NETWORK_API_TRANSLATION_NOT_ADDED' => "Die Array-Element-Übersetzung %s wurde nicht hinzugefügt.", + 'ADMIN_NETWORK_API_TRANSLATION_ALREADY_ADDED' => "Eine Array-Element-Übersetzung %s existiert bereits.", // - Form titles 'ADMIN_NETWORK_ADD_TITLE' => "Neues Werbenetzwerk hinzufügen - Allgemeine Daten", 'ADMIN_NETWORK_EDIT_TITLE' => "Werbenetzwerk editieren - Allgemeine Daten", @@ -217,6 +218,14 @@ addMessages(array( // Textual represations of column translate_name 'ADMIN_NETWORK_TRANSLATE_ALTERNATE_TEXT_NAME' => "Alternativer Bildtext", 'ADMIN_NETWORK_TRANSLATE_BANNER_ID_NAME' => "Banner-Id", + 'ADMIN_NETWORK_TRANSLATE_TEXTLINK_ID_NAME' => "Textlink-Id", + 'ADMIN_NETWORK_TRANSLATE_SURFBAR_ID_NAME' => "Surfbar-Id", + 'ADMIN_NETWORK_TRANSLATE_MAIL_ID_NAME' => "Mail-Id", + 'ADMIN_NETWORK_TRANSLATE_LAYER_ID_NAME' => "Layer-Id", + 'ADMIN_NETWORK_TRANSLATE_POPUP_ID_NAME' => "PopUp-Id", + 'ADMIN_NETWORK_TRANSLATE_POPDOWN_ID_NAME' => "PopDown-Id", + 'ADMIN_NETWORK_TRANSLATE_LEAD_ID_NAME' => "Lead-Id", + 'ADMIN_NETWORK_TRANSLATE_SALE_ID_NAME' => "Sale-Id", 'ADMIN_NETWORK_TRANSLATE_ID_NAME' => "Kampagnen-Id", 'ADMIN_NETWORK_TRANSLATE_MINIMUM_STAY_NAME' => "Mindestauffenthalt", 'ADMIN_NETWORK_TRANSLATE_NAME_NAME' => "Kampagnen-Name", @@ -225,6 +234,13 @@ addMessages(array( 'ADMIN_NETWORK_TRANSLATE_REWARD_NAME' => "Mindestvergütung", 'ADMIN_NETWORK_TRANSLATE_SIZE_NAME' => "Bannerformat", 'ADMIN_NETWORK_TRANSLATE_TEXT_NAME' => "Werbetext", + 'ADMIN_NETWORK_TRANSLATE_BANNER_URL1_NAME' => "Werbebanner 1", + 'ADMIN_NETWORK_TRANSLATE_BANNER_URL2_NAME' => "Werbebanner 2", + 'ADMIN_NETWORK_TRANSLATE_BANNER_URL3_NAME' => "Werbebanner 3", + 'ADMIN_NETWORK_TRANSLATE_TEXTLINK1_NAME' => "Textlink 1", + 'ADMIN_NETWORK_TRANSLATE_TEXTLINK2_NAME' => "Textlink 2", + 'ADMIN_NETWORK_TRANSLATE_TEXTLINK3_NAME' => "Textlink 3", + 'ADMIN_NETWORK_TRANSLATE_DESCRIPTION_NAME' => "Beschreibung", )); // [EOF] diff --git a/inc/libs/network_functions.php b/inc/libs/network_functions.php index b9554d6664..f0ccb45981 100644 --- a/inc/libs/network_functions.php +++ b/inc/libs/network_functions.php @@ -1193,7 +1193,7 @@ function doAdminNetworkProcessAddNetworkApiTranslation () { // Is the request parameter already used with given network? if (isNetworkApiTranslationValid(postRequestParameter('network_api_index'), postRequestParameter('network_type_id'), getRequestParameter('network'))) { // Already added - loadTemplate('admin_settings_unsaved', false, getMaskedMessage('ADMIN_NETWORK_API_TRANSLATION_ALREADY_ADDED', postRequestParameter('request_param_key'))); + loadTemplate('admin_settings_unsaved', false, getMaskedMessage('ADMIN_NETWORK_API_TRANSLATION_ALREADY_ADDED', postRequestParameter('network_api_index'))); // ... so abort here return false; @@ -1206,14 +1206,14 @@ function doAdminNetworkProcessAddNetworkApiTranslation () { setPostRequestParameter('network_id', bigintval(getRequestParameter('network'))); // Add sorting - setPostRequestParameter('sort', countSumTotalData( + setPostRequestParameter('sort', (countSumTotalData( postRequestParameter('network_id'), 'network_api_translation', 'network_api_id', 'network_id', true, sprintf(" AND `network_type_id`=%s", bigintval(postRequestParameter('network_type_id'))) - )); + ) + 1)); // Add the whole request to database SQL_QUERY('INSERT INTO diff --git a/inc/modules/admin/what-list_network_api_translation.php b/inc/modules/admin/what-list_network_api_translation.php index 21fd668291..baadb48c0b 100644 --- a/inc/modules/admin/what-list_network_api_translation.php +++ b/inc/modules/admin/what-list_network_api_translation.php @@ -68,6 +68,9 @@ if (isGetRequestParameterSet('network')) { // Get its data for template $networkData = getNetworkDataById(getRequestParameter('network')); + // Init type + $networkData['network_type_id'] = 0; + // Init disabled list $GLOBALS['network_translation_disabled'] = array(); @@ -77,11 +80,13 @@ if (isGetRequestParameterSet('network')) { // Only show from current type handler $ADD = sprintf(" AND p.`network_type_id`=%s", bigintval(postRequestParameter('network_type_id'))); + // Overwrite type + $networkData['network_type_id'] = bigintval(postRequestParameter('network_type_id')); + // Display message loadTemplate('admin_settings_saved', false, '{--ADMIN_NETWORK_API_TRANSLATION_LIST_LIMITED_TO_TYPE--}'); } // END - if - // Load all advert codes for given network $result = SQL_QUERY_ESC("SELECT p.`network_api_id`, t.`network_type_id`, t.`network_type_handle`, p.`network_api_index` @@ -107,7 +112,7 @@ ORDER BY $OUT = ''; while ($row = SQL_FETCHARRAY($result)) { // Add it to network if the type matches selected - if ($row['network_type_id'] == getRequestParameter('network_type_id')) { + if ($row['network_type_id'] == postRequestParameter('network_type_id')) { // Matches, then add it for disabling this entry $GLOBALS['network_translation_disabled'][$row['network_api_index']] = true; } // END - if diff --git a/templates/de/html/admin/admin_add_network_api_translation.tpl b/templates/de/html/admin/admin_add_network_api_translation.tpl index ba513dffb9..c1a66085a5 100644 --- a/templates/de/html/admin/admin_add_network_api_translation.tpl +++ b/templates/de/html/admin/admin_add_network_api_translation.tpl @@ -13,7 +13,7 @@ {--ADMIN_NETWORK_TYPE_SELECT--}: