]> git.mxchange.org Git - mailer.git/commitdiff
Extension ext-top10 improved:
authorRoland Häder <roland@mxchange.org>
Wed, 24 Oct 2012 20:33:43 +0000 (20:33 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 24 Oct 2012 20:33:43 +0000 (20:33 +0000)
- calculation of top earners changed
- added notice about above change
- moved out text to language file

inc/language/top10_de.php
inc/modules/guest/what-top10.php
templates/de/html/guest/guest_top10.tpl

index 03f7c011be3ec57590094b9801751cb5ff4db768..10e01b41458a00033cdc3ea5019c745664d119a2 100644 (file)
@@ -42,8 +42,20 @@ if (!defined('__SECURITY')) {
 
 // Language definitions
 addMessages(array(
+       // Admin - config
        'ADMIN_CONFIG_TOP10_TITLE' => "Einstellungen an TOP-Listen",
        'ADMIN_CONFIG_TOP10_MAX_TOP10' => "Maximale Pl&auml;tze pro Liste",
+
+       // Guest - title
+       'GUEST_TOP10_LOGINS_TITLE' => "TOP{?top10_max?}&nbsp;-&nbsp;Logins",
+       'GUEST_TOP10_EARNER_TITLE' => "TOP{?top10_max?}&nbsp;-&nbsp;{?POINTS?}-Verdiener",
+       'GUEST_TOP10_REFERRAL_TITLE' => "TOP{?top10_max?}&nbsp;-&nbsp;Werber",
+
+       // Guest - notice
+       'GUEST_TOP10_LOGINS_NOTICE' => "Diese Liste zeigt Ihnen, wer am h&auml;ufigsten eingeloggt hat.",
+       'GUEST_TOP10_EARNER_NOTICE1' => "Diese Liste zeigt Ihnen, wer die meisten {?POINTS?} selber verdient hat.",
+       'GUEST_TOP10_EARNER_NOTICE2' => "Seit dem Update vom 24.10.2012 wird nicht mehr der Abzug verrechnet aber daf&uuml;r der gesperrte Eigenverdienst mit verrechnet.",
+       'GUEST_TOP10_REFERRAL_NOTICE' => "Diese Liste zeigt Ihnen, wer die meisten Mitglieder geworben hat.",
 ));
 
 // [EOF]
index db8fb817a31ae95e9667179898bd1ee2e9e56119..190bfd144dd30df195ebc541b5a0e2246d542248 100644 (file)
@@ -102,24 +102,24 @@ SQL_FREERESULT($result);
 
 // TOP earners
 $result = SQL_QUERY("SELECT
-       d.userid,
-       (SUM(p.points) - d.used_points) AS `points`,
-       d.last_online
+       d.`userid`,
+       SUM(p.`points` + p.`locked_points`) AS `points`,
+       d.`last_online`
 FROM
-       `{?_MYSQL_PREFIX?}_user_data` AS d
+       `{?_MYSQL_PREFIX?}_user_data` AS `d`
 LEFT JOIN
-       {?_MYSQL_PREFIX?}_user_points AS p
+       {?_MYSQL_PREFIX?}_user_points AS `p`
 ON
-       p.userid=d.userid
+       p.`userid`=d.`userid`
 WHERE
-       p.points > 0 AND
+       p.`points` > 0 AND
        d.`status`='CONFIRMED'
        " . runFilterChain('user_exclusion_sql', ' ') . "
 GROUP BY
-       p.userid
+       p.`userid`
 ORDER BY
-       points DESC,
-       d.last_online DESC
+       `points` DESC,
+       d.`last_online` DESC
 LIMIT {?top10_max?}", __FILE__, __LINE__);
 
 $OUT = ''; $count = 1;
@@ -156,24 +156,24 @@ SQL_FREERESULT($result);
 
 // TOP referral "hunter"
 $result = SQL_QUERY("SELECT
-       d.userid,
-       SUM(r.counter) AS refs,
-       d.last_online
+       d.`userid`,
+       SUM(r.`counter`) AS `refs`,
+       d.`last_online`
 FROM
-       `{?_MYSQL_PREFIX?}_user_data` AS d
+       `{?_MYSQL_PREFIX?}_user_data` AS `d`
 LEFT JOIN
-       {?_MYSQL_PREFIX?}_refsystem AS r
+       {?_MYSQL_PREFIX?}_refsystem AS `r`
 ON
-       r.userid=d.userid
+       r.`userid`=d.`userid`
 WHERE
-       r.counter > 0 AND
+       r.`counter` > 0 AND
        d.`status`='CONFIRMED'
        " . runFilterChain('user_exclusion_sql', ' ') . "
 GROUP BY
-       r.userid
+       r.`userid`
 ORDER BY
-       refs DESC,
-       d.last_online DESC
+       `refs` DESC,
+       d.`last_online` DESC
 LIMIT {?top10_max?}", __FILE__, __LINE__);
 
 $OUT = ''; $count = 1;
index b3f0df34b8021173c131ab80d3783d9d6b44afbd..29fcde2a8ab365006f81d65b9b4acc0fd8e47ad6 100644 (file)
@@ -3,7 +3,7 @@
        class="table dashed">
        <tr>
                <td colspan="5" class="table_header bottom">
-                       <strong>TOP{?top10_max?}&nbsp;-&nbsp;Logins</strong>
+                       <strong>{--GUEST_TOP10_LOGINS_TITLE--}</strong>
                </td>
        </tr>
        <tr>
@@ -26,7 +26,7 @@
        $content[logins_out]
        <tr>
                <td colspan="5" align="center" class="table_footer">
-                       <div class="notice tiny">Diese Liste zeigt Ihnen, wer am h&auml;ufigsten eingeloggt hat.</div>
+                       <div class="notice tiny">{--GUEST_TOP10_LOGINS_NOTICE--}</div>
                </td>
        </tr>
 </table>
@@ -39,7 +39,7 @@
        class="table dashed">
        <tr>
                <td colspan="4" class="table_header bottom">
-                       <strong>TOP{?top10_max?}&nbsp;-&nbsp;{?POINTS?}-Verdiener</strong>
+                       <strong>{--GUEST_TOP10_EARNER_TITLE--}</strong>
                </td>
        </tr>
        <tr>
        $content[points_out]
        <tr>
                <td colspan="5" align="center" class="table_footer">
-                       <div class="notice tiny">Diese Liste zeigt Ihnen, wer die meisten {?POINTS?} verdient hat.</div>
+                       <div class="notice tiny">{--GUEST_TOP10_EARNER_NOTICE--}</div>
                </td>
        </tr>
 </table>
 </div>
 
+<div class="notice">
+       {--GUEST_TOP10_EARNER_NOTICE2--}
+</div>
+
 <br />
 
 <div align="center">
@@ -72,7 +76,7 @@
        class="table dashed">
        <tr>
                <td colspan="5" class="table_header bottom">
-                       <strong>TOP{?top10_max?}&nbsp;-&nbsp;Werber</strong>
+                       <strong>{--GUEST_TOP10_REFERRAL_TITLE--}</strong>
                </td>
        </tr>
        <tr>
@@ -95,7 +99,7 @@
        $content[referrals_out]
        <tr>
                <td colspan="5" align="center" class="table_footer">
-                       <div class="notice tiny">Diese Liste zeigt Ihnen, wer die meisten Mitglieder geworben hat.</div>
+                       <div class="notice tiny">{--GUEST_TOP10_REFERRAL_NOTICE--}</div>
                </td>
        </tr>
 </table>