From: Roland Häder Date: Wed, 13 Jul 2011 23:11:26 +0000 (+0000) Subject: Extension ext-refback continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7c9e517bf51f378ac98fd868aacf8ac7d0fb9808;p=mailer.git Extension ext-refback continued: - Templates renamed to naming convention - Minor improvements here and there - TODOs.txt updated --- diff --git a/.gitattributes b/.gitattributes index c8d71fff34..f815fc800a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1659,6 +1659,7 @@ templates/de/html/member/member_content_right.tpl svneol=native#text/plain templates/de/html/member/member_doubler.tpl svneol=native#text/plain templates/de/html/member/member_doubler_list.tpl svneol=native#text/plain templates/de/html/member/member_doubler_list_rows.tpl svneol=native#text/plain +templates/de/html/member/member_edit_refback.tpl svneol=native#text/plain templates/de/html/member/member_footer.tpl svneol=native#text/plain templates/de/html/member/member_goto_top.tpl svneol=native#text/plain templates/de/html/member/member_header.tpl svneol=native#text/plain @@ -1669,6 +1670,10 @@ templates/de/html/member/member_list_beg.tpl svneol=native#text/plain templates/de/html/member/member_list_beg_row.tpl svneol=native#text/plain templates/de/html/member/member_list_coupon.tpl svneol=native#text/plain templates/de/html/member/member_list_coupon_row.tpl svneol=native#text/plain +templates/de/html/member/member_list_refback.tpl svneol=native#text/plain +templates/de/html/member/member_list_refback_deleted_row.tpl svneol=native#text/plain +templates/de/html/member/member_list_refback_level.tpl svneol=native#text/plain +templates/de/html/member/member_list_refback_row.tpl svneol=native#text/plain templates/de/html/member/member_list_reflinks.tpl svneol=native#text/plain templates/de/html/member/member_list_reflinks_row.tpl svneol=native#text/plain templates/de/html/member/member_list_surfbar.tpl svneol=native#text/plain diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index c642acf2cb..72475d7ffd 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -61,7 +61,7 @@ ./inc/language-functions.php:44:// @TODO Rewrite all language constants to this function. ./inc/language/newsletter_de.php:13: * @TODO This language file is completely out-dated, please do no * ./inc/language/rallye_de.php:13: * @TODO Naming convention not applied for language strings * -./inc/language/refback_de.php:44:// @TODO Rewrite these constants to one +./inc/language/refback_de.php:53: // @TODO Rewrite these constants to one ./inc/language/sponsor_de.php:117:// @TODO Rewrite these four constants to one and use sprintf() ./inc/libs/admins_functions.php:474: // @TODO This can be, somehow, rewritten ./inc/libs/bonus_functions.php:194: // @TODO Move this HTML to a template @@ -315,6 +315,11 @@ ./templates/de/html/admin/admin_list_country_edit_row.tpl:1: ./templates/de/html/admin/admin_reset_pass_done.tpl:1: ./templates/de/html/admin/admin_send_reset_link.tpl:1: +./templates/de/html/member/member_refback_edit.tpl:1: +./templates/de/html/member/member_refback_list_level.tpl:1: +./templates/de/html/member/member_refback_list_row_deleted.tpl:1: +./templates/de/html/member/member_refback_list_row.tpl:1: +./templates/de/html/member/member_refback_list.tpl:1: ./templates/de/html/member/member_reflinks_row.tpl:1: ./templates/de/html/member/member_reflinks_table.tpl:1: ./templates/de/html/member/member_surfbar_book_dynamic.tpl:1: diff --git a/inc/language/refback_de.php b/inc/language/refback_de.php index 205fb5e23b..d04fa7f26b 100644 --- a/inc/language/refback_de.php +++ b/inc/language/refback_de.php @@ -41,7 +41,6 @@ if (!defined('__SECURITY')) { } // END - if // Admin language strings -// @TODO Rewrite these constants to one addMessages(array( 'ADMIN_LIST_USER_NOREFS' => "Das Mitglied %s hat in dieser Referal-Ebene keine Refs.", 'ADMIN_LIST_USER_NODATA' => "Das Mitglied %s wurde bereits gelöscht.", @@ -50,16 +49,17 @@ addMessages(array( 'ADMIN_CONFIG_REFBACK_MIN_PERCENTS' => "Minimum erlaubte Refback-Prozente:
(0% ist immer erlaubt!)", 'ADMIN_CONFIG_REFBACK_MAX_PERCENTS' => "Maximum erlaubte Refback-Prozente:", -// Member language strings - 'MEMBER_REFBACK_LIST_TITLE_1' => "Refback Übersicht für Referal-Ebene ", + // Member language strings + // @TODO Rewrite these constants to one + 'MEMBER_REFBACK_LIST_TITLE_1' => "Refback-Übersicht für Referal-Ebene ", 'MEMBER_REFBACK_LIST_TITLE_2' => " (", 'MEMBER_REFBACK_LIST_TITLE_3' => "%)", 'MEMBER_REFBACK_TITLE' => "Refback und Referal-Übersicht", 'MEMBER_REFBACK_NOTE' => "Hier können Sie in jeder Referal-Ebene jedem von Ihnen geworbenen Mitglied Refback einstellen. Sollte Ihr Referal {?POINTS?} verdienen und diese ihm/ihr nicht direkt gutgeschrieben werden, so erhält Ihr Referal die eingestellten Prozente von Ihrem Referalverdienst aufgebucht. Ihnen wird dafür sein Anteil (=eingestellte Prozente) von Ihrem Referalverdienst abgezogen. Unter {--MEMBER_REFBACK_POINTS--} sind die {?POINTS?}-Gutschriften durch Refback an das jeweilige Mitglied zu verstehen.", - 'MEMBER_REFBACK_EXAMPLE' => "Ein Rechenbeispiel: Ihr Referal X verdient 1.000 {?POINTS?}, es sind 10% in Ref-Ebene 1 eingestellt. Ohne Refback erhalten Sie 100 {?POINTS?} in Referal-Ebene 1 gutgeschrieben. Nun haben Sie einen Refback von 90% dem Referal X gegeben. Ihrem Referal werden somit 90 und Ihnen die restlichen 10 {?POINTS?} gutgeschrieben.", + 'MEMBER_REFBACK_EXAMPLE' => "Ein Rechenbeispiel: Ihr Referal X verdient 1.000 {?POINTS?}, es sind 10% in Ref-Ebene 1 eingestellt. Ohne Refback erhalten Sie 100 {?POINTS?} in Referal-Ebene 1 gutgeschrieben. Nun haben Sie einen Refback von 90% dem Referal X gegeben. Die 100 {?POINTS?} werden nun aufgeteilt: Ihrem Referal werden 90 und Ihnen die restlichen 10 von den ursprünglichen 100 {?POINTS?} gutgeschrieben.", 'MEMBER_REFBACK_NO_ENTRIES' => "Es gibt technische Probleme mit der Refback-Tabelle. Bitte Support benachrichtigen.", 'MEMBER_REFBACK_EDIT_SUBMIT' => "Refback einstellen", - 'MEMBER_REFBACK_REFID' => "Mitglieder-Id (Nickname)", + 'MEMBER_REFBACK_REFID' => "Mitglieder-Id", 'MEMBER_REFBACK_LEVEL_REFID' => "Werber", 'MEMBER_REFBACK_STATUS' => "Referal-Status", 'MEMBER_REFBACK_PERCENTS' => "Refback Prozente", @@ -71,7 +71,7 @@ addMessages(array( 'MEMBER_REFBACK_DISABLED' => "Refback ist administrativ deaktiviert. Bitte nutze die Referal-Übersicht links im Menü.", 'MEMBER_REFBACK_MIN_MAX_NOTE' => "Hinweis: Sie können derzeit zwischen {%config,translateComma=refback_min_perc%} und {%config,translateComma=refback_max_perc%} Prozent, inklusive, Refback einstellen.", -// Error messages for members + // Error messages for members 'MEMBER_REFBACK_ERROR_MESSAGE' => "Fehler beim Einstellen des Refbacks. Fehlermeldung:
\n%s", 'MEMBER_REFBACK_ERROR_GENERAL' => "Allgemeiner Scriptefehler. Bitte beim Support melden.", 'MEMBER_REFBACK_ERROR_NO_MEMBER' => "Nur Mitglieder können Refbacks einstellen.", @@ -82,7 +82,7 @@ addMessages(array( 'MEMBER_REFBACK_ERROR_OUT_OF_BOUNDS' => "Sie können nur mindestens {?refback_min_perc?}% und maximal {?refback_max_perc?}% einstellen.", 'MEMBER_REFBACK_DONE' => "Refback eingestellt. Dieser ist ab jetzt gültig.", -// Subject lines + // Subject lines 'ADMIN_REFBACK_SUBJECT' => "Es wurde Refback eingestellt", 'MEMBER_REFBACK_SUBJECT' => "Für Sie wurde Refback eingestellt", )); diff --git a/inc/libs/refback_functions.php b/inc/libs/refback_functions.php index 2a881d81bb..e97e063fec 100644 --- a/inc/libs/refback_functions.php +++ b/inc/libs/refback_functions.php @@ -72,7 +72,7 @@ function addRefbackPoints ($userid, $ref, $points, $ref_points) { // Some percents given? if ($percents > 0) { - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'points=' . $points . ',[percents]=' . $content['refback_percents'] . ',percents=' . $percents . ',level=' . $content['level']); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'points=' . $points . ',refback_percents=' . $content['refback_percents'] . ',percents=' . $percents . ',level=' . $content['level']); // Calculate points for refback $refback = $points * ($content['refback_percents'] / 100) * ($percents / 100); diff --git a/inc/modules/member/what-refback.php b/inc/modules/member/what-refback.php index 19439d2e6b..ee7e6326a6 100644 --- a/inc/modules/member/what-refback.php +++ b/inc/modules/member/what-refback.php @@ -91,7 +91,7 @@ if ((isFormSent('edit')) && (isPostRequestParameterSet('id'))) { $content = getArrayFromUserRefbackData(postRequestParameter('id')); // Load form for editing - loadTemplate('member_refback_edit', false, $content); + loadTemplate('member_edit_refback', false, $content); } } // END - if @@ -129,9 +129,9 @@ if (!SQL_HASZERONUMS($result)) { // Load row template if ($deleted === true) { - $rows .= loadTemplate('member_refback_list_row_deleted', true, $refRow); + $rows .= loadTemplate('member_list_refback_deleted_row', true, $refRow); } else { - $rows .= loadTemplate('member_refback_list_row', true, $refRow); + $rows .= loadTemplate('member_list_refback_row', true, $refRow); } // Count this ref and switch color @@ -142,11 +142,11 @@ if (!SQL_HASZERONUMS($result)) { $content['rows'] = $rows; // Load level template - $OUT .= loadTemplate('member_refback_list_level', true, $content); + $OUT .= loadTemplate('member_list_refback_level', true, $content); } // END - while // Load main template - loadTemplate('member_refback_list', false, $OUT); + loadTemplate('member_list_refback', false, $OUT); } else { // No entries displayMessage('{--MEMBER_REFBACK_NO_ENTRIES--}'); diff --git a/templates/de/emails/admin/admin_refback.tpl b/templates/de/emails/admin/admin_refback.tpl index aacd51f918..1385ffd19a 100644 --- a/templates/de/emails/admin/admin_refback.tpl +++ b/templates/de/emails/admin/admin_refback.tpl @@ -11,7 +11,7 @@ Familienname: {%user,family=$userid%} ----------------------------------- Email-Adresse: {%user,email=$userid%} ----------------------------------- -Refback: {%pipe,translateComma=$content[percents]%}% +Refback: {%pipe,translateComma=$content[refback_percents]%}% ----------------------------------- Bereits erhalten: {%pipe,translateComma=$content[refback_points]%} {?POINTS?} ----------------------------------- diff --git a/templates/de/emails/member/member_refback.tpl b/templates/de/emails/member/member_refback.tpl index be38dc0d48..f160d3f278 100644 --- a/templates/de/emails/member/member_refback.tpl +++ b/templates/de/emails/member/member_refback.tpl @@ -1,11 +1,11 @@ Hallo {%user,gender,translateGender=$userid%} {%user,surname=$userid%} {%user,family=$userid%}, -Das Mitglied $content[refid] hat Ihnen soeben {%pipe,translateComma=$content[percents]%}% Refback eingestellt. Sie erhalten also anteilig {?POINTS?} von seinen Referal-Gutschriften die Sie ihm/ihr bringen ebenfalls gutgeschrieben. +Das Mitglied $content[refid] hat Ihnen soeben {%pipe,translateComma=$content[refback_percents]%}% Refback eingestellt. Sie erhalten also anteilig {?POINTS?} von seinen Referal-Gutschriften die Sie ihm/ihr bringen ebenfalls gutgeschrieben. ------------------------------ Ihr Mitglieder-Id ist: $userid ------------------------------ -Refback: {%pipe,translateComma=$content[percents]%}% +Refback: {%pipe,translateComma=$content[refback_percents]%}% ------------------------------ Sie haben bereits {%pipe,translateComma=$content[refback_points]%} {?POINTS?} Refback-Vergütung an das Mitglied abgegeben. diff --git a/templates/de/html/member/member_edit_refback.tpl b/templates/de/html/member/member_edit_refback.tpl new file mode 100644 index 0000000000..89d3985917 --- /dev/null +++ b/templates/de/html/member/member_edit_refback.tpl @@ -0,0 +1,23 @@ +
+
+ +
+
+ {--MEMBER_REFBACK_EDIT_TITLE--}
+ {--MEMBER_REFBACK_REFID--}: $content[refid] +
+
+ {--MEMBER_REFBACK_PERCENTS--}: + % +
+ +
+
+
+ +
+ {--MEMBER_REFBACK_MIN_MAX_NOTE--} +
diff --git a/templates/de/html/member/member_list_refback.tpl b/templates/de/html/member/member_list_refback.tpl new file mode 100644 index 0000000000..6709085ed6 --- /dev/null +++ b/templates/de/html/member/member_list_refback.tpl @@ -0,0 +1,10 @@ +
+
+ {--MEMBER_REFBACK_TITLE--} +
+$content +
+
{--MEMBER_REFBACK_NOTE--}
+
{--MEMBER_REFBACK_EXAMPLE--}
+
+
diff --git a/templates/de/html/member/member_list_refback_deleted_row.tpl b/templates/de/html/member/member_list_refback_deleted_row.tpl new file mode 100644 index 0000000000..79adabaf5c --- /dev/null +++ b/templates/de/html/member/member_list_refback_deleted_row.tpl @@ -0,0 +1,26 @@ + + + $content[refid] ($content[nickname]) + + + $content[level_refid] + + + {%pipe,translateComma=$content[refback_percents]%}% + + + {%pipe,translateComma=$content[refback_points]%} {?POINTS?} + + + $content[click_rate]% + + + $content[joined] + + +
+ +
+ + diff --git a/templates/de/html/member/member_list_refback_level.tpl b/templates/de/html/member/member_list_refback_level.tpl new file mode 100644 index 0000000000..f27edbe28d --- /dev/null +++ b/templates/de/html/member/member_list_refback_level.tpl @@ -0,0 +1,38 @@ +
+ + + + + + + + + + + + + +$content[rows] + + + +
+ {--MEMBER_REFBACK_LIST_TITLE_1--}$content[level]{--MEMBER_REFBACK_LIST_TITLE_2--}{%pipe,translateComma=$content[percents]%}{--MEMBER_REFBACK_LIST_TITLE_3--} +
+ {--MEMBER_REFBACK_REFID--} + + {--MEMBER_REFBACK_LEVEL_REFID--} + + {--MEMBER_REFBACK_PERCENTS--} + + {--MEMBER_REFBACK_POINTS--} + + {--MEMBER_CLICK_RATE--} + + {--MEMBER_JOINED--} + + {--MEMBER_REFBACK_EDIT--} +
+
diff --git a/templates/de/html/member/member_list_refback_row.tpl b/templates/de/html/member/member_list_refback_row.tpl new file mode 100644 index 0000000000..9248d47e26 --- /dev/null +++ b/templates/de/html/member/member_list_refback_row.tpl @@ -0,0 +1,26 @@ + + + $content[refid] ({%user,nickname,fixEmptyContentToDashes=$content[refid]%}) + + + $content[level_refid] + + + {%pipe,translateComma=$content[refback_percents]%}% + + + {%pipe,translateComma=$content[refback_points]%} {?POINTS?} + + + $content[click_rate]% + + + $content[joined] + + +
+ + +
+ + diff --git a/templates/de/html/member/member_refback_edit.tpl b/templates/de/html/member/member_refback_edit.tpl index 89d3985917..11f5d85d80 100644 --- a/templates/de/html/member/member_refback_edit.tpl +++ b/templates/de/html/member/member_refback_edit.tpl @@ -1,23 +1 @@ -
-
- -
-
- {--MEMBER_REFBACK_EDIT_TITLE--}
- {--MEMBER_REFBACK_REFID--}: $content[refid] -
-
- {--MEMBER_REFBACK_PERCENTS--}: - % -
- -
-
-
- -
- {--MEMBER_REFBACK_MIN_MAX_NOTE--} -
+ diff --git a/templates/de/html/member/member_refback_list.tpl b/templates/de/html/member/member_refback_list.tpl index 6709085ed6..11f5d85d80 100644 --- a/templates/de/html/member/member_refback_list.tpl +++ b/templates/de/html/member/member_refback_list.tpl @@ -1,10 +1 @@ -
-
- {--MEMBER_REFBACK_TITLE--} -
-$content -
-
{--MEMBER_REFBACK_NOTE--}
-
{--MEMBER_REFBACK_EXAMPLE--}
-
-
+ diff --git a/templates/de/html/member/member_refback_list_level.tpl b/templates/de/html/member/member_refback_list_level.tpl index f27edbe28d..11f5d85d80 100644 --- a/templates/de/html/member/member_refback_list_level.tpl +++ b/templates/de/html/member/member_refback_list_level.tpl @@ -1,38 +1 @@ -
- - - - - - - - - - - - - -$content[rows] - - - -
- {--MEMBER_REFBACK_LIST_TITLE_1--}$content[level]{--MEMBER_REFBACK_LIST_TITLE_2--}{%pipe,translateComma=$content[percents]%}{--MEMBER_REFBACK_LIST_TITLE_3--} -
- {--MEMBER_REFBACK_REFID--} - - {--MEMBER_REFBACK_LEVEL_REFID--} - - {--MEMBER_REFBACK_PERCENTS--} - - {--MEMBER_REFBACK_POINTS--} - - {--MEMBER_CLICK_RATE--} - - {--MEMBER_JOINED--} - - {--MEMBER_REFBACK_EDIT--} -
-
+ diff --git a/templates/de/html/member/member_refback_list_row.tpl b/templates/de/html/member/member_refback_list_row.tpl index 9248d47e26..11f5d85d80 100644 --- a/templates/de/html/member/member_refback_list_row.tpl +++ b/templates/de/html/member/member_refback_list_row.tpl @@ -1,26 +1 @@ - - - $content[refid] ({%user,nickname,fixEmptyContentToDashes=$content[refid]%}) - - - $content[level_refid] - - - {%pipe,translateComma=$content[refback_percents]%}% - - - {%pipe,translateComma=$content[refback_points]%} {?POINTS?} - - - $content[click_rate]% - - - $content[joined] - - -
- - -
- - + diff --git a/templates/de/html/member/member_refback_list_row_deleted.tpl b/templates/de/html/member/member_refback_list_row_deleted.tpl index 79adabaf5c..11f5d85d80 100644 --- a/templates/de/html/member/member_refback_list_row_deleted.tpl +++ b/templates/de/html/member/member_refback_list_row_deleted.tpl @@ -1,26 +1 @@ - - - $content[refid] ($content[nickname]) - - - $content[level_refid] - - - {%pipe,translateComma=$content[refback_percents]%}% - - - {%pipe,translateComma=$content[refback_points]%} {?POINTS?} - - - $content[click_rate]% - - - $content[joined] - - -
- -
- - +