From ccbd11f1a1e219ff269b706a0ec6885f062e7682 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 22 Nov 2009 08:39:00 +0000 Subject: [PATCH] Refback rewritten: referal id, joined added --- inc/language/refback_de.php | 1 + inc/libs/refback_functions.php | 4 +++- inc/modules/member/what-refback.php | 11 ++++++----- templates/de/html/member/member_ref_list.tpl | 2 -- templates/de/html/member/member_ref_list_level.tpl | 5 ++--- templates/de/html/member/member_refback_list.tpl | 1 - .../de/html/member/member_refback_list_level.tpl | 14 ++++++++------ .../de/html/member/member_refback_list_row.tpl | 5 ++++- .../member/member_refback_list_row_deleted.tpl | 3 +++ 9 files changed, 27 insertions(+), 19 deletions(-) diff --git a/inc/language/refback_de.php b/inc/language/refback_de.php index 00e0e5fb5b..f19ba493f9 100644 --- a/inc/language/refback_de.php +++ b/inc/language/refback_de.php @@ -63,6 +63,7 @@ addMessages(array( '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_LEVEL_REFID' => "Geworben von", 'MEMBER_REFBACK_STATUS' => "Referal-Status", 'MEMBER_REFBACK_PERCENTS' => "Ref-Back Prozente", 'MEMBER_REFBACK_POINTS' => "Ref-Back Vergütung", diff --git a/inc/libs/refback_functions.php b/inc/libs/refback_functions.php index 733314735d..5b2feb45ff 100644 --- a/inc/libs/refback_functions.php +++ b/inc/libs/refback_functions.php @@ -288,7 +288,9 @@ function getArrayFromRefbackUserRefs ($userid, $level) { r.refid, r.refback, r.points, - d.status".$add." + d.status".$add.", + d.joined, + d.refid AS level_refid FROM `{?_MYSQL_PREFIX?}_user_refs` AS r LEFT JOIN diff --git a/inc/modules/member/what-refback.php b/inc/modules/member/what-refback.php index c42e21d800..fb614424d0 100644 --- a/inc/modules/member/what-refback.php +++ b/inc/modules/member/what-refback.php @@ -129,14 +129,15 @@ if (SQL_NUMROWS($result) > 0) { if (is_null($refRow['status'])) $deleted = true; // Add/"translate" more content - $refRow['sw'] = $SW; - $refRow['points'] = translateComma($refRow['points']); - $refRow['refback'] = translateComma($refRow['refback']); - $refRow['status'] = translateUserStatus($refRow['status']); + $refRow['sw'] = $SW; + $refRow['points'] = translateComma($refRow['points']); + $refRow['refback'] = translateComma($refRow['refback']); + // UNUSED: $refRow['status'] = translateUserStatus($refRow['status']); + $refRow['joined'] = generateDateTime($refRow['joined'], '3'); if (empty($refRow['nickname'])) $refRow['nickname'] = '---'; // Load row template - if ($deleted) { + if ($deleted === true) { $rows .= loadTemplate('member_refback_list_row_deleted', true, $refRow); } else { $rows .= loadTemplate('member_refback_list_row', true, $refRow); diff --git a/templates/de/html/member/member_ref_list.tpl b/templates/de/html/member/member_ref_list.tpl index 650f4fb817..596706426b 100644 --- a/templates/de/html/member/member_ref_list.tpl +++ b/templates/de/html/member/member_ref_list.tpl @@ -4,7 +4,5 @@ {--MEMBER_REFLIST_TITLE--} -  $content -  diff --git a/templates/de/html/member/member_ref_list_level.tpl b/templates/de/html/member/member_ref_list_level.tpl index a0a10e64d6..12f5bee3f5 100644 --- a/templates/de/html/member/member_ref_list_level.tpl +++ b/templates/de/html/member/member_ref_list_level.tpl @@ -1,6 +1,6 @@ - - + - diff --git a/templates/de/html/member/member_refback_list.tpl b/templates/de/html/member/member_refback_list.tpl index cd6a2a7341..d7e7092724 100644 --- a/templates/de/html/member/member_refback_list.tpl +++ b/templates/de/html/member/member_refback_list.tpl @@ -4,7 +4,6 @@ {--MEMBER_REFBACK_TITLE--} - $content - - diff --git a/templates/de/html/member/member_refback_list_row.tpl b/templates/de/html/member/member_refback_list_row.tpl index 2a14f71ead..61512da72d 100644 --- a/templates/de/html/member/member_refback_list_row.tpl +++ b/templates/de/html/member/member_refback_list_row.tpl @@ -3,7 +3,7 @@ $content[refid] ($content[nickname]) + +
+
{--MEMBER_REFLIST_LIST_TITLE_1--}$content[level]{--MEMBER_REFLIST_LIST_TITLE_2--}$content[percents]{--MEMBER_REFLIST_LIST_TITLE_3--} @@ -35,4 +35,3 @@ $content[rows]
 
 
+ - @@ -11,7 +11,7 @@ {--MEMBER_REFBACK_REFID--} - + $content[rows] -
+ {--MEMBER_REFBACK_LIST_TITLE_1--}$content[level]{--MEMBER_REFBACK_LIST_TITLE_2--}$content[percents]{--MEMBER_REFBACK_LIST_TITLE_3--}
- {--MEMBER_REFBACK_STATUS--} + {--MEMBER_REFBACK_LEVEL_REFID--} {--MEMBER_REFBACK_PERCENTS--} @@ -19,17 +19,19 @@ {--MEMBER_REFBACK_POINTS--} + + {--MEMBER_JOINED--} + {--MEMBER_REFBACK_EDIT--}
 
- $content[status] + $content[level_refid] $content[refback] % @@ -11,6 +11,9 @@ $content[points] {?POINTS?} + $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 0877a3dda8..061237b970 100644 --- a/templates/de/html/member/member_refback_list_row_deleted.tpl +++ b/templates/de/html/member/member_refback_list_row_deleted.tpl @@ -11,6 +11,9 @@
$content[points] {?POINTS?} + $content[joined] +