Refback rewritten: referal id, joined added
authorRoland Häder <roland@mxchange.org>
Sun, 22 Nov 2009 08:39:00 +0000 (08:39 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 22 Nov 2009 08:39:00 +0000 (08:39 +0000)
inc/language/refback_de.php
inc/libs/refback_functions.php
inc/modules/member/what-refback.php
templates/de/html/member/member_ref_list.tpl
templates/de/html/member/member_ref_list_level.tpl
templates/de/html/member/member_refback_list.tpl
templates/de/html/member/member_refback_list_level.tpl
templates/de/html/member/member_refback_list_row.tpl
templates/de/html/member/member_refback_list_row_deleted.tpl

index 00e0e5f..f19ba49 100644 (file)
@@ -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&uuml;tung",
index 7333147..5b2feb4 100644 (file)
@@ -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
index c42e21d..fb61442 100644 (file)
@@ -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);
index 650f4fb..5967064 100644 (file)
@@ -4,7 +4,5 @@
                <strong>{--MEMBER_REFLIST_TITLE--}</strong>
        </td>
 </tr>
-<tr><td class="seperator" height="5">&nbsp;</td></tr>
 $content
-<tr><td class="seperator">&nbsp;</td></tr>
 </table>
index a0a10e6..12f5bee 100644 (file)
@@ -1,6 +1,6 @@
 <tr>
-       <td align="center">
-<table border="0" cellspacing="0" cellpadding="0" class="member_table dashed" width="730">
+       <td align="center" style="padding:0px;margin:0px">
+<table border="0" cellspacing="0" cellpadding="0" class="member_table dashed">
 <tr>
        <td align="center" class="member_header" colspan="6">
                <strong>{--MEMBER_REFLIST_LIST_TITLE_1--}$content[level]{--MEMBER_REFLIST_LIST_TITLE_2--}$content[percents]{--MEMBER_REFLIST_LIST_TITLE_3--}</strong>
@@ -35,4 +35,3 @@ $content[rows]
 </table>
        </td>
 </tr>
-<tr><td class="seperator" height="5">&nbsp;</td></tr>
index cd6a2a7..d7e7092 100644 (file)
@@ -4,7 +4,6 @@
                <strong>{--MEMBER_REFBACK_TITLE--}</strong>
        </td>
 </tr>
-<tr><td class="seperator" height="5">&nbsp;</td></tr>
 $content
 <tr>
        <td align="center" class="member_footer top">
index b00e441..555acd1 100644 (file)
@@ -1,8 +1,8 @@
 <tr>
-       <td align="center">
+       <td align="center" style="padding:0px;margin:0px">
 <table border="0" cellspacing="0" cellpadding="0" class="member_table dashed" width="730">
 <tr>
-       <td align="center" class="member_header" colspan="5">
+       <td align="center" class="member_header" colspan="6">
                <strong>{--MEMBER_REFBACK_LIST_TITLE_1--}$content[level]{--MEMBER_REFBACK_LIST_TITLE_2--}$content[percents]{--MEMBER_REFBACK_LIST_TITLE_3--}</strong>
        </td>
 </tr>
@@ -11,7 +11,7 @@
                <strong>{--MEMBER_REFBACK_REFID--}</strong>
        </td>
        <td align="center" class="header_column bottom right">
-               <strong>{--MEMBER_REFBACK_STATUS--}</strong>
+               <strong>{--MEMBER_REFBACK_LEVEL_REFID--}</strong>
        </td>
        <td align="center" class="header_column bottom right">
                <strong>{--MEMBER_REFBACK_PERCENTS--}</strong>
        <td align="center" class="header_column bottom right">
                <strong>{--MEMBER_REFBACK_POINTS--}</strong>
        </td>
-       <td align="center" class="header_column bottom" width="142">
+       <td align="center" class="header_column bottom right">
+               <strong>{--MEMBER_JOINED--}</strong>
+       </td>
+       <td align="center" class="header_column bottom" width="134">
                <strong>{--MEMBER_REFBACK_EDIT--}</strong>
        </td>
 </tr>
 $content[rows]
 <tr>
-       <td align="center" class="member_footer" colspan="5">
+       <td align="center" class="member_footer" colspan="6">
                <span class="member_note">{--MEMBER_REFLIST_COUNTER_1--}$content[counter]{--MEMBER_REFLIST_COUNTER_2--}</span>
        </td>
 </tr>
 </table>
        </td>
 </tr>
-<tr><td class="seperator" height="5">&nbsp;</td></tr>
index 2a14f71..61512da 100644 (file)
@@ -3,7 +3,7 @@
                $content[refid] ($content[nickname])
        </td>
        <td align="center" class="switch_sw$content[sw] bottom right">
-               $content[status]
+               $content[level_refid]
        </td>
        <td align="center" class="switch_sw$content[sw] bottom right">
                $content[refback] %
@@ -11,6 +11,9 @@
        <td align="center" class="switch_sw$content[sw] bottom right">
                $content[points] {?POINTS?}
        </td>
+       <td align="center" class="switch_sw$content[sw] bottom right">
+               $content[joined]
+       </td>
        <td align="center" class="switch_sw$content[sw] bottom">
                <form accept-charset="utf-8" action="{%url=modules.php?module=login&amp;what=refback%}" method="post">
                        <input type="hidden" name="id" value="$content[id]" />
index 0877a3d..061237b 100644 (file)
@@ -11,6 +11,9 @@
        <td align="center" class="switch_sw$content[sw] bottom right">
                $content[points] {?POINTS?}
        </td>
+       <td align="center" class="switch_sw$content[sw] bottom right">
+               $content[joined]
+       </td>
        <td align="center" class="switch_sw$content[sw] bottom">
                <form accept-charset="utf-8" style="paddin-bottom:0px">
                        <input type="button" name="edit" class="member_submit disabled" title="{--MEMBER_REFBACK_DELETED_TITLE--}"