]> git.mxchange.org Git - mailer.git/commitdiff
Listing of API array elements basicly finished
authorRoland Häder <roland@mxchange.org>
Thu, 5 Aug 2010 22:08:30 +0000 (22:08 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 5 Aug 2010 22:08:30 +0000 (22:08 +0000)
.gitattributes
inc/language/network_de.php
inc/libs/network_functions.php
templates/de/html/admin/admin_list_network_api_translation.tpl [new file with mode: 0644]
templates/de/html/admin/admin_list_network_api_translation_row.tpl [new file with mode: 0644]

index 8908b997402c868fc489d75017637825704f3283..c555717fec6e392cd3c583cac6035a3dd9627740 100644 (file)
@@ -1162,6 +1162,8 @@ templates/de/html/admin/admin_list_links_problem.tpl -text svneol=unset#text/pla
 templates/de/html/admin/admin_list_links_row.tpl -text svneol=unset#text/plain
 templates/de/html/admin/admin_list_mods.tpl -text svneol=unset#text/plain
 templates/de/html/admin/admin_list_mods_row.tpl -text svneol=unset#text/plain
+templates/de/html/admin/admin_list_network_api_translation.tpl svneol=native#text/plain
+templates/de/html/admin/admin_list_network_api_translation_row.tpl svneol=native#text/plain
 templates/de/html/admin/admin_list_network_params.tpl -text svneol=unset#text/plain
 templates/de/html/admin/admin_list_network_params_row.tpl -text svneol=unset#text/plain
 templates/de/html/admin/admin_list_network_types.tpl -text svneol=unset#text/plain
index 82d47f42a659284641362df1bee801a9d663dea8..756b45c65e2a76c892daf0106decc44265a2b627 100644 (file)
@@ -80,7 +80,8 @@ addMessages(array(
        'ADMIN_NETWORK_REQUEST_PARAMETER_LIST_TITLE' => "API-Parameter auflisten und verwalten",
        'ADMIN_NETWORK_REQUEST_PARAMETER_EDIT_TITLE' => "API-Parameter editieren",
        'ADMIN_NETWORK_REQUEST_PARAMETER_DELETE_TITLE' => "API-Parameter l&ouml;schen",
-       'ADMIN_NETWORK_API_TRANSLATION_ADD_TITLE' => "Werbenetzwerk verwalten - Neuen R&uuml;ckgabewert hinzuf&uuml;gen",
+       'ADMIN_NETWORK_API_TRANSLATION_ADD_TITLE' => "Werbenetzwerk verwalten - Neues API-Array-Element hinzuf&uuml;gen",
+       'ADMIN_NETWORK_API_TRANSLATION_LIST_TITLE' => "API-Array-Elemente auflisten und verwalten",
        // - Link titles
        'ADMIN_NETWORK_LIST_TYPES_LINK_TITLE' => "Weiter zu den Werbearten",
        'ADMIN_NETWORK_LIST_PARAMS_LINK_TITLE' => "Weiter zu den API-Parametern",
@@ -104,7 +105,9 @@ addMessages(array(
        'ADMIN_NETWORK_REQUEST_PARAMETER_DELETE' => "L&ouml;schen",
        'ADMIN_NETWORK_REQUEST_PARAMETER_CHANGE' => "API-Parameter &auml;ndern",
        'ADMIN_NETWORK_REQUEST_PARAMETER_REMOVE' => "API-Parameter entfernen",
-       'ADMIN_NETWORK_API_TRANSLATION_ADD' => "R&uuml;ckgabewert hinzuf&uuml;gen",
+       'ADMIN_NETWORK_API_TRANSLATION_ADD' => "API-Array-Element hinzuf&uuml;gen",
+       'ADMIN_NETWORK_API_TRANSLATION_EDIT' => "Editieren",
+       'ADMIN_NETWORK_API_TRANSLATION_DELETE' => "L&ouml;schen",
        // - Success titles
        'ADMIN_NETWORK_ADDED_TITLE' => "Allgemeine Werbenetzwerkdaten hinzugef&uuml;gt",
        'ADMIN_NETWORK_TYPES_ADDED_TITLE' => "Werbeart-Handler hinzugef&uuml;gt",
@@ -125,6 +128,7 @@ addMessages(array(
        'ADMIN_NETWORK_REQUEST_PARAMETER_ADD_NOTE' => "F&uuml;gen Sie hier weitere API-Parameter dem ausgw&auml;hlten Werbenetzwerk hinzu. Geben Sie keine Werte an, wie z.B. 5 Sekunden oder 30 Mails, geben Sie bei API-Parameter den GET- bzw. POST-Parameternamen an.",
        'ADMIN_NETWORK_REQUEST_PARAMETER_LIST_NOTE' => "Seien Sie mit dem L&ouml;schen und Editieren von API-Parameter sehr vorsichtig. Sie sollten hierzu R&uuml;cksprache <a href=\"http://forum.mxchange.org/forum-43.html\" target=\"_blank\" title=\"Direktlink zum Forum\">im Forum</a> halten. Dokumentation zu den Abfragenamen (&#37;FOO&#37;, &#37;BAR&#37; usw.) finden Sie in der Dokumentation DOCs/de/network/README.txt.",
        'ADMIN_NETWORK_API_TRANSLATION_ADD_NOTE' => "F&uuml;gen Sie hier weitere Array-Element-&Uuml;bersetzungen zu dem ausgew&auml;hlten Netzwerk und Werbeart-Handler ein.",
+       'ADMIN_NETWORK_API_TRANSLATION_LIST_NOTE' => "Seien Sie mit dem Editieren bzw. L&ouml;schen von Array-Elementen sehr vorsichtig, die API-Abfrage k&ouml;ntte unerwartete Ergebnisse bzw. Fehler zur&uuml;ckliefern.",
        // - Other messages
        'ADMIN_NETWORK_REQUEST_PARAMETER_LIST_LIMITED_TO_TYPE' => "Es wurden nur die API-Parameter des ausgew&auml;hlten Werbeart-Handlers angezeigt.",
        'ADMIN_NETWORK_API_TRANSLATION_LIST_LIMITED_TO_TYPE' => "Es wurden nur die Array-Element-&Uuml;bersetzungen des ausgew&auml;hlten Werbeart-Handlers angezeigt.",
@@ -196,9 +200,10 @@ addMessages(array(
        'ADMIN_NETWORK_REQUEST_PARAMETER_SIZE' => "Werbemittelgr&ouml;sse",
        'ADMIN_NETWORK_REQUEST_PARAMETER_EROTIC' => "Erotik erlaubt",
        'ADMIN_NETWORK_REQUEST_PARAMETER_EXTRA' => "Extra-Parameter",
-       // - Return code translation
+       // - API array index translation
        'ADMIN_NETWORK_API_TRANSLATION_INDEX' => "Neuen Array-Index eintragen",
        'ADMIN_NETWORK_API_TRANSLATION_INDEX_TRANSLATION' => "Index-&Uuml;bersetzung ausw&auml;hlen",
+       'ADMIN_NETWORK_API_INDEX_TRANSLATION' => "Index-&Uuml;bersetzung",
        // 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 89392f1e1c73828748d25da4b3d631d77c3c8357..23ccf54b9027755f868a59006849b6a479b22b08 100644 (file)
@@ -634,6 +634,51 @@ function translateNetworkRequestType ($name) {
        return getMessage('ADMIN_NETWORK_REQUEST_TYPE_' . strtoupper($name) . '');
 }
 
+// Translates API index
+function translateNetworkApiIndex ($index) {
+       // Do we have cache?
+       if (!isset($GLOBALS['network_api_index'])) {
+               // Get an array of all API array indexes
+               $GLOBALS['network_api_index'] = array();
+
+               // Get all entries
+               $result = SQL_QUERY('SELECT
+       `network_api_id`, `network_api_index`, `network_translation_name`
+FROM
+       `{?_MYSQL_PREFIX?}_network_api_translation`
+INNER JOIN
+       `{?_MYSQL_PREFIX?}_network_translations`
+ON
+       `network_api_index`=`network_translation_id`
+ORDER BY
+       `network_api_id` ASC', __FUNCTION__, __LINE__);
+
+               // Do we have entries?
+               if (SQL_NUMROWS($result) > 0) {
+                       // Get all entries
+                       while ($row = SQL_FETCHARRAY($result)) {
+                               // Add it to our global array
+                               $GLOBALS['network_api_index'][$row['network_api_index']] = $row;
+                       } // END - while
+               } // END - if
+
+               // Free result
+               SQL_FREERESULT($result);
+       } // END - if
+
+       // Default name is unknown
+       $name = 'unknown';
+
+       // Is the entry there?
+       if (isset($GLOBALS['network_api_index'][$index])) {
+               // Then get the name
+               $name = $GLOBALS['network_api_index'][$index]['network_translation_name'];
+       } // END - if
+
+       // Return translation
+       return translateNetworkTranslationName($name);
+}
+
 //------------------------------------------------------------------------------
 //                             Call-back functions
 //------------------------------------------------------------------------------
diff --git a/templates/de/html/admin/admin_list_network_api_translation.tpl b/templates/de/html/admin/admin_list_network_api_translation.tpl
new file mode 100644 (file)
index 0000000..527f771
--- /dev/null
@@ -0,0 +1,33 @@
+<div align="center">
+<form accept-charset="utf-8" action="{%url=modules.php?module=admin&amp;what=list_network_api_translation&amp;network={%pipe,getRequestParameter=network%}&amp;do=handle_api_translation%}" method="post">
+<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed">
+       <tr>
+               <td colspan="5" align="center" class="admin_title bottom">
+                       <div>
+                               <strong>{--ADMIN_NETWORK_API_TRANSLATION_LIST_TITLE--}</strong>
+                       </div>
+                       <div class="tiny">
+                               (<a href="{%network,getNetworkDataById,network_reflink=%network%%}" target="_blank" title="{%network,getNetworkDataById,network_title=%network%%}">{%network,getNetworkDataById,network_title=%network%%}</a>)
+                       </div>
+               </td>
+       </tr>
+       <tr>
+               <td align="center" class="header_column bottom right" height="25"><strong>{--ID_SELECT--}</strong></td>
+               <td align="center" class="header_column bottom right"><strong>{--ADMIN_NETWORK_TYPES_HANDLE--}</strong></td>
+               <td align="center" class="header_column bottom"><strong>{--ADMIN_NETWORK_API_INDEX_TRANSLATION--}</strong></td>
+       </tr>
+       $content
+       <tr>
+               <td colspan="5" class="admin_footer">
+                       <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" />
+                       <input type="submit" name="edit" class="admin_submit" value="{--ADMIN_NETWORK_API_TRANSLATION_EDIT--}" />
+                       <input type="submit" name="del" class="admin_delete" value="{--ADMIN_NETWORK_API_TRANSLATION_DELETE--}" />
+               </td>
+       </tr>
+</table>
+</form>
+
+<div class="admin_note">
+       {--ADMIN_NETWORK_API_TRANSLATION_LIST_NOTE--}
+</div>
+</div>
diff --git a/templates/de/html/admin/admin_list_network_api_translation_row.tpl b/templates/de/html/admin/admin_list_network_api_translation_row.tpl
new file mode 100644 (file)
index 0000000..eea03c7
--- /dev/null
@@ -0,0 +1,11 @@
+<tr>
+       <td class="{%template,ColorSwitch%} bottom right" align="center">
+               <input type="checkbox" title="{--ID_SELECT--} $content[network_api_id]" class="admin_normal" name="sel[$content[network_api_id]]" value="1" />
+       </td>
+       <td class="{%template,ColorSwitch%} bottom right" align="center">
+               {%pipe,translateNetworkTypeHandler=$content[network_type_handle]%}
+       </td>
+       <td class="{%template,ColorSwitch%} bottom" align="center">
+               {%pipe,translateNetworkApiIndex=$content[network_api_index]%}
+       </td>
+</tr>