From: Roland Häder Date: Wed, 6 Jul 2011 15:34:13 +0000 (+0000) Subject: More use of EL code X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=93c7e46fbfa9bef84704deaf8c77ed792a321c75 More use of EL code --- diff --git a/inc/modules/guest/what-top10.php b/inc/modules/guest/what-top10.php index 139f7f248a..863ff62ae6 100644 --- a/inc/modules/guest/what-top10.php +++ b/inc/modules/guest/what-top10.php @@ -53,7 +53,7 @@ $rows = array(); // TOP logins $result = SQL_QUERY("SELECT - `userid`, `total_logins`, `last_online` + `userid`, `last_online` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE @@ -69,10 +69,7 @@ while ($content = SQL_FETCHARRAY($result)) { $content = array( 'cnt' => $count, 'userid' => $content['userid'], - 'nickname' => $content['nickname'], - 'total_logins' => $content['total_logins'], - 'points' => getTotalPoints($content['userid']), - 'last_online' => generateDateTime($content['last_online'], 3), + 'last_online' => generateDateTime($content['last_online'], '3'), ); // Load row template @@ -125,13 +122,7 @@ LIMIT {?top10_max?}", __FILE__, __LINE__); $OUT = ''; $count = 1; while ($content = SQL_FETCHARRAY($result)) { // Prepare data for template - $content = array( - 'cnt' => $count, - 'userid' => $content['userid'], - 'nickname' => $content['nickname'], - 'points' => $content['points'], - 'last_online' => generateDateTime($content['last_online'], 3) - ); + $content['last_online'] = generateDateTime($content['last_online'], '3'); // Load row template $OUT .= loadTemplate('guest_top10_row_earner', true, $content); @@ -187,8 +178,7 @@ while ($content = SQL_FETCHARRAY($result)) { 'cnt' => $count, 'userid' => $content['userid'], 'refs' => $content['refs'], - 'nickname' => $content['nickname'], - 'last_online' => generateDateTime($content['last_online'], 3) + 'last_online' => generateDateTime($content['last_online'], '3') ); // Load row template diff --git a/templates/de/html/guest/guest_top10_row_login.tpl b/templates/de/html/guest/guest_top10_row_login.tpl index d390c75858..fc17f05219 100644 --- a/templates/de/html/guest/guest_top10_row_login.tpl +++ b/templates/de/html/guest/guest_top10_row_login.tpl @@ -1,7 +1,7 @@ $content[cnt] $content[userid] ({%user,nickname,fixEmptyContentToDashes=$content[userid]%}) - {%pipe,translateComma=$content[total_logins]%} - {%pipe,translateComma=$content[points]%} + {%user,total_logins,translateComma=$content[userid]%} + {%pipe,getTotalPoints,translateComma=$content[userid]%} $content[last_online]