]> git.mxchange.org Git - mailer.git/commitdiff
Extension ext-network continued:
authorRoland Häder <roland@mxchange.org>
Thu, 11 Aug 2011 21:42:46 +0000 (21:42 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 11 Aug 2011 21:42:46 +0000 (21:42 +0000)
- 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

.gitattributes
DOCS/TODOs.txt
inc/language/network_de.php
inc/modules/admin/what-config_networks.php
templates/de/html/admin/admin_config_network.tpl [new file with mode: 0644]
templates/de/html/admin/admin_list_network_config.tpl
templates/de/html/admin/admin_list_network_config_row.tpl
templates/de/html/admin/admin_list_networks_row.tpl

index e259a324c761c22cccbed8d00a9566b88bfc93ac..462992ab59f531cd1069064a0cceedeb1f0affd7 100644 (file)
@@ -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
index b2ac8565814cff67553a908c7fe81382a4910b70..f995c0d3126c172214b1ea7785f4889020e509ec 100644 (file)
 ./templates/de/html/admin/admin_list_chk_reg.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/admin/admin_list_country_del_row.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/admin/admin_list_country_edit_row.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/html/admin/admin_list_network_config_row.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/html/admin/admin_list_network_config.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/admin/admin_list_user_sort_form.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/admin/admin_mods_stats2_row.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/admin/admin_mods_stats2.tpl:1:<!-- @DEPRECATED //-->
index 0363cce41de824075414878c45fab4969d8186ad..d1808c1033c7938b4d75d38e1c6b8b7b0ab28c4f 100644 (file)
@@ -83,6 +83,7 @@ addMessages(array(
        'ADMIN_NETWORK_API_TRANSLATION_ADD_TITLE' => "Werbenetzwerk verwalten - Neues API-Arrayelement hinzuf&uuml;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 &Uuml;bersetzungen zum Antwort-Arrayn",
@@ -201,14 +202,14 @@ addMessages(array(
        'ADMIN_NETWORK_API_INDEX_TRANSLATION' => "Index-&Uuml;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&auml;glich",
-       'ADMIN_NETWORK_CONFIG_ENTER_NETWORK_ACTIVE' => "Soll dieses Interface abgefragt werden?",
-       'ADMIN_NETWORK_CONFIG_TITLE' => "Einrichtung Ihrer Interface-Zug&auml;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&ouml;nnen Sie dies &uuml;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&auml;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&auml;glich",
+       'ADMIN_CONFIG_NETWORK_ENTER_NETWORK_ACTIVE' => "Soll dieses Interface abgefragt werden?",
+       'ADMIN_CONFIG_NETWORK_TITLE' => "Einrichtung des API-Zugangs zum Werbenetzwerk <span class=\"data\">%s</span>:",
+       '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&uuml;ltig",
index 854ef987d43779d0c33af5d17f53b7d58c473adf..d952a47e8aabd8f5772cc940369ad359a87f87bb 100644 (file)
@@ -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 (file)
index 0000000..94183aa
--- /dev/null
@@ -0,0 +1,53 @@
+<div align="center">
+<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&amp;what=config_networks&amp;do=config_networks%}" method="post">
+<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
+<tr>
+       <td class="table_header bottom" colspan="2" align="center">
+               <strong>{%message,ADMIN_CONFIG_NETWORK_TITLE=<a href="$content[network_reflink]" target="_blank" title="$content[network_title]">$content[network_title]</a>%}</strong>
+       </td>
+</tr>
+<tr>
+       <td align="center" class="{%template,ColorSwitch%} bottom right" width="50%">
+               {--ADMIN_CONFIG_NETWORK_ENTER_NETWORK_AFFILIATE_ID--}:<br />
+               <input type="text" class="form_field" name="network_affiliate_id[$content[network_id]" size="5" value="$content[network_affiliate_id]" />
+               <div class="tiny">($content[network_title])</div>
+       </td>
+       <td align="center" class="{%template,ColorSwitch%} bottom" width="50%">
+               {--ADMIN_CONFIG_NETWORK_ENTER_NETWORK_SITE_ID--}:<br />
+               <input type="text" class="form_field" name="network_site_id[$content[network_id]" size="5" value="$content[network_site_id]" />
+               <div class="tiny">($content[network_title])</div>
+       </td>
+</tr>
+<tr>
+       <td align="center" class="{%template,ColorSwitch%} bottom right" width="50%">
+               {--ADMIN_CONFIG_NETWORK_ENTER_NETWORK_API_PASSWORD--}:<br />
+               <input type="text" class="form_field" name="network_api_password[$content[network_id]" size="20" value="$content[network_api_password]" />
+               <div class="tiny">($content[network_title])</div>
+       </td>
+       <td align="center" class="{%template,ColorSwitch%} bottom" width="50%">
+               {--ADMIN_CONFIG_NETWORK_ENTER_NETWORK_QUERY_AMOUNT--}:<br />
+               <input type="text" class="form_field" name="network_query_amount[$content[network_id]" size="5" value="$content[network_query_amount]" />
+               <div class="tiny">($content[network_title])</div>
+       </td>
+</tr>
+<tr>
+       <td align="center" class="{%template,ColorSwitch%} bottom" colspan="2">
+               {--ADMIN_CONFIG_NETWORK_ENTER_NETWORK_ACTIVE--}:<br />
+               <select class="form_field" name="network_active[$content[network_id]" size="1">
+                       {%pipe,generateNetworkActiveOptions=$content[network_active]%}
+               </select>
+       </td>
+</tr>
+<tr>
+       <td class="table_footer" colspan="2" align="center">
+               <input type="reset" class="form_reset" value="{--CLEAR_FORM--}" />
+               <input type="submit" class="form_submit" name="ok" value="{--ADMIN_CONFIG_NETWORK_SAVE_BUTTON--}" />
+       </td>
+</tr>
+</table>
+</form>
+</div>
+
+<div class="notice">
+       {--ADMIN_CONFIG_NETWORK_NOTE--}
+</div>
index ffc328cf72a5e01cfd9c0662ae5f632cd1c41773..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,22 +1 @@
-<div align="center">
-<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&amp;what=config_networks&amp;do=config_networks%}" method="post">
-<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
-       <tr>
-               <td class="table_header bottom" colspan="2" align="center">
-                       <strong>{--ADMIN_NETWORK_CONFIG_TITLE--}</strong>
-               </td>
-       </tr>
-       $content
-       <tr>
-               <td class="table_footer" colspan="2" align="center">
-                       <input type="reset" class="form_reset" value="{--CLEAR_FORM--}" />
-                       <input type="submit" class="form_submit" name="ok" value="{--ADMIN_NETWORK_SAVE_CONFIG--}" />
-               </td>
-       </tr>
-</table>
-</form>
-</div>
-
-<div class="notice">
-       {--ADMIN_NETWORK_CONFIG_NOTE--}
-</div>
+<!-- @DEPRECATED //-->
index 0520875c5851c6604b26c5c5ec6a1bf96377ccbc..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,38 +1 @@
-<tr>
-       <td colspan="2" align="center" class="table_header bottom">
-               <a href="$content[network_reflink]" target="_blank" title="$content[network_title]">$content[network_title]</a>
-       </td>
-</tr>
-<tr>
-       <td align="center" class="{%template,ColorSwitch%} bottom right" width="50%">
-               {--ADMIN_NETWORK_CONFIG_ENTER_NETWORK_AFFILIATE_ID--}:<br />
-               <input type="text" class="form_field" name="network_affiliate_id[$content[network_id]" size="5" value="$content[network_affiliate_id]" />
-               <div class="tiny">($content[network_title])</div>
-       </td>
-       <td align="center" class="{%template,ColorSwitch%} bottom" width="50%">
-               {--ADMIN_NETWORK_CONFIG_ENTER_NETWORK_SITE_ID--}:<br />
-               <input type="text" class="form_field" name="network_site_id[$content[network_id]" size="5" value="$content[network_site_id]" />
-               <div class="tiny">($content[network_title])</div>
-       </td>
-</tr>
-<tr>
-       <td align="center" class="{%template,ColorSwitch%} bottom right" width="50%">
-               {--ADMIN_NETWORK_CONFIG_ENTER_NETWORK_API_PASSWORD--}:<br />
-               <input type="text" class="form_field" name="network_api_password[$content[network_id]" size="20" value="$content[network_api_password]" />
-               <div class="tiny">($content[network_title])</div>
-       </td>
-       <td align="center" class="{%template,ColorSwitch%} bottom" width="50%">
-               {--ADMIN_NETWORK_CONFIG_ENTER_NETWORK_QUERY_AMOUNT--}:<br />
-               <input type="text" class="form_field" name="network_query_amount[$content[network_id]" size="5" value="$content[network_query_amount]" />
-               <div class="tiny">($content[network_title])</div>
-       </td>
-</tr>
-<tr>
-       <td align="center" class="{%template,ColorSwitch%} bottom" colspan="2">
-               {--ADMIN_NETWORK_CONFIG_ENTER_NETWORK_ACTIVE--}:<br />
-               <select class="form_field" name="network_active[$content[network_id]" size="1">
-                       {%pipe,generateNetworkActiveOptions=$content[network_active]%}
-               </select>
-               <div class="tiny">($content[network_title])</div>
-       </td>
-</tr>
+<!-- @DEPRECATED //-->
index 851e1ba8cacd883385efb5822aa235d5f032221a..1ffd3daf16669a5fd18cf2e8d922d72b5ec5235f 100644 (file)
@@ -5,6 +5,7 @@
        <td class="{%template,ColorSwitch%} bottom right" align="center">
                $content[network_short_name]:<br />
                [<a
+                href="{%url=modules.php?module=admin&amp;what=config_networks&amp;network=$content[network_id]%}" title="{--ADMIN_NETWORK_CONFIG_LINK_TITLE--}">C</a>|<a
                 href="{%url=modules.php?module=admin&amp;what=list_network_types&amp;network=$content[network_id]%}" title="{--ADMIN_NETWORK_LIST_TYPES_LINK_TITLE--}">T</a>|<a
                 href="{%url=modules.php?module=admin&amp;what=list_network_params&amp;network=$content[network_id]%}" title="{--ADMIN_NETWORK_LIST_PARAMS_LINK_TITLE--}">P</a>|<a
                 href="{%url=modules.php?module=admin&amp;what=list_network_api_translation&amp;network=$content[network_id]%}" title="{--ADMIN_NETWORK_LIST_API_TRANSLATION_LINK_TITLE--}">RC</a>|<a