From: Roland Häder Date: Thu, 11 Aug 2011 21:42:46 +0000 (+0000) Subject: Extension ext-network continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=188495baa4eae4327a063f99989ea503598b2174;p=mailer.git Extension ext-network continued: - All advertising networks are now configured in a separate form - Link to network configuration added - Language ids renamed and text updated to reflect latest code changes - TODOs.txt updated --- diff --git a/.gitattributes b/.gitattributes index e259a324c7..462992ab59 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1096,6 +1096,7 @@ templates/de/html/admin/admin_config_home_row.tpl svneol=native#text/plain templates/de/html/admin/admin_config_home_settings.tpl svneol=native#text/plain templates/de/html/admin/admin_config_mediadata.tpl svneol=native#text/plain templates/de/html/admin/admin_config_menu.tpl svneol=native#text/plain +templates/de/html/admin/admin_config_network.tpl svneol=native#text/plain templates/de/html/admin/admin_config_newsletter.tpl svneol=native#text/plain templates/de/html/admin/admin_config_nickname.tpl svneol=native#text/plain templates/de/html/admin/admin_config_order.tpl svneol=native#text/plain diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index b2ac856581..f995c0d312 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -307,6 +307,8 @@ ./templates/de/html/admin/admin_list_chk_reg.tpl:1: ./templates/de/html/admin/admin_list_country_del_row.tpl:1: ./templates/de/html/admin/admin_list_country_edit_row.tpl:1: +./templates/de/html/admin/admin_list_network_config_row.tpl:1: +./templates/de/html/admin/admin_list_network_config.tpl:1: ./templates/de/html/admin/admin_list_user_sort_form.tpl:1: ./templates/de/html/admin/admin_mods_stats2_row.tpl:1: ./templates/de/html/admin/admin_mods_stats2.tpl:1: diff --git a/inc/language/network_de.php b/inc/language/network_de.php index 0363cce41d..d1808c1033 100644 --- a/inc/language/network_de.php +++ b/inc/language/network_de.php @@ -83,6 +83,7 @@ addMessages(array( 'ADMIN_NETWORK_API_TRANSLATION_ADD_TITLE' => "Werbenetzwerk verwalten - Neues API-Arrayelement hinzufügen", 'ADMIN_NETWORK_API_TRANSLATION_LIST_TITLE' => "API-Arrayelemente auflisten und verwalten", // - Link titles + 'ADMIN_NETWORK_CONFIG_LINK_TITLE' => "Weiter zur API-Konfiguration", 'ADMIN_NETWORK_LIST_TYPES_LINK_TITLE' => "Weiter zu den Werbearten", 'ADMIN_NETWORK_LIST_PARAMS_LINK_TITLE' => "Weiter zu den API-Parametern", 'ADMIN_NETWORK_LIST_API_TRANSLATION_LINK_TITLE' => "Weiter zu den Übersetzungen zum Antwort-Arrayn", @@ -201,14 +202,14 @@ addMessages(array( 'ADMIN_NETWORK_API_INDEX_TRANSLATION' => "Index-Übersetzung", 'ADMIN_NETWORK_API_INDEX_SORTING' => "Index-Reihenfolge", // Network configuration - 'ADMIN_NETWORK_CONFIG_ENTER_NETWORK_AFFILIATE_ID' => "Ihre Affiliate oder User-Id", - 'ADMIN_NETWORK_CONFIG_ENTER_NETWORK_API_PASSWORD' => "Ihr Interface-Kennwort", - 'ADMIN_NETWORK_CONFIG_ENTER_NETWORK_SITE_ID' => "Webseiten-Id Ihres {?MT_WORD2?}", - 'ADMIN_NETWORK_CONFIG_ENTER_NETWORK_QUERY_AMOUNT' => "Freie Interface-Abfragen täglich", - 'ADMIN_NETWORK_CONFIG_ENTER_NETWORK_ACTIVE' => "Soll dieses Interface abgefragt werden?", - 'ADMIN_NETWORK_CONFIG_TITLE' => "Einrichtung Ihrer Interface-Zugänge zu den Werbenetzwerken", - 'ADMIN_NETWORK_SAVE_CONFIG' => "Alle Interface-Konfigurationen speichern", - 'ADMIN_NETWORK_CONFIG_NOTE' => "Tragen Sie hier alle Ihre Interface-Zugangsdaten ein. Sollten Sie bei einem Netzwerk nicht angemeldet sein, so können Sie dies über den angezeigten Referal-Link (bitte stehen lassen) nachholen. Sollten Sie sich bei dem Netzwerk nicht anmelden wollen, so lassen Sie einfachen die jeweiligen Einträge leer.", + 'ADMIN_CONFIG_NETWORK_ENTER_NETWORK_AFFILIATE_ID' => "Ihre Affiliate oder User-Id", + 'ADMIN_CONFIG_NETWORK_ENTER_NETWORK_API_PASSWORD' => "Ihr Interface-Kennwort", + 'ADMIN_CONFIG_NETWORK_ENTER_NETWORK_SITE_ID' => "Webseiten-Id Ihres {?MT_WORD2?}", + 'ADMIN_CONFIG_NETWORK_ENTER_NETWORK_QUERY_AMOUNT' => "Freie Interface-Abfragen täglich", + 'ADMIN_CONFIG_NETWORK_ENTER_NETWORK_ACTIVE' => "Soll dieses Interface abgefragt werden?", + 'ADMIN_CONFIG_NETWORK_TITLE' => "Einrichtung des API-Zugangs zum Werbenetzwerk %s:", + 'ADMIN_CONFIG_NETWORK_SAVE_BUTTON' => "API-Konfiguration speichern", + 'ADMIN_CONFIG_NETWORK_NOTE' => "Tragen Sie hier Ihre Interface-Zugangsdaten zum angzeigten Werbenetzwerk ein.", // Error codes 'ADMIN_NETWORK_AFF_ID_PASS_WRONG_ERROR_CODE' => "Affiliate-Id oder -Passwort falsch", 'ADMIN_NETWORK_SITE_ID_NOT_ASSIGNED_ERROR_CODE' => "Seiten-Id nicht zugewiesen/ungültig", diff --git a/inc/modules/admin/what-config_networks.php b/inc/modules/admin/what-config_networks.php index 854ef987d4..d952a47e8a 100644 --- a/inc/modules/admin/what-config_networks.php +++ b/inc/modules/admin/what-config_networks.php @@ -55,8 +55,10 @@ if ($GLOBALS['network_display'] === false) { return; } // END - if -// Check all networks that doesn't have a configuration entry -$result = SQL_QUERY("SELECT +// Do we have a network selected? +if (isGetRequestElementSet('network')) { + // Check all networks that doesn't have a configuration entry + $result = SQL_QUERY_ESC("SELECT d.`network_id`, d.`network_short_name`, d.`network_title`, d.`network_reflink`, c.`network_affiliate_id`, c.`network_api_password`, c.`network_site_id`, c.`network_query_amount`, c.`network_active` FROM @@ -65,32 +67,38 @@ LEFT JOIN `{?_MYSQL_PREFIX?}_network_config` AS `c` ON d.`network_id`=c.`network_id` +WHERE + d.`network_id`=%s ORDER BY - d.`network_short_name` ASC", __FILE__, __LINE__); + d.`network_short_name` ASC", + array( + bigintval(getRequestElement('network')) + ), __FILE__, __LINE__); + + // Do we have entries? + if (!SQL_HASZERONUMS($result)) { + // Load data + $content = SQL_FETCHARRAY($result); -// Do we have entries? -if (!SQL_HASZERONUMS($result)) { - // We have some networks here - $OUT = ''; - while ($content = SQL_FETCHARRAY($result)) { // Fix empty 'active' to 'yes' if (is_null($content['network_active'])) { // Fix it for our API function $content['network_active'] = 'Y'; } // END - if - // Add network row - $OUT .= loadTemplate('admin_list_network_config_row', true, $content); - } // END - while + // Load main template + loadTemplate('admin_config_network', false, $content); + } else { + // Please setup some networks first + displayMessage('{--ADMIN_NETWORK_DATA_MISSING--}'); + } - // Load main template - loadTemplate('admin_list_network_config', false, $OUT); + // Free result + SQL_FREERESULT($result); } else { - // Please setup some networks first - displayMessage('{--ADMIN_NETWORK_DATA_MISSING--}'); + // Generate network list for this script + outputHtml(generateAdminNetworkList()); } -// Free result -SQL_FREERESULT($result); // [EOF] ?> diff --git a/templates/de/html/admin/admin_config_network.tpl b/templates/de/html/admin/admin_config_network.tpl new file mode 100644 index 0000000000..94183aad3f --- /dev/null +++ b/templates/de/html/admin/admin_config_network.tpl @@ -0,0 +1,53 @@ +
+
+ + + + + + + + + + + + + + + + + + +
+ {%message,ADMIN_CONFIG_NETWORK_TITLE=$content[network_title]%} +
+ {--ADMIN_CONFIG_NETWORK_ENTER_NETWORK_AFFILIATE_ID--}:
+ +
($content[network_title])
+
+ {--ADMIN_CONFIG_NETWORK_ENTER_NETWORK_SITE_ID--}:
+ +
($content[network_title])
+
+ {--ADMIN_CONFIG_NETWORK_ENTER_NETWORK_API_PASSWORD--}:
+ +
($content[network_title])
+
+ {--ADMIN_CONFIG_NETWORK_ENTER_NETWORK_QUERY_AMOUNT--}:
+ +
($content[network_title])
+
+ {--ADMIN_CONFIG_NETWORK_ENTER_NETWORK_ACTIVE--}:
+ +
+
+
+ +
+ {--ADMIN_CONFIG_NETWORK_NOTE--} +
diff --git a/templates/de/html/admin/admin_list_network_config.tpl b/templates/de/html/admin/admin_list_network_config.tpl index ffc328cf72..11f5d85d80 100644 --- a/templates/de/html/admin/admin_list_network_config.tpl +++ b/templates/de/html/admin/admin_list_network_config.tpl @@ -1,22 +1 @@ -
-
- - - - - $content - - - -
- {--ADMIN_NETWORK_CONFIG_TITLE--} -
-
-
- -
- {--ADMIN_NETWORK_CONFIG_NOTE--} -
+ diff --git a/templates/de/html/admin/admin_list_network_config_row.tpl b/templates/de/html/admin/admin_list_network_config_row.tpl index 0520875c58..11f5d85d80 100644 --- a/templates/de/html/admin/admin_list_network_config_row.tpl +++ b/templates/de/html/admin/admin_list_network_config_row.tpl @@ -1,38 +1 @@ - - - $content[network_title] - - - - - {--ADMIN_NETWORK_CONFIG_ENTER_NETWORK_AFFILIATE_ID--}:
- -
($content[network_title])
- - - {--ADMIN_NETWORK_CONFIG_ENTER_NETWORK_SITE_ID--}:
- -
($content[network_title])
- - - - - {--ADMIN_NETWORK_CONFIG_ENTER_NETWORK_API_PASSWORD--}:
- -
($content[network_title])
- - - {--ADMIN_NETWORK_CONFIG_ENTER_NETWORK_QUERY_AMOUNT--}:
- -
($content[network_title])
- - - - - {--ADMIN_NETWORK_CONFIG_ENTER_NETWORK_ACTIVE--}:
- -
($content[network_title])
- - + diff --git a/templates/de/html/admin/admin_list_networks_row.tpl b/templates/de/html/admin/admin_list_networks_row.tpl index 851e1ba8ca..1ffd3daf16 100644 --- a/templates/de/html/admin/admin_list_networks_row.tpl +++ b/templates/de/html/admin/admin_list_networks_row.tpl @@ -5,6 +5,7 @@ $content[network_short_name]:
[C|T|P|RC|